Skip to content
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

Upgrade bazel to 2.1.0 #478

Merged
merged 16 commits into from
Feb 14, 2020
Merged

Upgrade bazel to 2.1.0 #478

merged 16 commits into from
Feb 14, 2020

Conversation

celskeggs
Copy link
Member

@celskeggs celskeggs commented Feb 1, 2020

Upgrade us to a newer version of bazel. Fix incompatibilities along the way.

Also updates the debian-iso version and adds a helper script for that, because that got broken along the way.

Fixes #444.


Checklist:

  • I have split up this change into one or more appropriately-delineated commits.
  • The first line of each commit is of the form "[component]: do something"
  • I have written a complete, multi-line commit message for each commit.
  • I have formatted any Go code that I have changed with gofmt.
  • I have written or updated appropriate documentation to cover this change.
  • I have confirmed that this change is covered by at least one appropriate test run by CI.
  • If my change includes new or modified functionality, I have tested that the changes work as expected.
  • I have assigned this issue to an appropriate reviewer. (Choose @celskeggs if you are not otherwise certain.)
  • I consider my PR complete and ready to be merged without my further input, assuming that it passes CI and code review.
  • My changes have passed CI, including an automatic Jenkins deploy.
  • My changes have passed code review.

@celskeggs celskeggs added the micro label Feb 1, 2020
@celskeggs celskeggs added this to the Dev Cluster 7 milestone Feb 1, 2020
@celskeggs celskeggs changed the title Upgrade bazel to 0.27.2 Upgrade bazel to 0.28.1 Feb 1, 2020
@celskeggs celskeggs changed the title Upgrade bazel to 0.28.1 Upgrade bazel to 0.29.1 Feb 1, 2020
@celskeggs celskeggs changed the base branch from 428-build-chroot to master February 7, 2020 18:49
@celskeggs celskeggs changed the title Upgrade bazel to 0.29.1 Upgrade bazel to 1.0.1 Feb 7, 2020
@celskeggs celskeggs changed the title Upgrade bazel to 1.0.1 Upgrade bazel to 1.2.1 Feb 8, 2020
@celskeggs celskeggs changed the title Upgrade bazel to 1.2.1 Upgrade bazel to 2.1.0 Feb 8, 2020
@celskeggs celskeggs marked this pull request as ready for review February 8, 2020 02:20
Running under newer versions of Bazel may require running our host
scripts under Python 3. Fix hash-compute so that it works in both, not
just Python 2.
Starting in bazel 0.27, the host python version is forced to python 3.
Unfortunately, containerregistry (a dependency of rules_bazel) is not
compatible with python 3, so we have to pin bazel back to python 2.

We should fix this once containerregistry updates, so that we aren't
stuck on an old version of python.
rules_docker pulls in an old version of subpar that is incompatible
with bazel 0.27+. Use a newer version that is compatible.
Starting in bazel 0.27, the default python version is set to python 3.
Unfortunately, containerregistry (a dependency of rules_bazel) is not
compatible with python 3, so we have to patch it to default back to
python 2.

We should fix this once containerregistry updates.
We need to stay more current with Bazel than we have been, so that we
can pull in the latest bugfixes and be compatible with more
dependencies.
We want to stay as close to the current version of bazel as possible.
We want to keep bazel updated as much as possible.
The pkg_tar and pkg_deb rules available in bazel_tools are deprecated,
and have been moved out to rules_pkg. Migrate to that repository.
The version of kubernetes we have is broken when using a newer version
of bazel (i.e. 1.0+), because of some deprecated features (bugs?) that
got removed. Pull in the patch that kubernetes 1.17 adds to fix it.
We want to keep bazel updated as much as possible.
We want bazel to stay near the current version.
We want to stay near the latest version.
We want bazel to stay near the latest version.
We want to keep bazel close to the latest version.
platform/.bazelrc Show resolved Hide resolved
tools/bump-debian-iso.sh Outdated Show resolved Hide resolved
tools/bump-debian-iso.sh Outdated Show resolved Hide resolved
tools/update-defs.py Show resolved Hide resolved
cryslith
cryslith previously approved these changes Feb 14, 2020
@cryslith cryslith assigned celskeggs and unassigned cryslith Feb 14, 2020
Because we want to spend less time working out how to update our
upstream dependencies, add a script that can automatically determine
the latest debian ISO, and automatically make a commit to upgrade to
it.

This is as simple as the following command:

    $ ./bump-debian-iso.sh auto

It includes a basic general-purpose bazel code modification tool that
should help us make these kinds of autoupdate scripts in general.
This commit was automatically created with bump-debian-iso.sh.
@celskeggs
Copy link
Member Author

Merged per previously passed checks and review on 382fa0f before rebase.

@celskeggs celskeggs deleted the 444-upgrade-bazel branch February 23, 2020 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to latest Bazel version
2 participants