Skip to content

Conversation

@Wyverald
Copy link
Member

The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.

The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Feb 12, 2024
@Wyverald
Copy link
Member Author

This is certainly simpler than maintaining a dist lockfile in the source tree, but it does mean we still access the internet during the build step (to generate the dist lockfile). That is probably better than accessing the internet during the test step (fewer concurrent accesses?), and can be mitigated by @fmeum's new lockfile format and/or cloning the BCR during CI setup.

default output base directory not writable?
@Wyverald
Copy link
Member Author

OK, this doesn't work. Accessing the registry during build really does mess certain jobs up. :/ We need the mitigations before this PR.

@fmeum
Copy link
Collaborator

fmeum commented Feb 12, 2024

OK, this doesn't work. Accessing the registry during build really does mess certain jobs up. :/ We need the mitigations before this PR.

The failure I see is:

ERROR: Error computing the main repository mapping: in module dependency chain <root> -> [email protected]: Error accessing registry https://bcr.bazel.build/: Unknown host: bcr.bazel.build

Shouldn't this be solved by tags = ["allow-network"]?

@Wyverald
Copy link
Member Author

Shouldn't this be solved by tags = ["allow-network"]?

hmm, on the genrule you mean? I thought this was because of "too many concurrent internet accesses" or whatever, since some shards did pass... but let me try that.

@Wyverald
Copy link
Member Author

Shouldn't this be solved by tags = ["allow-network"]?

hmm, on the genrule you mean? I thought this was because of "too many concurrent internet accesses" or whatever, since some shards did pass... but let me try that.

This didn't seem to help. Some shards still fail, and some still pass.

@iancha1992 iancha1992 added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Feb 13, 2024
Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

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

Thanks, I think this should work!

@Wyverald
Copy link
Member Author

thanks, requires-network was the missing piece... tests are passing, will import now (as this is blocking my other PRs)

copybara-service bot pushed a commit that referenced this pull request Feb 13, 2024
changes from PR #21302)

The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.

Change-Id: I5266bd1caf2e4cc3d7d18cb8695af73488064ae1
Signed-off-by: Xudong Yang <[email protected]>
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 13, 2024
@Wyverald Wyverald deleted the wyv-distfile-take2 branch February 13, 2024 21:46
Wyverald added a commit that referenced this pull request Feb 13, 2024
changes from PR #21302)

The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.

Change-Id: I5266bd1caf2e4cc3d7d18cb8695af73488064ae1
Signed-off-by: Xudong Yang <[email protected]>
Wyverald added a commit that referenced this pull request Feb 13, 2024
The MODULE.bazel.lock file we have in our source tree is generated by the version of Bazel specified in the .bazelversion file. We currently use this lockfile for our distribution archives, which means whenever we increment the lockfile version, we need to manually transform the checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that for the distribution archive. This lockfile doesn't have any module extension content, since we only need to make sure that no network access happens during tests that use the distribution archive. See #21283 (comment) for more context.

Closes #21302.

PiperOrigin-RevId: 606731749
Change-Id: If1f2b23066428b199e646059c76fa44ecfd2044a
github-merge-queue bot pushed a commit that referenced this pull request Feb 14, 2024
…21338)

The MODULE.bazel.lock file we have in our source tree is generated by
the version of Bazel specified in the .bazelversion file. We currently
use this lockfile for our distribution archives, which means whenever we
increment the lockfile version, we need to manually transform the
checked-in lockfile to make it work with HEAD Bazel too.

This commit generates a lockfile for HEAD Bazel on the fly and uses that
for the distribution archive. This lockfile doesn't have any module
extension content, since we only need to make sure that no network
access happens during tests that use the distribution archive. See
#21283 (comment)
for more context.

Closes #21302.

---------

Signed-off-by: Xudong Yang <[email protected]>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants