Skip to content

test: Skip ResourceGroup checks for deselected CRDs#1931

Merged
google-oss-prow[bot] merged 1 commit intoGoogleContainerTools:mainfrom
Camila-B:fix-rg-test
Nov 11, 2025
Merged

test: Skip ResourceGroup checks for deselected CRDs#1931
google-oss-prow[bot] merged 1 commit intoGoogleContainerTools:mainfrom
Camila-B:fix-rg-test

Conversation

@Camila-B
Copy link
Contributor

The TestClusterSelectorForCRD test occasionally fails because WatchForAllSyncs incorrectly expects a Current status for CRDs that were deselected via cluster name selectors and thus marked for deletion.

This change modifies the WatchForAllSyncs calls in TestClusterSelectorForCRD to include nomostest.SkipAllResourceGroupChecks().

Example test failure: https://oss.gprow.dev/view/gcs/oss-prow-build-kpt-config-sync/logs/kpt-config-sync-autopilot-rapid-latest/1987275225326161920

The TestClusterSelectorForCRD test occasionally fails because WatchForAllSyncs incorrectly expects a Current status for CRDs that were deselected via cluster name selectors and thus marked for deletion.

This change modifies the WatchForAllSyncs calls in TestClusterSelectorForCRD to include nomostest.SkipAllResourceGroupChecks()
@gemini-code-assist
Copy link

Summary of Changes

Hello @Camila-B, 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 an intermittent test failure within the TestClusterSelectorForCRD suite. The issue stemmed from WatchForAllSyncs incorrectly expecting a 'Current' status for Custom Resource Definitions (CRDs) that were deselected and slated for deletion. By incorporating nomostest.SkipAllResourceGroupChecks() into the test's synchronization logic, the system now correctly bypasses resource group status checks for these specific CRDs, thereby stabilizing the test and ensuring accurate behavior for resources undergoing deletion.

Highlights

  • Test Stability Improvement: Resolves an intermittent failure in the TestClusterSelectorForCRD test, which previously failed due to incorrect status expectations for deselected CRDs.
  • CRD Handling Correction: Modifies the WatchForAllSyncs calls to correctly handle Custom Resource Definitions (CRDs) that have been deselected via cluster name selectors and are marked for deletion.
  • Resource Group Check Skipping: Introduces nomostest.SkipAllResourceGroupChecks() to relevant WatchForAllSyncs calls, preventing the test from incorrectly expecting a 'Current' status for CRDs that are in the process of being deleted.
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 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 counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

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 addresses a flaky test, TestClusterSelectorForCRD, by skipping the ResourceGroup status check for deselected CRDs. The change correctly uses nomostest.SkipAllResourceGroupChecks() in the WatchForAllSyncs calls to avoid a race condition where the test would fail while waiting for a Current status on a CRD that is being deleted. The subsequent WatchForNotFound call correctly ensures that the deselected CRD is eventually removed. The fix is well-targeted and effectively resolves the described test flakiness.

Copy link
Contributor

@tiffanny29631 tiffanny29631 left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiffanny29631

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

@google-oss-prow google-oss-prow bot merged commit 17f88d2 into GoogleContainerTools:main Nov 11, 2025
6 checks passed
Camila-B added a commit to Camila-B/kpt-config-sync that referenced this pull request Jan 8, 2026
…ools#1931)

The TestClusterSelectorForCRD test occasionally fails because WatchForAllSyncs incorrectly expects a Current status for CRDs that were deselected via cluster name selectors and thus marked for deletion.

This change modifies the WatchForAllSyncs calls in TestClusterSelectorForCRD to include nomostest.SkipAllResourceGroupChecks()
google-oss-prow bot pushed a commit that referenced this pull request Jan 8, 2026
The TestClusterSelectorForCRD test occasionally fails because WatchForAllSyncs incorrectly expects a Current status for CRDs that were deselected via cluster name selectors and thus marked for deletion.

This change modifies the WatchForAllSyncs calls in TestClusterSelectorForCRD to include nomostest.SkipAllResourceGroupChecks()
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.

2 participants