[14:20:39] was wondering if we messed up golang template here? https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/901240/1/helmfile.d/dse-k8s-services/rdf-streaming-updater/helmfile.yaml#30 specifically wondering if we need backticks in line 31 [14:26:17] jayme ^^ any idea on this one? [14:31:15] error from jenkins: `/helmfile.yaml: hook[helmfile_log_sal]: template: stringTemplate:1:94: executing "stringTemplate" at <.Release.Name>: map has no entry for key "Release"` [14:35:12] mw-jobrunner does seem to allow accessing .Release.Name from the helmfile_log_sal hook... not sure what we're missing here [14:49:10] <_joe_> uhm [14:50:20] <_joe_> you have quite a bit of extra braces [14:52:39] <_joe_> ahhh I think I know what the problem is there [14:53:37] <_joe_> wait, jenkins gives +2 to that patch [14:55:00] <_joe_> inflatador: what is your problem? [14:55:02] _joe_ sorry for the confusion, we were out of ideas and just took it out [14:55:17] <_joe_> but even on the version you had before [14:55:46] _joe_ the idea was to add a release-specific announcement to SAL https://integration.wikimedia.org/ci/job/helm-lint/9726/console is the jenkins output [14:55:55] <_joe_> and yes, references to .Release need the {{`{{ .Release.... }}`}} trick as .Release is in helm [14:58:17] <_joe_> inflatador: ok, I don't think .Release is available when building the hooks [14:58:28] <_joe_> claime: do you remember about your attempts with mw-jobrunner? [14:58:55] I have gone no further than setup the cluster, we didn't try to make it actually work [14:59:07] <_joe_> no I mean helmfile.yaml [14:59:08] Ah, you mean on logging [14:59:10] lmao [14:59:11] <_joe_> yes [14:59:12] Yeah [14:59:18] <_joe_> does that even work? [15:00:09] Gimme a sec [15:01:35] <_joe_> it does seem to work correctly [15:01:37] You only have access to the Release namespace in presync and postsync hooks iirc [15:01:48] Ah no, that's the Event namespace [15:02:17] I don't think we use the Release namespace anywhere in global hooks [15:03:06] "{{`{{.Release.Name}}`}}" [15:03:09] should work [15:03:19] in prepare and cleanup hooks [15:03:23] https://helmfile.readthedocs.io/en/latest/#global-hooks [15:03:26] <_joe_> yeah [15:05:16] <_joe_> but it's not available [15:06:05] <_joe_> dcausse, inflatador I just tested - {{.Release}} isn't available in the prepare/cleanup stages [15:06:44] _joe_: ok, we'll remove it for now [15:06:59] _joe_ understood. It's not a huge deal if we can't do it, just wanted to make sure we weren't templating wrong [15:07:14] The documentation for hooks is SO BAD. [15:07:27] <_joe_> s/documentation/implementation/ [15:07:46] To be perfectly clear [15:08:02] .Release is available in prepare and cleanup hooks if they are at the release scope [15:08:06] Not at the global scope [15:08:35] we can try adding more braces, brackets and backticks if it will help ;P [15:08:42] It won't [15:08:53] The 3 B's of golang templating! [15:09:10] If you want it, you need to re-implement the hook in the releases hash [15:09:27] Like the first example of https://helmfile.readthedocs.io/en/latest/#hooks [15:09:54] But then you lose the global hook [15:09:59] It's infuriating