devtools/gerrit: backport reviewiers column fix to 3.3.2

Gerrit 3.3.1 seems to have introduced a bug which makes the reviewers
column in the dashboard entry: https://bugs.chromium.org/p/gerrit/issues/detail?id=13899

This adds an override of gerrit.war to our Docker containers. The .war
is pulled over HTTP. It has been manually built by q3k from a source
checkout. The details on how this was done are in the WORKSPACE
http_file archive.

Once 3.3.3 lands we should get rid of it.

Change-Id: I8b64103cb87d8b185ff35165695a18cb19fea523
This commit is contained in:
q3k 2021-03-18 19:15:38 +00:00 committed by q3k
parent 64de7afe32
commit 146c99e58e
3 changed files with 38 additions and 6 deletions

View file

@ -3,7 +3,7 @@ workspace(
)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
# Protobuf deps (shared between many rules).
# Load this as early as possible, to avoid a different version being pulled in by deps of something else
@ -166,6 +166,26 @@ gerrit_api()
load("//devtools/gerrit/gerrit-oauth-provider:external_plugin_deps.bzl", gerrit_oauth_deps="external_plugin_deps")
gerrit_oauth_deps(omit_commons_codec=False)
# Gerrit 3.3.2 built by q3k, backported with fix for 'empty reviewers column' bug.
# See: https://bugs.chromium.org/p/gerrit/issues/detail?id=13899
# Override can be removed once we update to > 3.3.2, as the fix for this is
# pending for the 3.3 branch.
#
# Built from v3.3.2 tag at df0507df5917fd78af01aee2495b2663530d52d1
# Cherry-picked fix from 8731af3ae785efe9ecff7f3d04302b6b01c4fc0b
# Resulted in commit 5949bfb86e62a32a95293e339ed86bfe52a283e9
# Built against Java 8:
# bazel build --java_toolchain //tools:error_prone_warnings_toolchain :release
#
http_file(
name = "org_q3k_gerrit_3_3_2_backport",
urls = [
"https://object.ceph-waw3.hswaw.net/q3k-personal/d1839d691a8534f4ccb27bed9a98281e45972fbebec50d004cecd4d5da2b15a6.war",
],
downloaded_file_path = "gerrit.war",
sha256 = "d1839d691a8534f4ccb27bed9a98281e45972fbebec50d004cecd4d5da2b15a6",
)
# minecraft spigot/bukkit deps
# this uses rules_jvm_external vs gerrit's maven_jar because we need SNAPSHOT support

View file

@ -23,9 +23,21 @@ container_image(
directory = "/var/gerrit-theme",
)
# Add gerrit 3.3.2 with backported fix. See org_q3k_gerrit_3_3_2_backport in
# WORKSPACE for more background.
# TODO(q3k): drop once gerrit > 3.3.2 lands.
container_image(
name="3.3.2-r3",
base=":with_theme",
name = "with_gerrit_override",
base="with_theme",
files = [
"@org_q3k_gerrit_3_3_2_backport//file:gerrit.war",
],
directory = "/var/gerrit/bin/",
)
container_image(
name="3.3.2-r4",
base=":with_gerrit_override",
files = [":entrypoint.sh"],
directory = "/",
entrypoint = ["/entrypoint.sh"],
@ -33,9 +45,9 @@ container_image(
container_push(
name = "push",
image = ":3.3.2-r3",
image = ":3.3.2-r4",
format = "Docker",
registry = "registry.k0.hswaw.net",
repository = "q3k/gerrit",
tag = "3.3.2-r3",
tag = "3.3.2-r4",
)

View file

@ -38,7 +38,7 @@ local kube = import "../../../kube/kube.libsonnet";
address: "gerrit@hackerspace.pl",
},
tag: "3.3.2-r3",
tag: "3.3.2-r4",
image: "registry.k0.hswaw.net/q3k/gerrit:" + cfg.tag,
resources: {
requests: {