Skip to content

CNF-23578: Add yamllint coverage for telco-ran configuration#744

Open
sebrandon1 wants to merge 1 commit into
openshift-kni:mainfrom
sebrandon1:cnf-23578/add-yamllint-telco-ran
Open

CNF-23578: Add yamllint coverage for telco-ran configuration#744
sebrandon1 wants to merge 1 commit into
openshift-kni:mainfrom
sebrandon1:cnf-23578/add-yamllint-telco-ran

Conversation

@sebrandon1

@sebrandon1 sebrandon1 commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use yamllint ignore: directive in .yamllint.yaml to exclude kube-compare reference directories, extra-manifest CRs, and generated PolicyGenTemplate output — replacing the piece-wise Makefile invocations
  • Simplify lintCheck target to three broad directory scans (telco-core/, telco-hub/, telco-ran/)
  • Add telco-ran/configuration/argocd to yamllint coverage
  • Fix all pre-existing yamllint errors across telco-ran YAML files: trailing whitespace, incorrect indentation, extra colon spacing, missing EOF newline
  • Users can run make lintCheck locally before pushing

Jira: CNF-23578

@openshift-ci-robot

openshift-ci-robot commented May 6, 2026

Copy link
Copy Markdown
Collaborator

@sebrandon1: This pull request references CNF-23578 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add yamllint validation for telco-ran/configuration/source-crs, hardening, and install/ to the lintCheck Makefile target — these were previously skipped while telco-core and telco-hub were covered
  • Fix all pre-existing yamllint errors across 19 telco-ran YAML files: trailing whitespace, incorrect indentation, extra colon spacing
  • Add yamllint disable-line comments for base64-encoded ignition data lines that exceed the 2000-char line length limit

Jira: CNF-23578

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from fedepaol and sabbir-47 May 6, 2026 17:03
@openshift-ci

openshift-ci Bot commented May 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign lack for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 296e8b9d-179d-459a-b02f-ae1f7247e91c

📥 Commits

Reviewing files that changed from the base of the PR and between 59188d6 and 5783a59.

📒 Files selected for processing (41)
  • .yamllint.yaml
  • Makefile
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-common-mno-ranGen.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-3node-ranGen.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-clo5-cleanup.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-sno-ranGen.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-standard-ranGen.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-3node-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-sno-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-standard-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-3node.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-sno.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-standard.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-sno-ranGen.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-sno-validator-ranGen.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-standard-validator-ranGen.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/hub-side-templating/group-du-sno-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/kustomization.yaml
  • telco-ran/configuration/kube-compare-reference/cluster-tuning/operator-hub/DisconnectedIDMS.yaml
  • telco-ran/configuration/kube-compare-reference/machine-config/crun/enable-crun-master.yaml
  • telco-ran/configuration/kube-compare-reference/machine-config/crun/enable-crun-worker.yaml
  • telco-ran/configuration/kube-compare-reference/ptp-operator/configuration/PtpConfigDualFollower.yaml
  • telco-ran/configuration/kube-compare-reference/ptp-operator/configuration/PtpConfigGnrdTGM.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-fec-operator/SriovFecClusterConfig.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-fec-operator/SriovVrbClusterConfig.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-operator/SriovOperatorConfig.yaml
  • telco-ran/configuration/source-crs/data-protection/OadpOperatorStatus.yaml
  • telco-ran/configuration/source-crs/deprecated/AmqSubscription.yaml
  • telco-ran/configuration/source-crs/disconnected-registry/DisconnectedIDMS.yaml
  • telco-ran/configuration/source-crs/ibu/PlatformBackupRestoreWithIBGU.yaml
  • telco-ran/configuration/source-crs/lca/LcaOperatorStatus.yaml
  • telco-ran/configuration/source-crs/machine-config/RebootMachineConfig.yaml
  • telco-ran/configuration/source-crs/optional-extra-manifest/enable-crun-master.yaml
  • telco-ran/configuration/source-crs/optional-extra-manifest/enable-crun-worker.yaml
  • telco-ran/configuration/source-crs/ptp-operator/configuration/PtpConfigDualFollower.yaml
  • telco-ran/configuration/source-crs/ptp-operator/configuration/PtpConfigGnrdTGM.yaml
  • telco-ran/configuration/source-crs/sriov-fec-operator/SriovFecClusterConfig.yaml
  • telco-ran/configuration/source-crs/sriov-fec-operator/SriovVrbClusterConfig.yaml
  • telco-ran/configuration/source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
  • telco-ran/configuration/source-crs/sriov-operator/SriovOperatorConfig.yaml
  • telco-ran/configuration/source-crs/storage-lso/StorageOperatorStatus.yaml
💤 Files with no reviewable changes (1)
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-clo5-cleanup.yaml
✅ Files skipped from review due to trivial changes (34)
  • telco-ran/configuration/source-crs/machine-config/RebootMachineConfig.yaml
  • telco-ran/configuration/source-crs/ptp-operator/configuration/PtpConfigDualFollower.yaml
  • telco-ran/configuration/source-crs/deprecated/AmqSubscription.yaml
  • telco-ran/configuration/source-crs/sriov-operator/SriovOperatorConfig.yaml
  • telco-ran/configuration/source-crs/sriov-operator/SriovOperatorConfig-SetSelector.yaml
  • telco-ran/configuration/source-crs/disconnected-registry/DisconnectedIDMS.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-fec-operator/SriovFecClusterConfig.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-fec-operator/SriovVrbClusterConfig.yaml
  • telco-ran/configuration/source-crs/storage-lso/StorageOperatorStatus.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-3node-ranGen.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-sno.yaml
  • telco-ran/configuration/kube-compare-reference/machine-config/crun/enable-crun-master.yaml
  • telco-ran/configuration/source-crs/ptp-operator/configuration/PtpConfigGnrdTGM.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/kustomization.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-sno-ranGen.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-standard-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-common-mno-ranGen.yaml
  • telco-ran/configuration/kube-compare-reference/ptp-operator/configuration/PtpConfigGnrdTGM.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-3node.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-sno-validator-ranGen.yaml
  • telco-ran/configuration/source-crs/data-protection/OadpOperatorStatus.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/acm-group-du-standard-ranGen.yaml
  • telco-ran/configuration/kube-compare-reference/sriov-operator/SriovOperatorConfig.yaml
  • telco-ran/configuration/kube-compare-reference/machine-config/crun/enable-crun-worker.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-3node-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-standard-validator-ranGen.yaml
  • telco-ran/configuration/kube-compare-reference/ptp-operator/configuration/PtpConfigDualFollower.yaml
  • telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/acm-group-du-sno-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/clusterinstance/example-standard.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/hub-side-templating/group-du-sno-ranGen-templated.yaml
  • telco-ran/configuration/argocd/example/policygentemplates/group-du-sno-ranGen.yaml
  • telco-ran/configuration/source-crs/ibu/PlatformBackupRestoreWithIBGU.yaml
  • telco-ran/configuration/source-crs/lca/LcaOperatorStatus.yaml
  • telco-ran/configuration/source-crs/optional-extra-manifest/enable-crun-master.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • telco-ran/configuration/source-crs/optional-extra-manifest/enable-crun-worker.yaml
  • telco-ran/configuration/source-crs/sriov-fec-operator/SriovVrbClusterConfig.yaml
  • telco-ran/configuration/source-crs/sriov-fec-operator/SriovFecClusterConfig.yaml

📝 Walkthrough

Walkthrough

The Makefile lintCheck target is broadened from per-path yamllint invocations to three directory-level invocations covering telco-core/, telco-hub/, and telco-ran/. .yamllint.yaml gains an ignore block for Go-template directories, generated base64-heavy MachineConfig CRs, and a mixed-indentation output file. All resulting yamllint violations across telco-ran/ are then corrected: structural indentation fixes (enable-crun-*, SriovFecClusterConfig, SriovVrbClusterConfig, DisconnectedIDMS), trailing-whitespace removal in source-crs and kube-compare-reference files, and whitespace normalization across argocd example configs.

Changes

yamllint expansion and YAML cleanup

Layer / File(s) Summary
Lint infrastructure: Makefile scope and yamllint ignore rules
Makefile, .yamllint.yaml
lintCheck replaces granular per-path yamllint calls with three directory-level calls (telco-core/, telco-hub/, telco-ran/). .yamllint.yaml adds an ignore block for Go-template reference directories, generated MachineConfig CRs with long base64 lines, and a mixed-indentation PolicyGenTemplate output.
Structural YAML corrections in source-crs and kube-compare-reference
telco-ran/configuration/source-crs/optional-extra-manifest/enable-crun-*.yaml, telco-ran/configuration/kube-compare-reference/machine-config/crun/enable-crun-*.yaml, telco-ran/configuration/source-crs/sriov-fec-operator/SriovFec*.yaml, telco-ran/configuration/kube-compare-reference/sriov-fec-operator/Sriov*.yaml, telco-ran/configuration/source-crs/disconnected-registry/DisconnectedIDMS.yaml, telco-ran/configuration/kube-compare-reference/cluster-tuning/operator-hub/DisconnectedIDMS.yaml
enable-crun-master and enable-crun-worker move name under metadata and re-indent spec blocks in both source-crs and kube-compare-reference. SriovFecClusterConfig and SriovVrbClusterConfig establish physicalFunction as a proper nested mapping key. DisconnectedIDMS annotation indentation is corrected in both locations.
Trailing-whitespace and minor text fixes in source-crs and kube-compare-reference
telco-ran/configuration/source-crs/data-protection/OadpOperatorStatus.yaml, telco-ran/configuration/source-crs/deprecated/AmqSubscription.yaml, telco-ran/configuration/source-crs/ibu/PlatformBackupRestoreWithIBGU.yaml, telco-ran/configuration/source-crs/lca/LcaOperatorStatus.yaml, telco-ran/configuration/source-crs/machine-config/RebootMachineConfig.yaml, telco-ran/configuration/source-crs/storage-lso/StorageOperatorStatus.yaml, telco-ran/configuration/source-crs/sriov-operator/SriovOperatorConfig*.yaml, telco-ran/configuration/source-crs/ptp-operator/configuration/PtpConfig*.yaml, telco-ran/configuration/kube-compare-reference/ptp-operator/configuration/PtpConfig*.yaml, telco-ran/configuration/kube-compare-reference/sriov-operator/SriovOperatorConfig.yaml
Trailing spaces removed from metadata.name, metadata.namespace, label values, comment lines, and embedded config strings. Grammar corrected in PtpConfigDualFollower comment ("a active" → "an active").
Whitespace normalization in argocd example configs
telco-ran/configuration/argocd/example/acmpolicygenerator/*, telco-ran/configuration/argocd/example/acmpolicygenerator/hub-side-templating/*, telco-ran/configuration/argocd/example/policygentemplates/*, telco-ran/configuration/argocd/example/policygentemplates/hub-side-templating/*, telco-ran/configuration/argocd/example/clusterinstance/example-*.yaml
Trailing spaces removed from comment lines, profile: values, and blank lines across all example policy generator and cluster instance files. sites : key spacing normalized to sites: in example-sno.yaml and example-standard.yaml. Full indentation pass applied to acm-common-mno-ranGen.yaml.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding yamllint coverage for telco-ran configuration, which is the primary objective of this pull request.
Description check ✅ Passed The description is directly related to the changeset, detailing the specific yamllint improvements, Makefile simplifications, YAML error fixes, and coverage additions across telco-ran configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sebrandon1 sebrandon1 force-pushed the cnf-23578/add-yamllint-telco-ran branch 2 times, most recently from 5dc93ec to fd1e419 Compare May 6, 2026 17:23
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 13, 2026
@sebrandon1 sebrandon1 force-pushed the cnf-23578/add-yamllint-telco-ran branch from fd1e419 to bb78bd2 Compare June 15, 2026 22:18
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2026
@sebrandon1 sebrandon1 force-pushed the cnf-23578/add-yamllint-telco-ran branch from bb78bd2 to 1a54ed3 Compare June 22, 2026 16:42

@irinamihai irinamihai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a couple of comments.

Also, the PR description states Add yamllint disable-line comments for base64-encoded ignition data lines that exceed the 2000-char line length limit which doesn't seem to be done 🤔

Comment thread Makefile
fi

# Basic lint checking
lintCheck:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are 3 different invocation styles under this target.
I wonder if we could successfully use the ignore directive of yamllint to hold the paths that we want to exclude. For example:

extends: default

ignore: |
    # Go-templated kube-compare directories — not valid YAML
    telco-core/configuration/reference-crs-kube-compare/
    telco-hub/configuration/reference-crs-kube-compare/
    telco-ran/configuration/kube-compare-reference/
    # Generated MachineConfig CRs with base64 ignition data exceeding line limits
    telco-ran/configuration/source-crs/extra-manifest/

rules:
    # ... existing rules unchanged ...

Then the entire lintCheck will be pretty:

lintCheck:
      yamllint -c .yamllint.yaml .

Comment thread Makefile Outdated
yamllint -c .yamllint.yaml telco-hub/configuration/example-overlays-config
yamllint -c .yamllint.yaml telco-hub/install/
find telco-ran/configuration/source-crs -path '*/extra-manifest' -prune -o -name '*.yaml' -print | xargs yamllint -c .yamllint.yaml
if [ -d telco-ran/configuration/hardening ]; then yamllint -c .yamllint.yaml telco-ran/configuration/hardening; fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it necessary to have special handling of the hardening directory?

Comment thread Makefile Outdated
yamllint -c .yamllint.yaml telco-hub/install/
find telco-ran/configuration/source-crs -path '*/extra-manifest' -prune -o -name '*.yaml' -print | xargs yamllint -c .yamllint.yaml
if [ -d telco-ran/configuration/hardening ]; then yamllint -c .yamllint.yaml telco-ran/configuration/hardening; fi
yamllint -c .yamllint.yaml telco-ran/install/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The argocd directory should also get coverage.

- nodeLabel: {{ template "matchNodeSelectorValue" (list .nodeLabel "node-role.kubernetes.io" ) }}
{{- end }}
{{- end }} No newline at end of file
{{- end }} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing end of line.

- Use yamllint ignore directive to exclude kube-compare reference
  directories, extra-manifest CRs, and generated PolicyGenTemplate
  output instead of per-directory Makefile invocations
- Simplify lintCheck target to three broad directory scans
- Add argocd directory to yamllint coverage
- Fix trailing whitespace across argocd example files
- Fix inconsistent indentation in acm-common-mno-ranGen.yaml
- Fix extra blank line in acm-group-du-clo5-cleanup.yaml
- Fix missing newline at EOF in PtpConfigDualFollower.yaml
- Fix existing yamllint errors in telco-ran source-crs files
@sebrandon1 sebrandon1 force-pushed the cnf-23578/add-yamllint-telco-ran branch from 1a54ed3 to 5783a59 Compare June 23, 2026 18:26
@openshift-ci-robot

openshift-ci-robot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

@sebrandon1: This pull request references CNF-23578 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Use yamllint ignore: directive in .yamllint.yaml to exclude kube-compare reference directories, extra-manifest CRs, and generated PolicyGenTemplate output — replacing the piece-wise Makefile invocations
  • Simplify lintCheck target to three broad directory scans (telco-core/, telco-hub/, telco-ran/)
  • Add telco-ran/configuration/argocd to yamllint coverage
  • Fix all pre-existing yamllint errors across telco-ran YAML files: trailing whitespace, incorrect indentation, extra colon spacing, missing EOF newline
  • Users can run make lintCheck locally before pushing

Jira: CNF-23578

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 openshift-eng/jira-lifecycle-plugin repository.

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.

4 participants