Skip to content

[6.6.0] Add dummy //:maven-srcs target for 6.6.0 release#28208

Closed
mbland wants to merge 1 commit intobazelbuild:release-6.6.0from
mbland:6.6.0-dummy-maven-srcs-to-fix-rocky-linux-release-job
Closed

[6.6.0] Add dummy //:maven-srcs target for 6.6.0 release#28208
mbland wants to merge 1 commit intobazelbuild:release-6.6.0from
mbland:6.6.0-dummy-maven-srcs-to-fix-rocky-linux-release-job

Conversation

@mbland
Copy link
Copy Markdown

@mbland mbland commented Jan 9, 2026

Fixes the following Rocky Linux 8 Bazel release job failure described in #27463 (comment):

ERROR: Skipping ':maven-srcs': no such target '//:maven-srcs':
  target 'maven-srcs' not declared in package ''
  defined by /workdir/BUILD
WARNING: Target pattern parsing failed.
ERROR: no such target '//:maven-srcs':
  target 'maven-srcs' not declared in package ''
  defined by /workdir/BUILD

Reproduced and confirmed the fix by executing the failing release job command locally:

./bazel-bin/src/bazel build --nobuild \
  :bazel-srcs :bootstrap-jars :maven-srcs //src:derived_java_srcs

Part of #28177.


Background from:

bazelbuild/continuous-integration/pipelines/bazel-release.yml defines the failing Rocky Linux 8 job. (This was a CentOS 7 job prior to bazelbuild/continuous-integration#2281.)

3d7937e introduced the //:maven-srcs target in Bazel 7.0.0. All the other targets in the failing bazel build invocation exist on the Bazel 6.6.0 branch.

bazelbuild/continuous-integration@14a0378 added the //:maven-srcs target to this job as an attempt to fix MODULE.bazel.lock generation.

Neither the lock file nor the //:maven-srcs target itself should have any bearing on the Bazel 6.6.0 release. This dummy target fixes the build failure and allows the release to proceed.

Fixes the following Rocky Linux 8 Bazel release job failure described in
bazelbuild#27463 (comment):

```txt
ERROR: Skipping ':maven-srcs': no such target '//:maven-srcs':
  target 'maven-srcs' not declared in package ''
  defined by /workdir/BUILD
WARNING: Target pattern parsing failed.
ERROR: no such target '//:maven-srcs':
  target 'maven-srcs' not declared in package ''
  defined by /workdir/BUILD
```

Reproduced and confirmed the fix by executing the failing release job
command locally:

```txt
./bazel-bin/src/bazel build --nobuild \
  :bazel-srcs :bootstrap-jars :maven-srcs //src:derived_java_srcs
```

Part of bazelbuild#28177.

---

Background from:

- bazelbuild#27463 (comment)

`bazelbuild/continuous-integration/pipelines/bazel-release.yml` defines
the failing Rocky Linux 8 job. (This was a CentOS 7 job prior to
bazelbuild/continuous-integration#2281.)

- https://github.com/bazelbuild/continuous-integration/blob/agent-0.2.7/pipelines/bazel-release.yml#L85

bazelbuild/bazel@3d7937e introduced
the `//:maven-srcs` target in Bazel 7.0.0. All the other targets in the
failing `bazel build` invocation exist on the Bazel 6.6.0 branch.

bazelbuild/continuous-integration@14a0378
added the `//:maven-srcs` target to this job as an attempt to fix
`MODULE.bazel.lock` generation.

Neither the lock file nor the `//:maven-srcs` target itself should have
any bearing on the Bazel 6.6.0 release. This dummy target fixes the
build failure and allows the release to proceed.
@mbland mbland requested a review from a team as a code owner January 9, 2026 23:37
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jan 9, 2026
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 adds a dummy //:maven-srcs target to fix a build failure for the 6.6.0 release. The change is implemented as a genrule and appears correct and sufficient for the stated purpose. Other changes are minor code re-ordering.

@iancha1992 iancha1992 added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jan 9, 2026
@mbland
Copy link
Copy Markdown
Author

mbland commented Jan 9, 2026

@iancha1992 @meteorcloudy The Windows builds all appear to have failed in the same, arcane way unrelated to this change:

archive.extract(member, dest_dir)
Setting up comparison repository...
A subdirectory or file C:\b already exists.
Cannot create a file when that file already exists.
Traceback (most recent call last):
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 4695, in <module>
    sys.exit(main())
             ^^^^^^
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 4663, in main
    execute_commands(
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 1330, in execute_commands
    build_targets, test_targets, coverage_targets, index_targets = calculate_targets(
                                                                   ^^^^^^^^^^^^^^^^^^
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 2254, in calculate_targets
    filter_unchanged_targets(
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 2417, in filter_unchanged_targets
    ws_setup_func(False)
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 1306, in PrepareRepoInCwd
    execute_batch_commands(task_config.get("batch_commands", None), print_cmd_groups)
  File "c:\b\bk-windows-kmds\bazel\bazel-bazel-github-presubmit\bazelci.py", line 1821, in execute_batch_commands
    return subprocess.run(batch_commands, shell=True, check=True, env=os.environ).returncode
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python3\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'mkdir C:\b&mklink /J C:\b\bazeltest_external %OUTPUT_BASE:/=\%\external' returned non-zero exit status 1.

@iancha1992 iancha1992 changed the title Add dummy //:maven-srcs target for 6.6.0 release [6.6.0] Add dummy //:maven-srcs target for 6.6.0 release Jan 9, 2026
@iancha1992 iancha1992 added this to the 6.6.0 release blockers milestone Jan 9, 2026
@mbland
Copy link
Copy Markdown
Author

mbland commented Jan 9, 2026

Retrying the Windows shards didn't seem to help. It seems like the Windows build VMs are wedged, since the mkdir C:\b step of the .bazelci/presubmit.yml Windows job breaks on a preexisting C:\b directory.

@meteorcloudy
Copy link
Copy Markdown
Member

I'm fixing the release pipeline for 6.6.0, this may not be needed.

@iancha1992 iancha1992 closed this Jan 12, 2026
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jan 12, 2026
@mbland mbland deleted the 6.6.0-dummy-maven-srcs-to-fix-rocky-linux-release-job branch January 13, 2026 12:18
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.

3 participants