Skip to content

fix kernel-native enhanced mode build failed#1535

Merged
kmesh-bot merged 1 commit intokmesh-net:mainfrom
lec-bit:bugfix
Nov 29, 2025
Merged

fix kernel-native enhanced mode build failed#1535
kmesh-bot merged 1 commit intokmesh-net:mainfrom
lec-bit:bugfix

Conversation

@lec-bit
Copy link
Copy Markdown
Contributor

@lec-bit lec-bit commented Nov 27, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
Fixes compilation and startup failure issues in kernel-native enhanced mode
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Signed-off-by: lec-bit <glfhzmy@126.com>
@kmesh-bot kmesh-bot added the kind/bug Something isn't working label Nov 27, 2025
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @lec-bit, 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 a build failure in the kernel-native enhanced mode by refining the BPF specification generation process. It specifically excludes the dualengine component from the enhanced mode build and removes its corresponding import. Additionally, it adjusts the DNS proxy initialization logic to ensure proper setup based on the system's operational configuration, ultimately ensuring the enhanced mode builds correctly and functions as intended.

Highlights

  • Build Fix for Kernel-Native Enhanced Mode: Modified the BPF specification generation script (gen_bpf_specs.go) to prevent the dualengine package from being included in the pkgsEnhanced list, which was causing build failures in the kernel-native enhanced mode.
  • Dependency Removal: Removed the dualengine import from new_version_mapspec_loader_enhanced.go, aligning with the exclusion of dualengine from the enhanced mode build process.
  • DNS Proxy Initialization Logic: Adjusted the setupDNSProxy() call in controller.go to ensure it is executed conditionally within the WorkloadController's Run block, likely to ensure correct initialization based on the operational mode.
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.


Build fails, code in pain, Logic tweaked, a small change, Green light shines again.

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 effectively resolves a build failure in the kernel-native enhanced mode and corrects a critical runtime bug. The changes properly exclude dualengine packages from the enhanced mode build, which fixes the immediate build issue. Additionally, the logic for setting up the DNS proxy has been moved to execute only when the WorkloadController is available, which correctly prevents a potential nil pointer dereference and a subsequent panic. The fixes are well-implemented and significantly improve the project's stability.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.89%. Comparing base (fe941b3) to head (ec655e7).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/controller.go 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
pkg/controller/controller.go 0.00% <0.00%> (ø)

... and 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...ec655e7. Read the comment docs.

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

@LiZhenCheng9527
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kmesh-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LiZhenCheng9527

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 8b968ec into kmesh-net:main Nov 29, 2025
15 checks passed
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.

3 participants