Merge branch 'stable-2.15'
* stable-2.15: DataSourceProvider: Validate connection Set version to 2.14.12-SNAPSHOT Set version to 2.14.11 Upgrade elasticsearch-rest-client to 6.3.2 StalenessChecker: URLDecode project name before checking staleness AbstractQueryChangesTest: Add a test with project name that requires URL encoding Upgrade Dropwizard Metrics to 4.0.3 Upgrade JGit to 4.7.2.201807261330-r Fix typos in documentation of 'List Files' REST API element Perform fonts preloads in "anonymous" cross-origin mode Change-Id: I65d53e9a001d2ce7445ccd639d97b5bad084e97c
This commit is contained in:
@@ -574,8 +574,8 @@ maven_jar(
|
||||
|
||||
maven_jar(
|
||||
name = "dropwizard-core",
|
||||
artifact = "io.dropwizard.metrics:metrics-core:4.0.2",
|
||||
sha1 = "ec9878842d510cabd6bd6a9da1bebae1ae0cd199",
|
||||
artifact = "io.dropwizard.metrics:metrics-core:4.0.3",
|
||||
sha1 = "bb562ee73f740bb6b2bf7955f97be6b870d9e9f0",
|
||||
)
|
||||
|
||||
# When updading Bouncy Castle, also update it in bazlets.
|
||||
@@ -904,8 +904,8 @@ maven_jar(
|
||||
|
||||
maven_jar(
|
||||
name = "elasticsearch-rest-client",
|
||||
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.3.1",
|
||||
sha1 = "99de036a2cd99dbecec1cc84f5d0e19032e74fa7",
|
||||
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.3.2",
|
||||
sha1 = "2077ea5f00fdd2d6af85223b730ba8047303297f",
|
||||
)
|
||||
|
||||
JACKSON_VERSION = "2.8.9"
|
||||
|
@@ -21,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.google.gerrit.extensions.restapi.DeprecatedIdentifierException;
|
||||
import com.google.gerrit.extensions.restapi.Url;
|
||||
import com.google.gerrit.index.IndexConfig;
|
||||
import com.google.gerrit.metrics.Counter1;
|
||||
import com.google.gerrit.metrics.Description;
|
||||
@@ -235,7 +236,7 @@ public class ChangeFinder {
|
||||
InternalChangeQuery query = queryProvider.get().noFields();
|
||||
List<ChangeData> r = query.byLegacyChangeId(id);
|
||||
if (r.size() == 1) {
|
||||
changeIdProjectCache.put(id, r.get(0).project().get());
|
||||
changeIdProjectCache.put(id, Url.encode(r.get(0).project().get()));
|
||||
}
|
||||
return asChangeNotes(r);
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import com.google.common.collect.Sets;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.gerrit.common.Nullable;
|
||||
import com.google.gerrit.extensions.restapi.Url;
|
||||
import com.google.gerrit.index.IndexConfig;
|
||||
import com.google.gerrit.index.RefState;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
@@ -176,7 +177,8 @@ public class StalenessChecker {
|
||||
String s = new String(b, UTF_8);
|
||||
List<String> parts = Splitter.on(':').splitToList(s);
|
||||
RefStatePattern.check(parts.size() == 2, s);
|
||||
result.put(new Project.NameKey(parts.get(0)), RefStatePattern.create(parts.get(1)));
|
||||
result.put(
|
||||
new Project.NameKey(Url.decode(parts.get(0))), RefStatePattern.create(parts.get(1)));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@@ -141,6 +141,8 @@ public class DataSourceProvider implements Provider<DataSource>, LifecycleListen
|
||||
long evictIdleTimeMs = 1000L * 60;
|
||||
ds.setMinEvictableIdleTimeMillis(evictIdleTimeMs);
|
||||
ds.setTimeBetweenEvictionRunsMillis(evictIdleTimeMs / 2);
|
||||
ds.setTestOnBorrow(true);
|
||||
ds.setTestOnReturn(true);
|
||||
ds.setValidationQuery(dst.getValidationQuery());
|
||||
ds.setValidationQueryTimeout(5);
|
||||
exportPoolMetrics(ds);
|
||||
|
@@ -49,7 +49,7 @@ public class ElasticContainer<SELF extends ElasticContainer<SELF>> extends Gener
|
||||
case V6_2:
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4";
|
||||
case V6_3:
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.1";
|
||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2";
|
||||
}
|
||||
throw new IllegalStateException("No tests for version: " + version.name());
|
||||
}
|
||||
|
@@ -2985,6 +2985,13 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
assertQuery(query);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void byUrlEncodedProject() throws Exception {
|
||||
TestRepository<Repo> repo = createProject("repo+foo");
|
||||
Change change = insert(repo, newChange(repo));
|
||||
assertQuery("project:repo+foo", change);
|
||||
}
|
||||
|
||||
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
|
||||
return newChange(repo, null, null, null, null, false);
|
||||
}
|
||||
|
@@ -46,12 +46,12 @@
|
||||
|
||||
// RobotoMono fonts are used in styles/fonts.css
|
||||
// @see https://github.com/w3c/preload/issues/32 regarding crossorigin
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/RobotoMono-Regular.woff2" as="font" type="font/woff2" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/RobotoMono-Regular.woff" as="font" type="font/woff" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Regular.woff2" as="font" type="font/woff2" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Regular.woff" as="font" type="font/woff" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff2" as="font" type="font/woff2" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff" as="font" type="font/woff" crossorigin>{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/RobotoMono-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/RobotoMono-Regular.woff" as="font" type="font/woff" crossorigin="anonymous">{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Regular.woff" as="font" type="font/woff" crossorigin="anonymous">{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">{\n}
|
||||
<link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff" as="font" type="font/woff" crossorigin="anonymous">{\n}
|
||||
<link rel="stylesheet" href="{$staticResourcePath}/styles/fonts.css">{\n}
|
||||
<link rel="stylesheet" href="{$staticResourcePath}/styles/main.css">{\n}
|
||||
<script src="{$staticResourcePath}/bower_components/webcomponentsjs/webcomponents-lite.js"></script>{\n}
|
||||
|
Reference in New Issue
Block a user