-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Vendor mode does not include everything for an airgapped build #23243
Comments
Same issue with 8.0.0-pre.20240730.1 |
@AlexanderAA Could you check whether |
It does not, unfortunately.
|
|
@meteorcloudy Thanks, I am fetching everything without --nofetch of course! I also want to use the fetched vendor directory on an airgapped machine later. This does not work. To reproduce you would just need to P.S. I would be interested to see any practical example of a bzlmod repository that does not require network access. Is this even possible with bcr/bazel_dep? |
I just successfully tried the following on the Bazel repo itself:
@AlexanderAA Does this work for you? What errors are you seeing if not? |
This error message clearly shows |
bazel/src/test/py/bazel/bzlmod/bazel_vendor_test.py Lines 676 to 686 in 6205568
This test case is an exmaple. |
@fmeum Thanks, I repeated your steps, but I am trying to understand why you did not delete your local cache for this test. Is there an expectation that local cache will be copied to an airgapped machine/container? Summary of my testing:
Errors after removing local cache:
|
You are missing |
@AlexanderAA Did it work? I'll close this one for now, feel free to reopen if you discover any other problem! |
Description of the bug:
Bazel vendor command produces a directory with dependencies.
However, it is impossible to build or run any targets on an airgapped system with the produced directory.
Bazel still requires access to network (or access to the cache that was in use while building vendor directory).
According to #19563 (comment), airgapped builds should be possible.
Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Testing this in 7.3.0rc2:
Sometimes the error is:
Same happens when running bazel vendor without a particular target.
Without removing local cache bazel test works fine on local system, but obviously will fail on an airgapped host.
Is there a setting I am missing?
It looks like bazel is having difficulty resolving approximately the following after cache is removed:
Running bazel vendor with each of the above does not help.
Which operating system are you running Bazel on?
any
What is the output of
bazel info release
?release 7.3.0rc2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Instructions at https://bazel.build/run/build#running-bazel-airgapped do not resolve the problem.
The text was updated successfully, but these errors were encountered: