Skip to content

ci: fix Verify workflow false positive on stale stat info - #8115

Closed
bryan-cox wants to merge 1 commit into
openshift:mainfrom
bryan-cox:fix-verify-featuregates
Closed

bryan-cox wants to merge 1 commit into
openshift:mainfrom
bryan-cox:fix-verify-featuregates

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Mar 30, 2026

Copy link
Copy Markdown
Member

Summary

  • git update-index --refresh returns non-zero when file timestamps differ from the index, even when file content is unchanged
  • With bash -e (default in GitHub Actions), the Verify step fails immediately on that line before reaching the actual content diff checks
  • This has been causing Verify to fail on all PRs since PR CNTRLPLANE-3037: Introduce envtest for integration tests alternative #8089 merged, falsely reporting the feature gate YAML files as dirty
  • Fix: ignore the exit code of git update-index --refresh since the subsequent git diff-files, git diff-index, and git diff --exit-code commands perform the real content verification

Test plan

  • Verify passes on this PR

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Summary by CodeRabbit

Release Notes

This release contains no user-visible changes. The update includes internal workflow improvements to enhance the reliability of our continuous integration process.

@openshift-ci-robot

Copy link
Copy Markdown

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

openshift-ci Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 30, 2026
PR openshift#8089 copied feature gate YAML files from api/ to install assets,
but the copies were made before PR openshift#7774 added ExternalOIDCWithUpstreamParity
to the source files. Regenerate the copies via `make api`.

Also make `git update-index --refresh` non-fatal in the Verify workflow,
since it can return non-zero on timestamp-only changes even when content
is identical.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryan-cox
bryan-cox force-pushed the fix-verify-featuregates branch from 24c8223 to 10ec53e Compare March 30, 2026 16:48
@openshift-ci openshift-ci Bot added area/cli Indicates the PR includes changes for CLI and removed do-not-merge/needs-area labels Mar 30, 2026
@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: e819dda3-1558-422c-96c7-3062189ab24c

📥 Commits

Reviewing files that changed from the base of the PR and between 9fda149 and 10ec53e.

⛔ Files ignored due to path filters (4)
  • cmd/install/assets/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml is excluded by !cmd/install/assets/**/*.yaml
  • cmd/install/assets/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml is excluded by !cmd/install/assets/**/*.yaml
  • cmd/install/assets/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml is excluded by !cmd/install/assets/**/*.yaml
  • cmd/install/assets/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml is excluded by !cmd/install/assets/**/*.yaml
📒 Files selected for processing (1)
  • .github/workflows/verify.yaml

📝 Walkthrough

Walkthrough

The .github/workflows/verify.yaml file's verification step has been modified to append || true to the git update-index --refresh command. This change makes the command tolerant of failures, allowing the workflow step to continue executing even if the command returns a non-zero exit code. The subsequent git diff-index, git diff-files, and git diff --exit-code checks remain unchanged.

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

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

@bryan-cox

Copy link
Copy Markdown
Member Author

/close

@openshift-ci openshift-ci Bot closed this Mar 30, 2026
@openshift-ci

openshift-ci Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: Closed this PR.

Details

In response to this:

/close

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cli Indicates the PR includes changes for CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants