-
Notifications
You must be signed in to change notification settings - Fork 4k
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
No longer eagerly fetch labels in repo rule attributes #23371
Conversation
Eager fetching of all labels listed in repo rule attributes as introduced as a performance optimization when to avoid restarts. Now that restarts are gone by default, this is no longer a benefit as it can cause unnecessary fetches and also create cycles where there wouldn't be any without this behavior (e.g. when two repos write each others labels into a file without resolving them).
@bazel-io fork 7.4.0 |
I fixed and deleted tests. |
We still have restarts for extensions, right? If an extension instantiates a repo rule, how does this affect it? |
We still have restarts for extensions, but their label attributes have never been fetched eagerly. Since repo rules are run lazily when needed, not inline when called by an extension, they will always be free of restarts even with this change. |
Eager fetching of all labels listed in repo rule attributes was introduced as a performance optimization to avoid costly restarts. Now that restarts are gone by default, this is no longer a benefit as it can cause unnecessary fetches and also create cycles where there wouldn't be any without this behavior (e.g. when two repos write each others labels into a file without resolving them). Work towards bazelbuild#19055 Closes bazelbuild#23371. PiperOrigin-RevId: 665744319 Change-Id: Ia27f207793a2da3fb8e37743b328483f9d45192c
Eager fetching of all labels listed in repo rule attributes was introduced as a performance optimization to avoid costly restarts.
Now that restarts are gone by default, this is no longer a benefit as it can cause unnecessary fetches and also create cycles where there wouldn't be any without this behavior (e.g. when two repos write each others labels into a file without resolving them).
Work towards #19055