Skip to content

telco-core: fix echoMode conditional in MetalLB BFD profile template - #879

Open
bborbely-rh wants to merge 1 commit into
openshift-kni:mainfrom
bborbely-rh:bborbely
Open

telco-core: fix echoMode conditional in MetalLB BFD profile template#879
bborbely-rh wants to merge 1 commit into
openshift-kni:mainfrom
bborbely-rh:bborbely

Conversation

@bborbely-rh

@bborbely-rh bborbely-rh commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • Fix kube-compare template for MetalLB BFDProfile.spec.echoMode so an explicit false is not treated as unset (CNF-26007).
  • Use hasKey instead of truthy if .spec.echoMode, matching the pattern already used for other optional booleans (e.g. useMultiNetworkPolicy).

Test plan

  • Confirm live CRs with echoMode: false (or API-defaulted false) no longer report a deviation against the reference template
  • Confirm CRs that omit echoMode still omit the field in the rendered reference
  • Confirm CRs with echoMode: true still render echoMode: true

Made with Cursor

@openshift-ci
openshift-ci Bot requested review from SchSeba and sabbir-47 July 29, 2026 14:42
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bborbely-rh
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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 29, 2026
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

Hi @bborbely-rh. Thanks for your PR.

I'm waiting for a openshift-kni member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@bborbely-rh, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e069424a-32db-489a-975f-4c9d19a8df6d

📥 Commits

Reviewing files that changed from the base of the PR and between 8fe3379 and 0ee946f.

📒 Files selected for processing (1)
  • telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml
📝 Walkthrough

Walkthrough

The BFDProfile Helm template now checks whether echoMode exists in .spec before rendering it and no longer trims whitespace at the conditional’s closing tag.

Changes

BFDProfile template behavior

Layer / File(s) Summary
Preserve explicitly defined echoMode values
telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml
The conditional uses hasKey .spec "echoMode" so explicitly present falsy or empty values are rendered, while the closing tag uses non-trimming whitespace handling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: sabbir-47, schseba

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing the MetalLB BFD profile echoMode conditional.
Description check ✅ Passed The description matches the changeset and explains the false-handling fix and test scenarios.
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.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml`:
- Line 15: Update the conditional opening around hasKey .spec "echoMode" to
preserve the preceding newline by removing the left-trimming hyphen. Keep the
conditional behavior unchanged so explicit echoMode values, including false,
render as valid YAML rather than being absorbed into the preceding inline
comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f210d72f-affd-4bd7-bd67-e605c65e6749

📥 Commits

Reviewing files that changed from the base of the PR and between f9edd30 and caefd8d.

📒 Files selected for processing (1)
  • telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml

@bborbely-rh bborbely-rh left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

seems ok to me!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml`:
- Around line 15-17: Update the closing conditional action in the echoMode block
to use {{ end }} instead of {{- end }}, preserving the newline after echoMode so
subsequent fields render as separate valid YAML lines.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c09166c-f3d9-486a-8c11-6656bd12458d

📥 Commits

Reviewing files that changed from the base of the PR and between caefd8d and 88866b3.

📒 Files selected for processing (1)
  • telco-core/configuration/reference-crs-kube-compare/required/networking/metallb/bfd-profile.yaml

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant