-
Notifications
You must be signed in to change notification settings - Fork 2.9k
wip: migrate yaml linting to "kubernetes-sigs/yaml" #36183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
done, but still this PR wont pass the checks since the actual formatting is not done here, |
…mt, updating dependencies and build scripts.
… on the `ci` variable.
…, env:) to be indented 2 spaces relative to their parent key. The original template sometimes had them at the same level or aligned incorrectly. We shifted them to match the standard.
- Removing "Invisible" Newlines: Loop and Option tags in Jinja (like {% if %}) leave behind blank lines by default. We changed them to {%- if -%} (adding hyphens) to tell Jinja: "Execute this logic, but strip the whitespace around it." This stopped valid code from being pushed apart by random blank lines.
- Stripping the End: We added {%- endfilter -%} at the very end. This removes all trailing newlines from the template output itself, giving the Python script full control over how jobs are separated.
…red, we ensure that: There is exactly one newline between jobs (separating them cleanly). There is exactly one newline at the end of the file (making it a valid text file).
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@medyagh: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Per discussion here
#36114 (comment)
Removed 2 years old "yamllint" (docker-based) and introduced yamlfmt (go module-based).
New Scripts:
-- hack/make-rules/update/yamlfmt.sh: Formats YAML files in config/jobs and config/prow/cluster.
-- hack/make-rules/verify/yamlfmt.sh: Verifies formatting (used in CI).
Makefile Updates:
-- Replaced verify-yamllint with verify-yamlfmt.
-- Added update-yamlfmt.
-- Cleanup: Deleted hack/make-rules/verify/yamllint.sh and config/jobs/.yamllint.conf.
DRA updates (to generate jobs)
changes to dra ninja template to match yamlfter
how to use
running the
make update-yamlfmtwill cause changing 546 files (as seen here #36186) we could do either in the same PR or as a follow up.I prefer this PR be reviewed first and approved first and we could do the linting in same PR or a follow up
TODO:
after we run make update-yamlfmt, I notice some mode changes (probably a link is being overwritten by yamlfmt) which need further investigation
closes #36114