Skip to content

fix anp e2e#5790

Merged
oilbeater merged 1 commit intomasterfrom
fix/anp
Oct 13, 2025
Merged

fix anp e2e#5790
oilbeater merged 1 commit intomasterfrom
fix/anp

Conversation

@oilbeater
Copy link
Copy Markdown
Collaborator

Pull Request

What type of this PR

Examples of user facing changes:

  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

@cursor
Copy link
Copy Markdown

cursor bot commented Oct 13, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 30.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 13, 2025
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @oilbeater, 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 issue with Admin Network Policy (ANP) end-to-end tests by pinning the versions of the ANP and Baseline ANP Custom Resource Definitions (CRDs) used in the test environment. This ensures that the tests rely on a stable and known version of the CRDs, preventing potential failures due to upstream changes in the main branch and thus fixing the e2e tests.

Highlights

  • Admin Network Policy CRD Version Pinning: Updated the ANP_CR_YAML and BANP_CR_YAML variables in the Makefile to reference the v0.1.7 tag of the kubernetes-sigs/network-policy-api repository instead of the main branch head.
  • E2E Test Stability: This change aims to improve the stability and reliability of Admin Network Policy (ANP) end-to-end tests by ensuring they use a consistent and versioned set of CRD definitions.
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.

@dosubot dosubot bot added the test automation tests label Oct 13, 2025
Copy link
Copy Markdown
Contributor

@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 updates the URLs for AdminNetworkPolicy (ANP) and BaselineAdminNetworkPolicy (BANP) Custom Resource Definitions in the Makefile. By pinning them to a specific version tag (v0.1.7) instead of the main branch, you are improving the stability and reproducibility of the E2E tests, which is a great change. My review includes a suggestion to introduce a variable for the version number to improve maintainability and align with the existing style in the file.

Makefile Outdated
Comment on lines +81 to +82
ANP_CR_YAML = https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/v0.1.7/config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml
BANP_CR_YAML = https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/v0.1.7/config/crd/experimental/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml
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

For better maintainability and consistency with how other versions are managed in this Makefile, it's a good practice to define the version v0.1.7 in a variable and reuse it. This makes it easier to update in the future.

You may want to move the NETWORK_POLICY_API_VERSION definition to be with the other version variables for better organization.

NETWORK_POLICY_API_VERSION = v0.1.7
ANP_CR_YAML = https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/$(NETWORK_POLICY_API_VERSION)/config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml
BANP_CR_YAML = https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/refs/tags/$(NETWORK_POLICY_API_VERSION)/config/crd/experimental/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 18459910919

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 21.088%

Totals Coverage Status
Change from base Build 18455311602: 0.0%
Covered Lines: 10707
Relevant Lines: 50772

💛 - Coveralls

@oilbeater oilbeater merged commit 509abda into master Oct 13, 2025
73 checks passed
@oilbeater oilbeater deleted the fix/anp branch October 13, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. test automation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants