Skip to content

OCPBUGS-98316: Fix SHA idempotency test in nmstate-configuration.sh#6291

Open
rbbratta wants to merge 1 commit into
openshift:mainfrom
rbbratta:fix-sha-check
Open

OCPBUGS-98316: Fix SHA idempotency test in nmstate-configuration.sh#6291
rbbratta wants to merge 1 commit into
openshift:mainfrom
rbbratta:fix-sha-check

Conversation

@rbbratta

@rbbratta rbbratta commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The applied-vs-config comparison used invalid [ test syntax without spaces, so bash never took the early-exit path and re-ran OVS cleanup on every service start.

Assisted-by: Cursor

- What I did

- How to verify it

- Description for the changelog

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of whether a network configuration has already been applied.
    • Prevented incorrect comparisons that could cause configuration updates to be skipped or reapplied unnecessarily.

The applied-vs-config comparison used invalid [ test syntax without
spaces, so bash never took the early-exit path and re-ran OVS cleanup
on every service start.

Signed-off-by: Ross Brattain <rbrattai@redhat.com>
Assisted-by: Cursor
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rbbratta: This pull request references Jira Issue OCPBUGS-98316, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The applied-vs-config comparison used invalid [ test syntax without spaces, so bash never took the early-exit path and re-ran OVS cleanup on every service start.

Assisted-by: Cursor

- What I did

- How to verify it

- Description for the changelog

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.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 262fdf90-89f7-49cb-8606-6620f4e36b25

📥 Commits

Reviewing files that changed from the base of the PR and between f6d6db3 and 7788a2e.

📒 Files selected for processing (1)
  • templates/common/_base/files/nmstate-configuration.yaml

Walkthrough

The nmstate configuration template replaces a malformed SHA256 comparison with a valid Bash [[ ... == ... ]] check for detecting already-applied configuration.

Changes

Nmstate configuration comparison

Layer / File(s) Summary
Correct SHA256 equality check
templates/common/_base/files/nmstate-configuration.yaml
The already-applied configuration check now compares the source and applied SHA256 values using valid Bash equality syntax.

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

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: fixing the SHA idempotency test in nmstate-configuration.sh.
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.
Stable And Deterministic Test Names ✅ Passed PR changes only a shell condition in nmstate-configuration.yaml; no Ginkgo test titles were added or modified.
Test Structure And Quality ✅ Passed PR only changes a shell condition in nmstate-configuration.sh; no Ginkgo tests were added or modified, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed The PR only changes a shell comparison in a template YAML file; no new Ginkgo e2e tests or MicroShift-relevant OpenShift API usage were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo/e2e tests were added or modified; the PR only changes a shell condition in a YAML template, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only fixes a bash equality test in nmstate-configuration.sh; no scheduling manifests, controllers, or topology-related constraints were added.
Ote Binary Stdout Contract ✅ Passed Only a shell-template line changed under templates/; no OTE binary or suite-setup stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only changes a shell snippet in nmstate-configuration.yaml; it adds no Ginkgo e2e tests or network assumptions, so the check is not applicable.
No-Weak-Crypto ✅ Passed The only change fixes a shell test in nmstate-configuration.yaml; it uses sha256sum and introduces no weak ciphers, hashes, or custom crypto.
Container-Privileges ✅ Passed The PR only changes a shell comparison in nmstate-configuration.sh; no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation settings were added.
No-Sensitive-Data-In-Logs ✅ Passed The only log messages are generic status text; no passwords, tokens, PII, hostnames, or other sensitive data are exposed.
✨ 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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jul 10, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rbbratta: This pull request references Jira Issue OCPBUGS-98316, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

The applied-vs-config comparison used invalid [ test syntax without spaces, so bash never took the early-exit path and re-ran OVS cleanup on every service start.

Assisted-by: Cursor

- What I did

- How to verify it

- Description for the changelog

Summary by CodeRabbit

  • Bug Fixes
  • Improved detection of whether a network configuration has already been applied.
  • Prevented incorrect comparisons that could cause configuration updates to be skipped or reapplied unnecessarily.

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Jul 10, 2026
@cybertron

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cybertron, rbbratta
Once this PR has been reviewed and has the lgtm label, please assign umohnani8 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

@isabella-janssen

Copy link
Copy Markdown
Member

/retest-required

@openshift-ci

openshift-ci Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

@rbbratta: 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-ovn-upgrade 7788a2e link true /test e2e-aws-ovn-upgrade

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.

@cybertron

Copy link
Copy Markdown
Member

Looks like the upgrade job may be having issues in general. Worth noting that it's not affected by this change as the service is not used on AWS.

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

Labels

jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants