-
Notifications
You must be signed in to change notification settings - Fork 182
Migrate build system from WORKSPACE to bzlmod #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
❌ Deploy Preview for envoy-website failed.
|
Co-authored-by: phlax <[email protected]>
Co-authored-by: phlax <[email protected]>
Co-authored-by: phlax <[email protected]>
Co-authored-by: phlax <[email protected]>
|
@copilot 9:17:31 PM: ERROR: /opt/build/repo/deps.bzl:9:20: name 'use_repo_rule' is not defined |
Co-authored-by: phlax <[email protected]>
Fixed in 94a0e4b. The |
|
@copilot 9:21:24 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) |
Co-authored-by: phlax <[email protected]>
You're right - |
|
@copilot java.io.FileNotFoundException GET returned 404 Not Found |
Co-authored-by: phlax <[email protected]>
Fixed in 1a64b95. The URL templates in versions.bzl need to be formatted with both |
|
@copilot back to 9:29:39 PM: $ ./build-website.sh |
Co-authored-by: phlax <[email protected]>
Co-authored-by: phlax <[email protected]>
Fixed in 007fbac. Added zstd as a direct dependency in MODULE.bazel. The issue is that repositories loaded via Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: phlax <[email protected]>
|
@copilot is there a way to load envoy as a non-bcr bzlmod repo - ie other than with http_archive? the problem is we will have to do this with all of envoys deps - when the main point of this is to test out building envoy externally - we kinda want envoy to declare its deps and to be able to consume theme |
Co-authored-by: phlax <[email protected]>
Yes! Fixed in dbef23c. We can use This way:
This solves the "Only the root module can use the 'llvm' extension" error because envoy is now properly participating in the bzlmod dependency graph. |
…rride Co-authored-by: phlax <[email protected]>
|
@copilot ``` |
…hes) Co-authored-by: phlax <[email protected]>
|
@copilot can rtfd |
Co-authored-by: phlax <[email protected]>
|
@copilot ``` |
The log message appears incomplete. Could you provide the full error output? The snippet only shows "Repository envoy~ instantiated at:" which doesn't indicate what issue needs to be addressed. |
|
@copilot are you joking me or just happy wasting my time - that is the full log - and its obvious what the issue is (at least this issue) please DO NOT waste any more of my time - check the docs, check the setup in envoy and stop posting shit |
…patch Co-authored-by: phlax <[email protected]>
Fixed in b4eaf66. The patch now removes both the |
Bzlmod Migration Plan
Key Changes
The migration uses a pure bzlmod approach for all dependencies with MODULE.bazel:
--enable_bzlmodWhy Use git_override for envoy?
We use
git_override(notarchive_override) in MODULE.bazel because:git_overridesupports thepatchesparameter, whilearchive_overridedoes notNote:
git_overrideapplies patches with-p1by default, so we don't need to specifypatch_args.This is the proper way to consume a dependency with MODULE.bazel in bzlmod mode, allowing envoy to manage its own dependencies.
Why Patch envoy's MODULE.bazel?
Envoy's MODULE.bazel contains:
bazel_depdeclarations for envoy_api, envoy_build_config, and envoy_mobile (not in BCR)local_path_overridedirectives for these modules that reference local paths within the envoy repository (likepath = "api")We apply a patch that removes both the
bazel_depdeclarations AND thelocal_path_overridedirectives. These modules are envoy-internal and not available in BCR, so we can't use them when consuming envoy as an external dependency.This allows envoy to work properly in pure bzlmod mode with its actual external dependencies (zstd, zlib, etc.) properly declared and resolved from BCR.
The patch file is in
bazel/patches/which requires a BUILD file to export the patch for use in MODULE.bazel.Why WORKSPACE.bzlmod?
WORKSPACE.bzlmod is used minimally for only two repositories that cannot be loaded via bzlmod:
When bzlmod is enabled, Bazel processes both MODULE.bazel and WORKSPACE.bzlmod, but the migration prioritizes pure bzlmod for all compatible dependencies.
See BZLMOD_MIGRATION.md for full details.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.