-
Notifications
You must be signed in to change notification settings - Fork 316
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
Teach custom fallback version behavior #289
Conversation
This should come with some documentation in README |
52c3e8c
to
1465b23
Compare
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more nits
c443b14
to
f311f7a
Compare
Bump. |
@bb010g It seems like an interesting feature, but it's not obvious to me how to use it - could you give an example how to use this in practice? |
@philwo My organization is currently using Bazel 3.3.0 via a pinned, non-Bazelisk installation in CI. That CI setup is used for multiple repositories, so a coordinated upgrade is difficult. We would like to move to Bazelisk-based pinning for these repositories and just install Bazelisk to CI. Without this patch, moving to Bazelisk means that every consumer of this CI setup has to set up In the future, after teams aren't seeing warnings about Bazel fallback versions in CI, CI can upgrade (for some or all runs) to |
Additionally, on my developer setup, I can install Bazelisk and |
@sluongng Re-requesting review. (GitHub's button isn't doing anything.) |
Thank you for the detailed explanation! I think that's pretty cool. @fweikert WDYT? |
Bump. |
89b7618
to
f22b173
Compare
fallbackVersionFormat := GetEnvOrConfig("USE_BAZEL_FALLBACK_VERSION") | ||
fallbackVersionMode, fallbackVersion, hasFallbackVersionMode := strings_Cut(fallbackVersionFormat, ":") | ||
if !hasFallbackVersionMode { | ||
fallbackVersionMode, fallbackVersion, hasFallbackVersionMode = "silent", fallbackVersionMode, true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to assign hasFallbackVersionMode here
This allows for smoother migrations from globally pinned Bazel to project-local pinned Bazel using Bazelisk.
f22b173
to
fc621cb
Compare
Bump? |
I was waiting for the outstanding review comments to be resolved. Let's merge this PR now since it has been quite some time. |
This allows for smoother migrations from globally pinned Bazel to project-local pinned Bazel using Bazelisk.