Bazel: Release 2.0 - December 2019

Created on 30 Oct 2019  路  31Comments  路  Source: bazelbuild/bazel

Cut date 2019-12-02.

release

Most helpful comment

I am mostly thinking from maintenance efforts from you guys perspective (you guys are doing awesome job 馃憤 ).

Thanks for clarifying it!

All 31 comments

Status of Bazel 2.0

To report a release-blocking bug, please file a bug using the Release blocker label, and cc me.

Task list:

The nightly tests of the last days look equally broken—mainly due to downstream projects not aware of the removal of native maven_jar. So we can as well take the latest nightly; since the only commit after the latest nightly is a bug fix, I will include it as well. So, I'll try 807ed23e4f53a5e008ec823e9c23e2c9baa36d0d as a baseline, but will slip it, if the next nightly is better.

Slipping baseline to db0e32ca6296e56e5314993fe9939bc7331768ec to fix the release pipeline.

Run of downstream projects pretty broken as a lot of projects are not yet prepared for the removal of native maven_jar.

On maven_jar breakages:

Looks like #10000 missed the baseline cut by a few hours. Could we please cherry-pick https://github.com/bazelbuild/bazel/commit/85e84f7812f04bc0dbc36376f31b6dd2d229b905 into the release?

@bchang @donaldchai

Thanks @aehlig!

Protobuf is also broken.
protocolbuffers/protobuf#6970

The issue with replacing of native maven_jar usages with {java|jvm}_maven_import_external is that it is conflicting with --incompatible_load_java_rules_from_bzl and is producing broken code. It's using java_import internally, but is not generating this line:

# This line is missing
load("@rules_java//java:defs.bzl", "java_import")

The breakage was flagged by @ejona86 in https://github.com/bazelbuild/bazel/issues/8746#issuecomment-541246615 and as the consequence, this issue was filed: [1].

IOW, there is currently no way forward strategy for such replacement. That why, the migration of native maven_jar is not ready yet, and consistently, the right course of action would be:

a. Try to fix: [1] in upcoming 2.0 release.
b. In case a. is not possible, roll back removal of maven_jar in Bazel 2.0 and schedule it for a later release, but only until after [1] is fixed.

[1] https://github.com/bazelbuild/bazel/issues/10046

incompatible_load_java_rules_from_bzl hasn't been enabled in Bazel 2.0. We can definitely make sure that that rules_java is automatically loaded in 2.x, and ready by the time incompatible_load_java_rules_from_bzl is enforced.

We're also extracting the Starlark jvm rules out of Bazel (https://github.com/bazelbuild/rules_jvm_external/pull/299), which allows for a separate release cadence from Bazel.

I tried using Bazel 2.0.0rc3 but after fetching bazel-2.0.0rc3-installer-linux-x86_64.sh and installing it locally, it is telling me that I have to download bazel binary again. I filed this issue.

New run on the downstream projects, as some have been fixed: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1303

@aehlig all of the known failures from maven_jar are now migrated, AFAICT.

I just spotted a typo in the new .bazelversion handling: #10388 might be interesting to cherry-pick (absolutely not critical though, I don't know what's the policy on those kind of minor fixes after a cut)

Creating rc4 with baseline db0e32ca6296e56e5314993fe9939bc7331768ec and cherry picks

  • 85e84f7812f04bc0dbc36376f31b6dd2d229b905
  • 84eae2ff550c433a3d0409cf2b5525059939439d
  • d5ae460f1581ddf27514b4be18255481b47b4075

Looking at the downstream projects, the following is to be noted.

So, according to our current policy, these breakages are not blocking. So, unless new problems are reported on the bug, I intend to release on late Thursday or early Friday (Munich time).

cc @vbatts @petemounce @excitoon as you're maintaining a bazel package

cc @mboes, @danjuv

@dslomov If you agree, I could create a patch release for Bazel 2.0 with https://github.com/bazelbuild/bazel/commit/2a8cc7075f741721563efd9dc050ca3458cde30b included to address https://github.com/bazelbuild/bazel/issues/10356#issuecomment-582397149.

@philwo sgtm

I'm preparing Bazel 2.0.1 with two cherry-picks:

https://github.com/bazelbuild/bazel/commit/9a823d9dab82631ff4600eff38d597807e8d1221: Prevent NPE on backwards seek on Chunker.
https://github.com/bazelbuild/bazel/commit/2a8cc7075f741721563efd9dc050ca3458cde30b: Do not fail or print errors when Shellzelisk cannot find a requested Bazel binary, if tools/bazel exists.

RELEASE_NUMBER=2.0.1
BASELINE_COMMIT=50514fc6c125750d7063d7feea2c302a44d2db6e
git clone https://github.com/bazelbuild/bazel.git ~/bazel-release-$RELEASE_NUMBER
cd ~/bazel-release-$RELEASE_NUMBER
scripts/release/release.sh create $RELEASE_NUMBER $BASELINE_COMMIT \
    9a823d9dab82631ff4600eff38d597807e8d1221 \
    2a8cc7075f741721563efd9dc050ca3458cde30b

Bazel 2.0.1rc1 is now available for those that want to try it out.

You can download it from:
https://releases.bazel.build/2.0.1/rc1/index.html

Just curious what might be the reason why people cannot move to Bazel 2.1.0?

@chenrui333 There shouldn't be any reason (there are no intentionally breaking changes, or accidental breaking changes that we could detect via our CI), but just in case that Bazel 2.1 has a regression for some Bazel 2.0 users, I think the patch release is nice and doesn't do harm. :) It might also be easier to qualify for users who have stricter validations for their upgrade, e.g. in case of industry regulations.

Personally, I would of course just upgrade to Bazel 2.1. 馃槉

I am mostly thinking from maintenance efforts from you guys perspective (you guys are doing awesome job 馃憤 ).

Thanks for clarifying it!

i've cut the release for fedora/centos/RHEL as a package named 'bazel2' so folks can opt-in to the upgrade.

Was this page helpful?
0 / 5 - 0 ratings