action #161396
closedopenQA Project (public) - coordination #112862: [saga][epic] Future ideas for easy multi-machine handling: MM-tests as first-class citizens
openQA Project (public) - coordination #111929: [epic] Stable multi-machine tests covering multiple physical workers
gitlab CI jobs do not fail on invalid YAML size:S
0%
Description
Motivation¶
See https://suse.slack.com/archives/C02CANHLANP/p1717381703517509 and #161381 .
As the openqa/workerconf.sls
and possibly other files are plain YAML files not using any Jinja templating, we can validate the YAML in a pipeline in merge requests, so a PR with broken YAML will fail and - hopefully - not be merged. We already have the check in the Makefile and we have a CI pipeline but we don't call the check yet in salt pillars on openqa/workerconf.sls even though we treat it as plain YAML file.
Acceptance criteria¶
- AC1: The "workerconf" is checked for YAML validity
Suggestions¶
- We already call yamllint in both salt-states , see https://gitlab.suse.de/openqa/salt-states-openqa/-/jobs/2672309 as example, as well as salt-pillars CI pipelines, see https://gitlab.suse.de/openqa/salt-pillars-openqa/-/jobs/2684395 , but only on files with .ya?ml extension, not *.sls . Try to extend the check for workerconf.sls as we treat it as pure YAML file *or rename the file if we can ensure that it's still usable by salt with a changed name
Updated by okurz 7 months ago
- Copied from action #161393: gitlab CI jobs do not execute salt-lint and do not fail on missing "find" executable added
Updated by ybonatakis 7 months ago
- Status changed from Workable to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis 7 months ago
https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/831 fixes the errors from yamllint. salt-lint still works with disabled 204 rule.
Updated by openqa_review 7 months ago
- Due date set to 2024-06-20
Setting due date based on mean cycle time of SUSE QE Tools
Updated by ybonatakis 7 months ago
- Due date deleted (
2024-06-20)
Updated by ybonatakis 7 months ago
- Status changed from In Progress to Feedback
Last PR I think, https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/832
Enables the yamllint checks against *.sls
salt-states-openqa cant be do the same as the sls files as not single yaml (most use templating).
in theory we can configure it and include/exclude the files which yamllint can check but I think ticket focuses on salt-pillars-openqa
Updated by ybonatakis 7 months ago
tinita wrote in #note-10:
Why did you delete the due date?
I might did it accidentally when I press one of the options which come up when the ticket is already modified while you try to add a comment
Updated by ybonatakis 7 months ago
As a side note: https://github.com/warpnet/salt-lint/issues/240
Upstream work to implement rule for indentation similar to yamllint. This was the one which breaks mainly in our repo. salt-pillars-openqa should be ok now but salt-states-openqa has still this issue, which you can see when sls are checked by yamllint.
Updated by okurz 6 months ago
- Copied to action #162044: Ensure proper indentation yamllint checks in our salt-states-openqa+salt-pillars-openqa size:S added
Updated by okurz 6 months ago
https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/832 merged. Please look into the related failure https://gitlab.suse.de/openqa/salt-pillars-openqa/-/jobs/2705233#L29
Updated by ybonatakis 6 months ago
Seems it was fixed by @nick on ac86dba0cc8660a63e7fb8996e19b06883feb809
Updated by tinita 6 months ago
I tested if the check works https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/838 and it does
Updated by okurz 6 months ago
- Due date set to 2024-06-19
https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/838 is a good verification. Anything else that needs to be done here?
Updated by ybonatakis 6 months ago ยท Edited
- Status changed from Feedback to Resolved
I believe so. Continue on https://progress.opensuse.org/issues/162044