Skip to content

Conversation

@Camila-B
Copy link
Contributor

Creates namespace proxy-test first before applying the rest of the proxy configuration
Test failure: https://oss.gprow.dev/view/gs/oss-prow-build-kpt-config-sync/logs/kpt-config-sync-standard-regular/1982900145926180864

@google-oss-prow google-oss-prow bot requested a review from janetkuo October 28, 2025 17:55
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from camila-b. For more information see the Kubernetes Code Review Process.

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

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 requested a review from sdowell October 28, 2025 17:55
@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 resolves an intermittent test failure in the end-to-end proxy test suite by ensuring a more robust setup for the test environment. Specifically, it modifies the test flow to explicitly create and confirm the readiness of the proxy-test Kubernetes namespace before proceeding with the deployment of other proxy-related resources. This prevents issues arising from resources being applied to a namespace that is not yet fully available, thereby improving the overall stability and reliability of the tests.

Highlights

  • Explicit Namespace Creation: The proxy-test namespace is now explicitly created and its readiness is awaited before applying the rest of the proxy configuration within the e2e test.
  • Namespace Definition Separation: The definition for the proxy-test Kubernetes Namespace has been extracted from tinyproxy.yaml into its own dedicated file, namespace.yaml.
  • Improved Test Stability: This change directly addresses a reported test failure by preventing race conditions where proxy resources might be applied before the target namespace is fully provisioned, enhancing the reliability of the proxy e2e tests.
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.

@Camila-B Camila-B requested review from tiffanny29631 and removed request for janetkuo October 28, 2025 17:57
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 correctly addresses a test failure by ensuring the proxy-test namespace is created before other resources are applied within it. The changes involve separating the namespace definition into its own file and updating the test to apply it explicitly. My review includes suggestions to refine the resource application and deletion logic to be more explicit and avoid potential errors during test cleanup.

@Camila-B
Copy link
Contributor Author

/gemini review

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 race condition in the TestSyncingThroughAProxy e2e test by ensuring the proxy-test namespace is created and ready before applying other resources into it. The changes involve separating the namespace manifest into its own file, applying it first, and waiting for its status to become current. The test cleanup logic has also been improved to be more robust by explicitly waiting for resource deletion. The file structure under e2e/testdata/proxy has been reorganized to support this, which is a clean solution. The changes are correct and effectively fix the test flakiness.

@mikebz mikebz requested a review from Copilot October 31, 2025 16:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the proxy test setup by extracting the namespace resource into a separate file and updating the test to manage resources with explicit ordering.

Key changes:

  • Extracted namespace definition from tinyproxy.yaml to a dedicated namespace.yaml file
  • Updated test to apply namespace first and wait for it to be ready before applying other resources
  • Modified cleanup order to delete configs before deleting the namespace
  • Added a new proxy-enabled.yaml configuration file

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
e2e/testdata/proxy/namespace.yaml New file containing the extracted namespace definition for proxy-test
e2e/testdata/proxy/configs/tinyproxy.yaml Removed namespace definition (now in separate file)
e2e/testdata/proxy/configs/proxy-enabled.yaml New RootSync configuration for testing proxy functionality
e2e/testcases/proxy_test.go Updated to apply namespace separately with wait logic and proper cleanup ordering

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,18 @@
# Copyright 2025 Google LLC
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Updated copyright year to 2025, which is inconsistent with the copyright year (2022) used in other related files like tinyproxy.yaml and proxy-enabled.yaml.

Suggested change
# Copyright 2025 Google LLC
# Copyright 2022 Google LLC

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant