chore(gerrit): bump to 3.7.0-rc4

Change-Id: Ib6f4fd5817fb5415cff5ea1d8c75c8c9a08d56b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7185
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Luke Granger-Brown 2022-11-05 02:18:41 +00:00 committed by lukegb
parent 8669bd0ee6
commit d92ca10990
7 changed files with 43 additions and 57 deletions

View file

@ -1,4 +1,4 @@
From fea4416001e5dd097d70166778fa55c6b20fae39 Mon Sep 17 00:00:00 2001 From 084e4f92fb58f7cd85303ba602fb3c40133c8fcc Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <git@lukegb.com> From: Luke Granger-Brown <git@lukegb.com>
Date: Thu, 2 Jul 2020 23:02:32 +0100 Date: Thu, 2 Jul 2020 23:02:32 +0100
Subject: [PATCH 1/3] Syntax highlight nix Subject: [PATCH 1/3] Syntax highlight nix
@ -9,7 +9,7 @@ Subject: [PATCH 1/3] Syntax highlight nix
2 files changed, 2 insertions(+) 2 files changed, 2 insertions(+)
diff --git a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts diff --git a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
index 9938d3408d..f6f634ad31 100644 index a9f88bdd81..385249f280 100644
--- a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts --- a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
+++ b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts +++ b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
@@ -93,6 +93,7 @@ const LANGUAGE_MAP = new Map<string, string>([ @@ -93,6 +93,7 @@ const LANGUAGE_MAP = new Map<string, string>([
@ -21,7 +21,7 @@ index 9938d3408d..f6f634ad31 100644
const CLASS_PREFIX = 'gr-diff gr-syntax gr-syntax-'; const CLASS_PREFIX = 'gr-diff gr-syntax gr-syntax-';
diff --git a/resources/com/google/gerrit/server/mime/mime-types.properties b/resources/com/google/gerrit/server/mime/mime-types.properties diff --git a/resources/com/google/gerrit/server/mime/mime-types.properties b/resources/com/google/gerrit/server/mime/mime-types.properties
index 5a08e66067..c0c092c712 100644 index 2f9561ba2e..739818ec05 100644
--- a/resources/com/google/gerrit/server/mime/mime-types.properties --- a/resources/com/google/gerrit/server/mime/mime-types.properties
+++ b/resources/com/google/gerrit/server/mime/mime-types.properties +++ b/resources/com/google/gerrit/server/mime/mime-types.properties
@@ -149,6 +149,7 @@ mscin = text/x-mscgen @@ -149,6 +149,7 @@ mscin = text/x-mscgen
@ -33,5 +33,5 @@ index 5a08e66067..c0c092c712 100644
nsi = text/x-nsis nsi = text/x-nsis
nt = text/n-triples nt = text/n-triples
-- --
2.36.0 2.37.3

View file

@ -1,4 +1,4 @@
From ad3f389c20815f21ad932c0b295e861c6a21011c Mon Sep 17 00:00:00 2001 From aedf8ac8fa5113843bcd83ff85e2d9f3bffdb16c Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <git@lukegb.com> From: Luke Granger-Brown <git@lukegb.com>
Date: Thu, 2 Jul 2020 23:02:43 +0100 Date: Thu, 2 Jul 2020 23:02:43 +0100
Subject: [PATCH 2/3] Syntax highlight rules.pl Subject: [PATCH 2/3] Syntax highlight rules.pl
@ -9,7 +9,7 @@ Subject: [PATCH 2/3] Syntax highlight rules.pl
2 files changed, 2 insertions(+) 2 files changed, 2 insertions(+)
diff --git a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts diff --git a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
index f6f634ad31..36fd6090b4 100644 index 385249f280..7cb3068494 100644
--- a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts --- a/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
+++ b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts +++ b/polygerrit-ui/app/embed/diff/gr-syntax-layer/gr-syntax-layer-worker.ts
@@ -68,6 +68,7 @@ const LANGUAGE_MAP = new Map<string, string>([ @@ -68,6 +68,7 @@ const LANGUAGE_MAP = new Map<string, string>([
@ -21,7 +21,7 @@ index f6f634ad31..36fd6090b4 100644
['text/x-protobuf', 'protobuf'], ['text/x-protobuf', 'protobuf'],
['text/x-puppet', 'puppet'], ['text/x-puppet', 'puppet'],
diff --git a/resources/com/google/gerrit/server/mime/mime-types.properties b/resources/com/google/gerrit/server/mime/mime-types.properties diff --git a/resources/com/google/gerrit/server/mime/mime-types.properties b/resources/com/google/gerrit/server/mime/mime-types.properties
index c0c092c712..ee815b689d 100644 index 739818ec05..58eb727bf9 100644
--- a/resources/com/google/gerrit/server/mime/mime-types.properties --- a/resources/com/google/gerrit/server/mime/mime-types.properties
+++ b/resources/com/google/gerrit/server/mime/mime-types.properties +++ b/resources/com/google/gerrit/server/mime/mime-types.properties
@@ -200,6 +200,7 @@ rq = application/sparql-query @@ -200,6 +200,7 @@ rq = application/sparql-query
@ -33,5 +33,5 @@ index c0c092c712..ee815b689d 100644
s = text/x-gas s = text/x-gas
sas = text/x-sas sas = text/x-sas
-- --
2.36.0 2.37.3

View file

@ -1,4 +1,4 @@
From 585077e751107729b7a2dd495a3b17c677a3f528 Mon Sep 17 00:00:00 2001 From f49c50ca9a84ca374b7bd91c171bbea0457f2c7a Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <git@lukegb.com> From: Luke Granger-Brown <git@lukegb.com>
Date: Thu, 2 Jul 2020 23:03:02 +0100 Date: Thu, 2 Jul 2020 23:03:02 +0100
Subject: [PATCH 3/3] Add titles to CLs over HTTP Subject: [PATCH 3/3] Add titles to CLs over HTTP
@ -13,18 +13,18 @@ Subject: [PATCH 3/3] Add titles to CLs over HTTP
create mode 100644 java/com/google/gerrit/httpd/raw/TitleComputer.java create mode 100644 java/com/google/gerrit/httpd/raw/TitleComputer.java
diff --git a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java diff --git a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
index ce22ae8e59..952ba1fef4 100644 index 72bfe40c3b..439bd73b44 100644
--- a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java --- a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java +++ b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
@@ -40,6 +40,7 @@ import java.util.Arrays; @@ -41,6 +41,7 @@ import java.util.Collections;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
+import java.util.Optional; +import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
@@ -61,13 +62,14 @@ public class IndexHtmlUtil { @@ -62,13 +63,14 @@ public class IndexHtmlUtil {
String faviconPath, String faviconPath,
Map<String, String[]> urlParameterMap, Map<String, String[]> urlParameterMap,
Function<String, SanitizedContent> urlInScriptTagOrdainer, Function<String, SanitizedContent> urlInScriptTagOrdainer,
@ -38,20 +38,20 @@ index ce22ae8e59..952ba1fef4 100644
canonicalURL, cdnPath, faviconPath, urlParameterMap, urlInScriptTagOrdainer)) canonicalURL, cdnPath, faviconPath, urlParameterMap, urlInScriptTagOrdainer))
- .putAll(dynamicTemplateData(gerritApi, requestedURL)); - .putAll(dynamicTemplateData(gerritApi, requestedURL));
+ .putAll(dynamicTemplateData(gerritApi, requestedURL, titleComputer)); + .putAll(dynamicTemplateData(gerritApi, requestedURL, titleComputer));
Set<String> enabledExperiments = experimentFeatures.getEnabledExperimentFeatures(); Set<String> enabledExperiments = new HashSet<>();
enabledExperiments.addAll(experimentFeatures.getEnabledExperimentFeatures());
if (!enabledExperiments.isEmpty()) { // Add all experiments enabled through url
@@ -78,7 +80,8 @@ public class IndexHtmlUtil { @@ -81,7 +83,8 @@ public class IndexHtmlUtil {
/** Returns dynamic parameters of {@code index.html}. */ /** Returns dynamic parameters of {@code index.html}. */
public static ImmutableMap<String, Object> dynamicTemplateData( public static ImmutableMap<String, Object> dynamicTemplateData(
- GerritApi gerritApi, String requestedURL) throws RestApiException, URISyntaxException { - GerritApi gerritApi, String requestedURL) throws RestApiException, URISyntaxException {
+ GerritApi gerritApi, String requestedURL, TitleComputer titleComputer) + GerritApi gerritApi, String requestedURL, TitleComputer titleComputer)
+ throws RestApiException, URISyntaxException { + throws RestApiException, URISyntaxException {
ImmutableMap.Builder<String, Object> data = ImmutableMap.builder(); ImmutableMap.Builder<String, Object> data = ImmutableMap.builder();
Map<String, SanitizedContent> initialData = new HashMap<>(); Map<String, SanitizedContent> initialData = new HashMap<>();
Server serverApi = gerritApi.config().server(); Server serverApi = gerritApi.config().server();
@@ -131,6 +134,10 @@ public class IndexHtmlUtil { @@ -129,6 +132,10 @@ public class IndexHtmlUtil {
} }
data.put("gerritInitialData", initialData); data.put("gerritInitialData", initialData);
@ -63,7 +63,7 @@ index ce22ae8e59..952ba1fef4 100644
} }
diff --git a/java/com/google/gerrit/httpd/raw/IndexServlet.java b/java/com/google/gerrit/httpd/raw/IndexServlet.java diff --git a/java/com/google/gerrit/httpd/raw/IndexServlet.java b/java/com/google/gerrit/httpd/raw/IndexServlet.java
index fcb821e5ae..36eb0c990c 100644 index fcb821e5ae..e1464b992b 100644
--- a/java/com/google/gerrit/httpd/raw/IndexServlet.java --- a/java/com/google/gerrit/httpd/raw/IndexServlet.java
+++ b/java/com/google/gerrit/httpd/raw/IndexServlet.java +++ b/java/com/google/gerrit/httpd/raw/IndexServlet.java
@@ -48,13 +48,15 @@ public class IndexServlet extends HttpServlet { @@ -48,13 +48,15 @@ public class IndexServlet extends HttpServlet {
@ -97,21 +97,21 @@ index fcb821e5ae..36eb0c990c 100644
urlOrdainer, urlOrdainer,
- getRequestUrl(req)); - getRequestUrl(req));
+ getRequestUrl(req), + getRequestUrl(req),
+ titleComputer); + titleComputer);
renderer = soySauce.renderTemplate("com.google.gerrit.httpd.raw.Index").setData(templateData); renderer = soySauce.renderTemplate("com.google.gerrit.httpd.raw.Index").setData(templateData);
} catch (URISyntaxException | RestApiException e) { } catch (URISyntaxException | RestApiException e) {
throw new IOException(e); throw new IOException(e);
diff --git a/java/com/google/gerrit/httpd/raw/StaticModule.java b/java/com/google/gerrit/httpd/raw/StaticModule.java diff --git a/java/com/google/gerrit/httpd/raw/StaticModule.java b/java/com/google/gerrit/httpd/raw/StaticModule.java
index 8e8a9d27f0..a0fb168554 100644 index 15dcf42e0e..9f56bf33ce 100644
--- a/java/com/google/gerrit/httpd/raw/StaticModule.java --- a/java/com/google/gerrit/httpd/raw/StaticModule.java
+++ b/java/com/google/gerrit/httpd/raw/StaticModule.java +++ b/java/com/google/gerrit/httpd/raw/StaticModule.java
@@ -226,10 +226,11 @@ public class StaticModule extends ServletModule { @@ -241,10 +241,11 @@ public class StaticModule extends ServletModule {
@CanonicalWebUrl @Nullable String canonicalUrl, @CanonicalWebUrl @Nullable String canonicalUrl,
@GerritServerConfig Config cfg, @GerritServerConfig Config cfg,
GerritApi gerritApi, GerritApi gerritApi,
- ExperimentFeatures experimentFeatures) { - ExperimentFeatures experimentFeatures) {
+ ExperimentFeatures experimentFeatures, + ExperimentFeatures experimentFeatures,
+ TitleComputer titleComputer) { + TitleComputer titleComputer) {
String cdnPath = options.devCdn().orElse(cfg.getString("gerrit", null, "cdnPath")); String cdnPath = options.devCdn().orElse(cfg.getString("gerrit", null, "cdnPath"));
String faviconPath = cfg.getString("gerrit", null, "faviconPath"); String faviconPath = cfg.getString("gerrit", null, "faviconPath");
- return new IndexServlet(canonicalUrl, cdnPath, faviconPath, gerritApi, experimentFeatures); - return new IndexServlet(canonicalUrl, cdnPath, faviconPath, gerritApi, experimentFeatures);
@ -193,10 +193,10 @@ index 0000000000..8fd2053ad0
+ } + }
+} +}
diff --git a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy diff --git a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
index 8c97a49e81..129092dc7e 100644 index dbfef44dfe..347ee75aab 100644
--- a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy --- a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
+++ b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy +++ b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
@@ -32,10 +32,12 @@ @@ -33,10 +33,12 @@
{@param? defaultDashboardHex: ?} {@param? defaultDashboardHex: ?}
{@param? dashboardQuery: ?} {@param? dashboardQuery: ?}
{@param? userIsAuthenticated: ?} {@param? userIsAuthenticated: ?}
@ -211,5 +211,5 @@ index 8c97a49e81..129092dc7e 100644
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">{\n} <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">{\n}
-- --
2.36.0 2.37.3

View file

@ -23,7 +23,7 @@ let
runScript = "/bin/bazel-run"; runScript = "/bin/bazel-run";
}; };
bazel = bazelTop // { override = x: bazelTop; }; bazel = bazelTop // { override = x: bazelTop; };
version = "3.6.1"; version = "3.7.0-rc4";
in in
pkgs.lib.makeOverridable pkgs.buildBazelPackage { pkgs.lib.makeOverridable pkgs.buildBazelPackage {
pname = "gerrit"; pname = "gerrit";
@ -31,9 +31,9 @@ pkgs.lib.makeOverridable pkgs.buildBazelPackage {
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/gerrit"; url = "https://gerrit.googlesource.com/gerrit";
rev = "028b90fc362051cc7005e540030e497320b83c92"; rev = "3e445c7833c4acf49f1171fe4c82ceb32e93c780";
branchName = "v${version}"; branchName = "v${version}";
sha256 = "sha256:0rwmrix4h9jvgxr1gzp5f090g3xz3qlss3l1xvs2s6f3ynbxixa7"; sha256 = "sha256:002aw2bfifyla66v8khyiq4m9qj6ahs6r1dzb5kjk8xqpf6c6q9p";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -55,7 +55,7 @@ pkgs.lib.makeOverridable pkgs.buildBazelPackage {
fetchConfigured = true; fetchConfigured = true;
fetchAttrs = { fetchAttrs = {
sha256 = "sha256:1ggp5zrj25g5jc6ny9y333q0g76a7s1544j1ps9j3xhra9vbc1vq"; sha256 = "sha256:09nfjw8376amrymblnjl4v85zgxrvc93zblvxrh23k7af62bk1nk";
preBuild = '' preBuild = ''
rm .bazelversion rm .bazelversion
''; '';
@ -99,7 +99,14 @@ pkgs.lib.makeOverridable pkgs.buildBazelPackage {
# Normalize permissions on .yarn-{tarball,metadata} files # Normalize permissions on .yarn-{tarball,metadata} files
find $bazelOut/external/yarn_cache \( -name .yarn-tarball.tgz -or -name .yarn-metadata.json \) -exec chmod 644 {} + find $bazelOut/external/yarn_cache \( -name .yarn-tarball.tgz -or -name .yarn-metadata.json \) -exec chmod 644 {} +
(cd $bazelOut/ && tar czf $out --sort=name --mtime='@1' --owner=0 --group=0 --numeric-owner external/) mkdir $bazelOut/_bits/
find . -name node_modules -prune -print | while read d; do
echo "$d" "$(dirname $d)"
mkdir -p $bazelOut/_bits/$(dirname $d)
cp -R "$d" "$bazelOut/_bits/$(dirname $d)/node_modules"
done
(cd $bazelOut/ && tar czf $out --sort=name --mtime='@1' --owner=0 --group=0 --numeric-owner external/ _bits/)
runHook postInstall runHook postInstall
''; '';
@ -108,6 +115,8 @@ pkgs.lib.makeOverridable pkgs.buildBazelPackage {
buildAttrs = { buildAttrs = {
preConfigure = '' preConfigure = ''
rm .bazelversion rm .bazelversion
cp -R $bazelOut/_bits/* ./
''; '';
postPatch = '' postPatch = ''
# Disable all errorprone checks, since we might be using a different version. # Disable all errorprone checks, since we might be using a different version.

View file

@ -5,7 +5,7 @@ let
in in
buildGerritBazelPlugin rec { buildGerritBazelPlugin rec {
name = "code-owners"; name = "code-owners";
depsOutputHash = "sha256:0fpv5yavgki5nv84lg5zykp6v7pv9xll1glmz5dwnz5z11axj4g9"; depsOutputHash = "sha256:07mgvd7fvg1xqlabjn644505yx98vjrmwxx1arwsykir1h82h0b2";
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/plugins/code-owners"; url = "https://gerrit.googlesource.com/plugins/code-owners";
rev = "6fdf3ce2e52904b35e2a5824a4197155c2c6b4e4"; rev = "6fdf3ce2e52904b35e2a5824a4197155c2c6b4e4";

View file

@ -1,23 +0,0 @@
{ depot, pkgs, ... }@args:
let
inherit (import ./builder.nix args) buildGerritBazelPlugin;
in
depot.nix.readTree.drvTargets {
# https://gerrit.googlesource.com/plugins/owners
owners = buildGerritBazelPlugin rec {
name = "owners";
depsOutputHash = "sha256:129k0jz2pxfl3yvdd95wvvkcjjmmw6jy4g45ss1pgvb9dan0ca6j";
src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/plugins/owners";
rev = "070820d2df4f253c7c470f2cbe68da8043e163d0";
sha256 = "sha256:0mw2fff3dca1xv2cvg9hsy5zw1h5gjidb5fh95x6yaj9g9lp0mxq";
};
overlayPluginCmd = ''
chmod +w "$out" "$out/plugins/external_plugin_deps.bzl"
cp -R "${src}/owners" "$out/plugins/owners"
cp "${src}/external_plugin_deps.bzl" "$out/plugins/external_plugin_deps.bzl"
cp -R "${src}/owners-common" "$out/owners-common"
'';
};
}

View file

@ -5,7 +5,7 @@ let
in in
buildGerritBazelPlugin rec { buildGerritBazelPlugin rec {
name = "oauth"; name = "oauth";
depsOutputHash = "sha256:14xw282ianq52y5cbcpxrlkfjjakcvh7igpkvs49hcgcb7v4rds8"; depsOutputHash = "sha256:12y8493y8ns6c6c69g89bkrahd42mircqykldair1xrb3yg26hqp";
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://gerrit.googlesource.com/plugins/oauth"; url = "https://gerrit.googlesource.com/plugins/oauth";
rev = "f9bef7476bc99f7b1dc3fe2d52ec95cd7ac571dc"; rev = "f9bef7476bc99f7b1dc3fe2d52ec95cd7ac571dc";