Skip to content

yamllint: cover all changed files ending in yaml, yml or fmf#14601

Open
vojtapolasek wants to merge 5 commits intoComplianceAsCode:masterfrom
vojtapolasek:make_yamllint_filepaths_stricter
Open

yamllint: cover all changed files ending in yaml, yml or fmf#14601
vojtapolasek wants to merge 5 commits intoComplianceAsCode:masterfrom
vojtapolasek:make_yamllint_filepaths_stricter

Conversation

@vojtapolasek
Copy link
Copy Markdown
Collaborator

@vojtapolasek vojtapolasek commented Mar 26, 2026

Description:

  • update the ci-lint workflow to utilize .yamllint config file present in the root of the project
  • update the .yamllint config file to implement some of project's style requirements
  • apply yamllint to all files which are being changed by a PR, let yamllint ignore files which are not matching yml, yaml or fmf extensions

Rationale:

  • The previous grep "controls/" pattern matched any file path containing controls/, which could include non-YAML files that yamllint cannot process. Restricting to controls/.*\.yml ensures only relevant YAML files are linted, avoiding spurious CI failures.

Review Hints:

  • Single-commit, single-line change in .github/workflows/ci_lint.yml (line 52).
  • No product builds are affected — this is a CI infrastructure change only.

if: ${{ env.CONTROLS_CHANGES == 'true' }}
run: |
for control_file in $(cat filenames.txt | grep "controls/"); do
for control_file in $(cat filenames.txt | grep "controls/.*\.yml"); do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a similar regex on line 32. Should that regex be changed as well?

@comps
Copy link
Copy Markdown
Collaborator

comps commented Mar 27, 2026

Are you sure you don't want to configure yamllint properly instead, as I suggested in #14529 (comment) ?

@vojtapolasek vojtapolasek force-pushed the make_yamllint_filepaths_stricter branch from 8ca69d6 to d48dd28 Compare March 27, 2026 11:48
Filter out files inside the .yamllint configuration
@vojtapolasek vojtapolasek force-pushed the make_yamllint_filepaths_stricter branch from d48dd28 to 975e2d6 Compare March 27, 2026 11:55
@vojtapolasek vojtapolasek force-pushed the make_yamllint_filepaths_stricter branch from b803433 to 02bffa8 Compare March 27, 2026 13:55
@vojtapolasek vojtapolasek changed the title yamllint: make control file path matching stricter in CI lint workflow yamllint: cover all changed files ending in yaml, yml or fmf Mar 27, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 27, 2026

@vojtapolasek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance 02bffa8 link true /test e2e-aws-openshift-node-compliance

Full PR test history. Your PR dashboard.

Details

Instructions 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.

Copy link
Copy Markdown
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vojtapolasek Do I understand it well that now the .profile files won't be checked?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants