Skip to content

Fetch the ginkgo binary version from the e2e tests module - #533

Open
fedepaol wants to merge 3 commits into
openperouter:mainfrom
fedepaol:rightginkgo
Open

Fetch the ginkgo binary version from the e2e tests module#533
fedepaol wants to merge 3 commits into
openperouter:mainfrom
fedepaol:rightginkgo

Conversation

@fedepaol

@fedepaol fedepaol commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Is this a BUG FIX or a FEATURE ?:

Uncomment only one, leave it on its own line:

/kind bug
/kind cleanup
/kind feature
/kind design
/kind flake
/kind failing
/kind documentation
/kind regression
/kind example

What this PR does / why we need it:

Fixes the gingko mistmatch error when we bump the e2e go mod file but we forget to update the binary, end ensure both version are aligned.

Special notes for your reviewer:

Release note:

NONE

AI Guidelines Acknowledgment:

  • I have reviewed all changes in this PR, including any AI-generated content, and I take full responsibility for its accuracy and correctness.

Summary by CodeRabbit

  • Bug Fixes
    • Improved automated checks to detect mismatched Ginkgo versions between the main project and end-to-end tests.
    • Updated tooling to use the version specified for end-to-end testing, helping keep test environments consistent.
    • Added a dedicated continuous integration check that reports missing, unreadable, or inconsistent Ginkgo versions earlier in the validation process.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses issues related to Ginkgo version mismatches between the main project and the end-to-end testing module. By updating the dependency version and introducing a verification step in the build process, it ensures that the testing environment remains synchronized with the project's core dependencies, preventing potential runtime errors during test execution.

Highlights

  • Ginkgo Version Upgrade: Updated the Ginkgo dependency to version 2.32.0 in go.mod and go.sum.
  • Build Configuration Improvement: Modified the Makefile to fetch the Ginkgo version specifically from the e2etests module, ensuring consistency.
  • New Validation Check: Added a new make target 'check-ginkgo-version' to detect and prevent version mismatches between the main module and the e2etests module.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request upgrades the github.com/onsi/ginkgo/v2 dependency to v2.32.0 and introduces a new check-ginkgo-version Makefile target to ensure version alignment between the main module and the e2e tests. Feedback on these changes includes stripping the 'v' prefix from the Ginkgo version check in the Makefile to prevent redundant installations, and integrating the new version check target into the lint pipeline so it runs automatically.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Makefile
CONTROLLER_TOOLS_VERSION ?= v0.19.0
KUBECTL_VERSION ?= v1.27.0
GINKGO_VERSION ?= $(shell go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2)
GINKGO_VERSION ?= $(shell cd e2etests && go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2)

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.

medium

The go list command returns the version with a leading v (e.g., v2.32.0). However, ginkgo version prints the version without the v prefix (e.g., Ginkgo Version 2.32.0). This causes the grep -q $(GINKGO_VERSION) check in the ginkgo target (line 326) to always fail, leading to redundant go install executions on every run.

Since go install requires the v prefix, we should keep GINKGO_VERSION with the v prefix, but strip it when performing the version check in the ginkgo target. For example, you can update line 326 to:

test -s $(LOCALBIN)/ginkgo && $(LOCALBIN)/ginkgo version | grep -q $(GINKGO_VERSION:v%=%) || \

Comment thread Makefile
Comment on lines +426 to +433
.PHONY: check-ginkgo-version
check-ginkgo-version: ## Verify ginkgo version is aligned between go.mod and e2etests/go.mod
@MAIN_VERSION=$$(go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2); \
E2E_VERSION=$$(cd e2etests && go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2); \
if [ "$$MAIN_VERSION" != "$$E2E_VERSION" ]; then \
echo "ERROR: ginkgo version mismatch: go.mod has $$MAIN_VERSION, e2etests/go.mod has $$E2E_VERSION"; \
exit 1; \
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.

medium

The new check-ginkgo-version target is defined but not integrated into any of the standard pipeline targets (such as lint or test). This means the check will not run automatically during local development or CI workflows unless explicitly invoked.

Consider adding check-ginkgo-version as a dependency to the lint target to ensure version alignment is automatically verified:

.PHONY: lint
lint: $(GOLANGCI_LINT_CUSTOM_BIN) check-ginkgo-version

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0502a65c-5a0e-4bce-aa8a-4b29100993ea

📥 Commits

Reviewing files that changed from the base of the PR and between 971c964 and d3d3a03.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml
  • Makefile
📝 Walkthrough

Walkthrough

The Makefile now reads Ginkgo’s version from the e2e module and checks it against the root module. A standalone CI job runs this validation.

Changes

Ginkgo version alignment

Layer / File(s) Summary
Align Ginkgo version sources
Makefile
GINKGO_VERSION is computed from the e2etests module.
Enforce version consistency
Makefile, .github/workflows/ci.yaml
The new check-ginkgo-version target compares module versions and fails on lookup errors, missing versions, or mismatches. The standalone CI job runs the target.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: maiqueb

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: obtaining the Ginkgo binary version from the e2e tests module.
Description check ✅ Passed The description identifies the cleanup, explains the version-alignment purpose, records no release note, and includes the acknowledgment.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 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.

Read the ginkgo CLI version from e2etests/go.mod instead of the
main go.mod, since that is the module where ginkgo is used as
a test runner.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bump ginkgo from v2.28.3 to v2.32.0 in the main module to match
the version in e2etests/go.mod, avoiding CLI/package version
mismatch when building the host validator.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@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: 2

🤖 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 @.github/workflows/ci.yaml:
- Line 79: Update the CI workflow around the unconditional validation step
containing make check-ginkgo-version so it runs for Dependabot updates as well
as other pull requests. Keep the existing generated-code regeneration exclusion
for dependabot[bot], but ensure the Ginkgo synchronization check is not gated by
that condition.

In `@Makefile`:
- Around line 435-440: Update the check-ginkgo-version recipe around the
MAIN_VERSION and E2E_VERSION assignments to fail closed when either go list
command fails, such as by enabling errexit or explicitly checking each command’s
status. Ensure a failed lookup cannot leave both variables empty and allow the
version comparison to return success.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f6f77a30-828b-46d1-960c-12e6cd2e2f61

📥 Commits

Reviewing files that changed from the base of the PR and between 925067d and 76548f8.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • .github/workflows/ci.yaml
  • Makefile

Comment thread .github/workflows/ci.yaml Outdated
Comment thread Makefile Outdated

@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: 2

🤖 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 @.github/workflows/ci.yaml:
- Around line 87-97: Add a job-level permissions block to check-ginkgo-version
granting only contents: read, while preserving the existing checkout, Go setup,
and make check-ginkgo-version steps.
- Around line 90-91: Update the actions/checkout step in the CI workflow to set
persist-credentials to false, preventing the GITHUB_TOKEN from being stored in
the local Git configuration before the repository Makefile runs.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 77858775-0427-466c-a14c-37557406fb35

📥 Commits

Reviewing files that changed from the base of the PR and between 76548f8 and 971c964.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml
  • Makefile

Comment thread .github/workflows/ci.yaml
Comment thread .github/workflows/ci.yaml
Add a check-ginkgo-version Makefile target that fails if the ginkgo
version in go.mod and e2etests/go.mod diverge. Run it in CI as part
of the check-generated job.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant