Skip to content

Remove unnecessary images in e2e test#1526

Merged
kmesh-bot merged 1 commit intokmesh-net:mainfrom
LiZhenCheng9527:e2e-clean
Nov 20, 2025
Merged

Remove unnecessary images in e2e test#1526
kmesh-bot merged 1 commit intokmesh-net:mainfrom
LiZhenCheng9527:e2e-clean

Conversation

@LiZhenCheng9527
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

During end-to-end testing, to free up more disk space, delete the kmesh build image after building kmesh.

Two identifiers were added in the run-e2e.sh script.

# default is false. When --build-image-clean is true, will clean up ghcr.io/kmesh-net/kmesh-build:latest 
--build-image-clean 

# defaule is false. Kmesh debug logs are only output when debug is set to true.
--debug

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @LiZhenCheng9527, 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 enhances the end-to-end testing environment by implementing automated cleanup of the Kmesh build Docker image to conserve disk space. It also introduces a new command-line option to enable detailed debugging logs during e2e test runs, providing more control over test execution and troubleshooting.

Highlights

  • E2E Test Cleanup: Introduced a new --build-image-clean flag in run_test.sh to automatically remove the kmesh-build Docker image after end-to-end tests, freeing up disk space.
  • Debugging Option for E2E: Added a --debug flag to run_test.sh to enable conditional output of Kmesh debug logs and capture pod logs during e2e test execution.
  • Makefile Integration: The Makefile's e2e target now defaults to using the --build-image-clean flag, ensuring image cleanup is performed automatically for standard e2e runs.
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.


Images now are gone, Disk space reclaimed, tests run, Debug logs now wait.

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
Copy Markdown

@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 introduces two new flags, --build-image-clean and --debug, to the end-to-end test script. The --build-image-clean flag is used to remove the kmesh build image after the build to save disk space, and it's now enabled by default for the make e2e target. The --debug flag enables debug logging. My review found a critical syntax error in the argument parsing logic for the new --debug flag which will prevent the script from running correctly. I've provided a fix for this issue.

Comment on lines +378 to +381
--debug
DEBUG=true
shift
;;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

There is a syntax error in the case statement. The pattern for the --debug flag is missing a closing parenthesis ). This will cause a syntax error and prevent the script from executing.

Suggested change
--debug
DEBUG=true
shift
;;
--debug)
DEBUG=true
shift
;;

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.81%. Comparing base (fe941b3) to head (3097c3e).
⚠️ Report is 4 commits behind head on main.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d6febf...3097c3e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LiZhenCheng9527 LiZhenCheng9527 force-pushed the e2e-clean branch 2 times, most recently from 150922f to c8d1b43 Compare November 20, 2025 12:42
@kmesh-bot kmesh-bot added size/M and removed size/S labels Nov 20, 2025
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
@hzxuzhonghu
Copy link
Copy Markdown
Member

/lgtm
/approve

@kmesh-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

@kmesh-bot kmesh-bot merged commit c5a02b3 into kmesh-net:main Nov 20, 2025
8 of 14 checks passed
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.

3 participants