jenkins-infra/helm-charts

The `helm-unittest` updatecli target should be of type `file` instead of `yaml`

Closed this issue · 4 comments

The target

targets:
updateChart:
name: Update helm-unittest version in the GitHub Action workflow
kind: yaml
scmid: default
spec:
file: .github/workflows/test.yml
key: $.env.UNITTEST_VERSION
should be of type file to avoid updatecli YAML parser adding a null after workflow_dispatch while it shouldn't: #706 (comment)

image

Is that a problem?

I see that the workflow_dispatch is still enabled:

Capture d’écran 2023-09-15 à 20 30 43

It looks like it is valid. Using file means having a regexp which is a PITA to maintain, so better to keep updatecli doing this if it is valid YAML + GHA syntax no?

I've removed the null manually. For GitHub workflow_dispatch: is valid and the correct syntax, while the YAML parser used by updatecli wants to add a null to it: workflow_dispatch: null

  • There are no differences in strict YAML between workflow_dispatch:, workflow_dispatch: null or even ``workflow_dispatch: Null: that is why the parser is correct, but it's *visually* annoying. Ref. the YAML specification for null` https://yaml.org/type/null.html

  • There are no differences in GHA (functionally speaking) between workflow_dispatch:, workflow_dispatch: null and workflow_dispatch: {}: the 3 syntaxes enable the button to trigger manually a build. So wether you've removed the null value or not , the feature is correct: hence my question "what is the problem you want to solve"

Again, using a file with a pattern is hard to keep (the amount of fixes we've had to fix over time...) compared to a native YAML system. If there are no problem, I don't understand why we should trade the native resource with another?

As you said, it's visually annoying, that's all.

As there is only one dependency to keep up to date, the compromise didn't seem too big for me.

Your explanations are clear, closing this issue.