Skip to content

Record repo mapping entries for labels in module extension tags #25067

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

Closed
wants to merge 2 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jan 25, 2025

The mapping of an apparent name in a module extension tag's attr.label attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes #25063

@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Jan 25, 2025
@fmeum fmeum force-pushed the 25063-record-labels-in-tags branch 3 times, most recently from ce28c96 to 4b8ba71 Compare January 25, 2025 10:32
The mapping of an apparent name in a module extension tag's `attr.label`
attribute to the corresponding canonical name has to be recorded in the
lockfile so that instantiated repo rules don't reference the stale
repos.

Fixes bazelbuild#25063
@fmeum fmeum force-pushed the 25063-record-labels-in-tags branch from 4b8ba71 to 55cfff7 Compare January 25, 2025 10:34
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 for the quick fix!

@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jan 27, 2025
@Wyverald
Copy link
Member

Thanks for the lightning-fast investigation and fix! A couple of things:

  • Could you add an end-to-end regression test in bazel_lockfile_test.py?
  • Just to confirm, back in Lockfile fails to be regenerated when use_repo_rule statements are added #25063 you said "We need to include the repo mapping entries we applied to each extension's attr.label tag attributes into the extension's usages hash." This is not what we're doing here, right? We're just recording the repo mapping entries that are used to parse the label attrs.

@fmeum
Copy link
Collaborator Author

fmeum commented Jan 28, 2025

  • Could you add an end-to-end regression test in bazel_lockfile_test.py?

Done!

That's correct. Once I understood the cause, my first thought was that this info would go into the usage hash together with all other tag data, but folding it into the existing repo mapping entries field turned out to be much easier.

@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jan 28, 2025
@fmeum fmeum deleted the 25063-record-labels-in-tags branch January 28, 2025 17:00
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes bazelbuild#25063

Closes bazelbuild#25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes bazelbuild#25063

Closes bazelbuild#25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes bazelbuild#25063

Closes bazelbuild#25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
Wyverald pushed a commit that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes #25063

Closes #25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
Wyverald pushed a commit that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes #25063

Closes #25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
Wyverald pushed a commit that referenced this pull request Jan 28, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes #25063

Closes #25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
github-merge-queue bot pushed a commit that referenced this pull request Jan 28, 2025
…gs (#25115)

The mapping of an apparent name in a module extension tag's `attr.label`
attribute to the corresponding canonical name has to be recorded in the
lockfile so that instantiated repo rules don't reference the stale
repos.

Fixes #25063

Closes #25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb

---------

Co-authored-by: Fabian Meumertzheim <[email protected]>
fmeum added a commit to fmeum/bazel that referenced this pull request Jan 29, 2025
The mapping of an apparent name in a module extension tag's `attr.label` attribute to the corresponding canonical name has to be recorded in the lockfile so that instantiated repo rules don't reference the stale repos.

Fixes bazelbuild#25063

Closes bazelbuild#25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb
github-merge-queue bot pushed a commit that referenced this pull request Jan 29, 2025
…gs (#25110)

The mapping of an apparent name in a module extension tag's `attr.label`
attribute to the corresponding canonical name has to be recorded in the
lockfile so that instantiated repo rules don't reference the stale
repos.

Fixes #25063

Closes #25067.

PiperOrigin-RevId: 720592796
Change-Id: Ia202ca4a8482a81da8085ee18ecaca5fe233bddb

Commit
59cb6fe

Co-authored-by: Fabian Meumertzheim <[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.

Lockfile fails to be regenerated when use_repo_rule statements are added
3 participants