Skip to content

Conversation

@iancha1992
Copy link
Member

RELNOTES: Modules backed by http_archive or git_repository no longer require a MODULE.bazel file to be contained in the source archive.

Fixes #26217

Closes #26332.

PiperOrigin-RevId: 778139801
Change-Id: Ie1d219ce1c219c8bae7657be929e54b9b467abf9

Commit c5a562b

RELNOTES: Modules backed by `http_archive` or `git_repository` no longer require a MODULE.bazel file to be contained in the source archive.

Fixes bazelbuild#26217

Closes bazelbuild#26332.

PiperOrigin-RevId: 778139801
Change-Id: Ie1d219ce1c219c8bae7657be929e54b9b467abf9
@iancha1992 iancha1992 requested a review from a team as a code owner July 2, 2025 21:14
@iancha1992 iancha1992 added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Jul 2, 2025
@iancha1992 iancha1992 enabled auto-merge July 2, 2025 21:15
@meteorcloudy
Copy link
Member

@fmeum PTAL

@fmeum
Copy link
Collaborator

fmeum commented Jul 6, 2025

@iancha1992 This patch should fix the test:

diff --git a/src/test/py/bazel/bzlmod/mod_command_test.py b/src/test/py/bazel/bzlmod/mod_command_test.py
index f032bbc1ae..5915e6724e 100644
--- a/src/test/py/bazel/bzlmod/mod_command_test.py
+++ b/src/test/py/bazel/bzlmod/mod_command_test.py
@@ -476,9 +476,9 @@ class ModCommandTest(test_base.TestBase):
     stdout.pop(44)
     self.assertRegex(stdout.pop(49), r'^  urls = \[".*"\],$')
     self.assertRegex(stdout.pop(49), r'^  integrity = ".*",$')
-    self.assertRegex(stdout.pop(53), r'^  remote_module_file_urls = \[".*"\],$')
+    self.assertRegex(stdout.pop(52), r'^  remote_module_file_urls = \[".*"\],$')
     self.assertRegex(
-        stdout.pop(53), r'^  remote_module_file_integrity = ".*",$'
+        stdout.pop(52), r'^  remote_module_file_integrity = ".*",$'
     )
     # lines after '# Rule http_archive defined at (most recent call last):'
     stdout.pop(13)
@@ -545,8 +545,8 @@ class ModCommandTest(test_base.TestBase):
             '  strip_prefix = "",',
             '  remote_file_urls = {},',
             '  remote_file_integrity = {},',
-            # pop(53) -- remote_module_file_urls=[...]
-            # pop(53) -- remote_module_file_integrity=...
+            # pop(52) -- remote_module_file_urls=[...]
+            # pop(52) -- remote_module_file_integrity=...
             '  remote_patches = {},',
             '  remote_patch_strip = 0,',
             ')',

@iancha1992
Copy link
Member Author

iancha1992 commented Jul 7, 2025

@iancha1992 This patch should fix the test:

diff --git a/src/test/py/bazel/bzlmod/mod_command_test.py b/src/test/py/bazel/bzlmod/mod_command_test.py
index f032bbc1ae..5915e6724e 100644
--- a/src/test/py/bazel/bzlmod/mod_command_test.py
+++ b/src/test/py/bazel/bzlmod/mod_command_test.py
@@ -476,9 +476,9 @@ class ModCommandTest(test_base.TestBase):
     stdout.pop(44)
     self.assertRegex(stdout.pop(49), r'^  urls = \[".*"\],$')
     self.assertRegex(stdout.pop(49), r'^  integrity = ".*",$')
-    self.assertRegex(stdout.pop(53), r'^  remote_module_file_urls = \[".*"\],$')
+    self.assertRegex(stdout.pop(52), r'^  remote_module_file_urls = \[".*"\],$')
     self.assertRegex(
-        stdout.pop(53), r'^  remote_module_file_integrity = ".*",$'
+        stdout.pop(52), r'^  remote_module_file_integrity = ".*",$'
     )
     # lines after '# Rule http_archive defined at (most recent call last):'
     stdout.pop(13)
@@ -545,8 +545,8 @@ class ModCommandTest(test_base.TestBase):
             '  strip_prefix = "",',
             '  remote_file_urls = {},',
             '  remote_file_integrity = {},',
-            # pop(53) -- remote_module_file_urls=[...]
-            # pop(53) -- remote_module_file_integrity=...
+            # pop(52) -- remote_module_file_urls=[...]
+            # pop(52) -- remote_module_file_integrity=...
             '  remote_patches = {},',
             '  remote_patch_strip = 0,',
             ')',

@fmeum Done! Thank you

@gholms
Copy link
Contributor

gholms commented Jul 7, 2025

How annoying would a 7 backport for this be?

@fmeum
Copy link
Collaborator

fmeum commented Jul 8, 2025

How annoying would a 7 backport for this be?

The backport itself should be fine.

@meteorcloudy What do you think of one more 7.x release closer to the Bazel 9 release?

@meteorcloudy
Copy link
Member

What do you think of one more 7.x release closer to the Bazel 9 release?

SG, if this is actually doable, we can mark it as potential cherry pick for 7

@fmeum
Copy link
Collaborator

fmeum commented Jul 8, 2025

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jul 8, 2025
@iancha1992 iancha1992 added this pull request to the merge queue Jul 8, 2025
Merged via the queue into bazelbuild:release-8.4.0 with commit 9541980 Jul 8, 2025
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jul 8, 2025
@iancha1992 iancha1992 added potential 7.x cherry-picks Potential cherry-picks for the next 7.x release. We'll consider a new 7.x release if enough issues and removed potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone labels Jul 8, 2025
@iancha1992 iancha1992 removed the potential 7.x cherry-picks Potential cherry-picks for the next 7.x release. We'll consider a new 7.x release if enough issues label Sep 12, 2025
dd-mergequeue bot pushed a commit to DataDog/datadog-agent that referenced this pull request Nov 25, 2025
### Motivation
See:
- https://github.com/bazelbuild/bazel/releases/tag/8.4.0
- https://github.com/bazelbuild/bazel/releases/tag/8.4.1
- https://github.com/bazelbuild/bazel/releases/tag/8.4.2

(8.5.0 is due soon)

#### Cache & reliability
- 8.4.0 honors XDG_CACHE_HOME on macOS, which will definitely help ([ABLD-300](https://datadoghq.atlassian.net/browse/ABLD-300)): bazelbuild/bazel#26773
- 8.4.1 fixes a race condition affecting repository contents cache: bazelbuild/bazel#26950
- 8.4.0 fixes another race condition affecting workers: bazelbuild/bazel#26475

#### Modules
- 8.4.0 brings new `--module_mirrors` flag for fallback URLs when primary sources are slow/unavailable: bazelbuild/bazel#26850
- 8.4.0 avoids the need for dummy `MODULE.bazel` files with `git_repository`/`http_archive`: bazelbuild/bazel#26462
- 8.4.2 fixes a maintenance annoyance for `MODULE.bazel.lock` file: bazelbuild/bazel#27111

#### Platforms
- 8.4.0 allows to mitigate the long path issue with **MSVC on Windows**: bazelbuild/bazel#26532
- 8.4.2 fixes **macOS** compatibility issues: bazelbuild/bazel#27014

[ABLD-300]: https://datadoghq.atlassian.net/browse/ABLD-300?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: regis.desgroppes <[email protected]>
chouquette pushed a commit to DataDog/datadog-agent that referenced this pull request Nov 27, 2025
### Motivation
See:
- https://github.com/bazelbuild/bazel/releases/tag/8.4.0
- https://github.com/bazelbuild/bazel/releases/tag/8.4.1
- https://github.com/bazelbuild/bazel/releases/tag/8.4.2

(8.5.0 is due soon)

#### Cache & reliability
- 8.4.0 honors XDG_CACHE_HOME on macOS, which will definitely help ([ABLD-300](https://datadoghq.atlassian.net/browse/ABLD-300)): bazelbuild/bazel#26773
- 8.4.1 fixes a race condition affecting repository contents cache: bazelbuild/bazel#26950
- 8.4.0 fixes another race condition affecting workers: bazelbuild/bazel#26475

#### Modules
- 8.4.0 brings new `--module_mirrors` flag for fallback URLs when primary sources are slow/unavailable: bazelbuild/bazel#26850
- 8.4.0 avoids the need for dummy `MODULE.bazel` files with `git_repository`/`http_archive`: bazelbuild/bazel#26462
- 8.4.2 fixes a maintenance annoyance for `MODULE.bazel.lock` file: bazelbuild/bazel#27111

#### Platforms
- 8.4.0 allows to mitigate the long path issue with **MSVC on Windows**: bazelbuild/bazel#26532
- 8.4.2 fixes **macOS** compatibility issues: bazelbuild/bazel#27014

[ABLD-300]: https://datadoghq.atlassian.net/browse/ABLD-300?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: regis.desgroppes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants