Skip to content

fix(core): do not assume rules_python runtime #3134

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

Merged
merged 3 commits into from
Aug 11, 2025

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Aug 3, 2025

This change reverts the behaviour where we assume that particular
attributes will be always present - if bazel is doing autoloading for
WORKSPACE builds (7.6.1), then we will crash with attribute error.

I could not think how to add a unit test, which would test this fix
because it seems to only happen with a released version of rules_python
where we are not using local_repository override.

Fixes #3119

@aignas aignas requested a review from rickeylev as a code owner August 3, 2025 02:56
@aignas aignas added this to the 1.5.2 milestone Aug 3, 2025
@aignas aignas force-pushed the fix.py_runtime.missing_attrs branch from 2769bf9 to 9a49f15 Compare August 3, 2025 03:03
This was referenced Aug 3, 2025
@aignas aignas enabled auto-merge August 5, 2025 05:00
This change reverts the behaviour where we assume that particular
attributes will be always present - if bazel is doing autoloading
for WORKSPACE builds (7.6.1), then this will crash.

I could not think how to add a unit test, so just adding the fix here
and a comment.

Fixes bazel-contrib#3119
@aignas aignas force-pushed the fix.py_runtime.missing_attrs branch from 543213e to dc2d3c2 Compare August 9, 2025 11:56
@aignas aignas added this pull request to the merge queue Aug 11, 2025
Merged via the queue into bazel-contrib:main with commit acf7507 Aug 11, 2025
3 checks passed
@aignas aignas deleted the fix.py_runtime.missing_attrs branch August 11, 2025 03:36
aignas added a commit that referenced this pull request Aug 11, 2025
This change reverts the behaviour where we assume that particular
attributes will be always present - if bazel is doing autoloading for
WORKSPACE builds (7.6.1), then we will crash with attribute error.

I could not think how to add a unit test, which would test this fix
because it seems to only happen with a released version of rules_python
where we are not using `local_repository` override.

Fixes #3119

---------

Co-authored-by: Richard Levasseur <[email protected]>
(cherry picked from commit acf7507)

Cherry-pick notes: adjusted changelog to mention 1.5.2
mbland added a commit to mbland/rules_scala that referenced this pull request Aug 11, 2025
Resolves the Windows symlink breakage from
bazelbuild/bazel-central-registry#5490 by replacing
examples/crossbuild/protobuf.patch with a full copy. Bumps rules_python
to 1.5.2 for both Bzlmod and legacy WORKSPACE builds.

---

This is hopefully a temporary measure to unblock the next `rules_scala`
release. This will probably require creating a v7.1.1 tag to trigger a
new .bcr/presubmit.yml workflow.

See bazelbuild/bazel-central-registry#5506 for details about the
breakage. If and when bazelbuild/continuous-integration#2350 lands and
makes its way to the BCR presubmit build, we could restore the symlink.
Better yet, if protocolbuffers/protobuf#19679 ever lands, we could
remove this symlink and all the others.

Bumped `rules_python` to 1.5.2 for legacy `WORKSPACE` builds because it
contains bazel-contrib/rules_python#3134, which fixes
bazel-contrib/rules_python#3119.
simuons pushed a commit to bazel-contrib/rules_scala that referenced this pull request Aug 14, 2025
Resolves the Windows symlink breakage from
bazelbuild/bazel-central-registry#5490 by replacing
examples/crossbuild/protobuf.patch with a full copy. Bumps rules_python
to 1.5.2 for both Bzlmod and legacy WORKSPACE builds.

---

This is hopefully a temporary measure to unblock the next `rules_scala`
release. This will probably require creating a v7.1.1 tag to trigger a
new .bcr/presubmit.yml workflow.

See bazelbuild/bazel-central-registry#5506 for details about the
breakage. If and when bazelbuild/continuous-integration#2350 lands and
makes its way to the BCR presubmit build, we could restore the symlink.
Better yet, if protocolbuffers/protobuf#19679 ever lands, we could
remove this symlink and all the others.

Bumped `rules_python` to 1.5.2 for legacy `WORKSPACE` builds because it
contains bazel-contrib/rules_python#3134, which fixes
bazel-contrib/rules_python#3119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.5.0 breaks Bazel 7 WORKSPACE builds
2 participants