* stable-2.15:
Set version to 2.15.12-SNAPSHOT
Set version to 2.15.11
Allow LFS-over-SSH created auth pass through ContainerAuthFilter
Upgrade elasticsearch-rest-client to 6.6.1
ElasticContainer: Bump the test server version to 5.6.15
Change-Id: I6a54f5b233cf9fa6053241b729cdd300f83dfdc9
For now, just tests a top-level binding under /plugins/X. Future tests
could check views bound in a RestApiModule under an existing collection,
but I wasn't able to get those working in this change.
These tests are in a separate class from the old
PluginsRestApiBindingsIT because they are really testing a different
type of endpoint: the former is about the remote admin endpoints, which
is different from actual plugin-provided endpoints. Rename
PluginsRestApiBindingsIT accordingly.
Change-Id: I71b82a14ded11cc77baf1313d82bc714f8602f67
* changes:
Warn the user about private changes on submit
Publish private changes when they get submitted through a Git push
Move private changes tests from ChangeIT to PrivateChangeIT
Inject ChangeMessageUtil into SetPrivateOp directly
Publish private changes on submission
Using reverse DNS lookup by default can cause unexpected performance
issues when writing the ref log, because the hostname of the user's
client is looked up on every ref log creation. For example this can
add a noticable delay (around 5 seconds) when adding a code review label,
due to the ref update of the notedb metadata refs in git.
Change the default of gerrit.enableReverseDnsLookup to false so that
DNS lookup is by default disabled.
Reported-by: Roman Karlstetter <Roman.Karlstetter@ifta.com>
Change-Id: I68af8e545fc54ea0c3819454d81bb4c598f65e93
Having a configuration option 'disable' with default value 'false'
results in a double-negative meaning which can be confusing.
Replace this option with enableReverseDnsLookup, with default 'true',
which effectively results in the same default behavior when no value
is configured.
Rename the DisableReverseDnsLookup and DisableReverseDnsLookupProvider
classes accordingly.
Change-Id: I36a8be9474f58a0d1457850bb5fae2fa7cc08ee8
* stable-2.16:
Acceptance: set log threshold level for tests
Re-introduce the cache-based listing by configuration
Change-Id: I6049c231690b98afd7a16fbb26f9a6004bc3a094
By default all acceptance tests start Gerrit in DEBUG level, which in
some cases may generate *a lot* of logs that may pollute the output
console and make troubleshooting very difficult.
Allow specific tests to customise the log level and reduce it to
a more acceptable level.
Sample use:
@LogThreshold(level = "INFO")
public class MyTest extends AbstractDaemonTest {
@Test
public void shouldJustWork() {
// test code
}
}
Change-Id: I2b0b8496de1a43de112ce5b5c427e3c8603d5d9e
They belong there right next to the JGit PushResultSubject, they were
just put in the wrong place initially.
Change-Id: Iaef009136888c813f1bd20b7988e4f59259e860e
* stable-2.16:
Update git submodules
Update git submodules
Update cmd-stream-events doc
PG: Set diff line lenght to 72 for commit message
Add support for 'base' in cherry pick dialog
Update git submodules
Update git submodules
CommitValidators: Inject UrlFormatter via DynamicItem
Allow omitting action in permission removal
Fix support for ldap groups that contains spaces
AccountIT: Extend assertKeyEquals to check that full key is included
Fix GPG public key export
Change-Id: Ia5396777b9922d090088fea4c010d2f1c6179534
* stable-2.15:
AccountIT: Extend assertKeyEquals to check that full key is included
Fix GPG public key export
Change-Id: I68c469722593a53b475144825673cb0e8e9708e7
DynamicMap#plugins() creates a new TreeSet on every invocation. We were
just doing this to presize an ArrayList, which makes it seem like we
care about reducing allocations, but was probably actually increasing
allocations. Fortunately, we can just presize using the multimap we
already have. This also allows us to remove a redundant instance field.
Change-Id: Ie5998add61d4848e184a37f4f237da132802a00f
This emphasizes to the reader that this map is not supposed to be
mutated after construction time.
It is tempting to store Extensions instead of constructing our own map.
However, repeatedly calling Extensions#get() could cause performance
problems. Leave a comment about why we aren't doing this.
Change-Id: I466b2c17ea1e1b8a9304c97a579cdd3184e033fc
This method was definitely not safe to call multiple times, since it
would add duplicate entries to the mutable map stored in the instance
field. The map should really only be initialized once, during
construction.
Change-Id: I6cbb792adb6ae9dbec70df3f45586dc518faf913
Debugging production problems is much more difficult when exceptions are
completely swallowed. At the same time, if a plugin fails on all inputs,
logging one entry for every change in a large query result set would be
terrible as well. Split the difference and log once a minute; Flogger
makes this very easy. We can always decide to come back later and
complexify it by logging e.g. once per plugin or per factory, but this
is dead simple and pretty quiet.
Change-Id: If512583aef10e48c745660c42f021837caeb2994
A plugin is really just a name plus one or more module classes. We
already have the TestServerPlugin magic which is used by
LightweightPluginDaemonTest, so reuse that. The difference is that the
use case for this new method is for testing the plugin plumbing itself,
not testing a specific real-world plugin.
Change-Id: I3ca4eda806519ad9bdd653e0b5f897e69ed119af
Subclasses that override resetProjects may want to add to the default
config, rather than recreating it all from scratch. Previously, the
default config was never exposed to subclasses. Now, they can get it via
super.resetProjects() (or not, as current implementors all prefer).
Change-Id: If116e5fce9e0fe0f826b66c1f84774660f20dec7
Introduce a new global configuration parameter gerrit.listProjectsFromIndex
to control the ability to render the project list from the secondary
index or the in-memory cache.
By default, the legacy in-memory cache is used as engine.
NOTE: The legacy in-memory cache provides an unlimited list
while the secondary index limit is defined by the global
capability 'queryLimit' which is defaulted to 500 entries.
Change-Id: I3dc089c2b546ff78c6a5aea65b2d6a255b6e20e1
If a plugin gets CommitValidators injected, the plugin fails to
load with:
No implementation for com.google.gerrit.server.config.UrlFormatter was bound.
Since change I375245647 the UrlFormatter is bound as a DynamicItem,
so it should also be injected as such.
Bug: Issue 10500
Change-Id: Ieabb12b2086f8f785c8013e62193c8b811e00500
Allowing plugins to specify custom action types may be feasible, but at
a minimum requires changing the type of the metrics.
Change-Id: Ieb659c8e86f59085e57dbcb134e3582039025223
Found with:
for f in $(find [a-z]* -name \*.java); do echo "$f $(head -n1 $f)"; done | grep -v '// Copyright'
The remaining classes not touched in this file all have nonstandard
license headers, because they were copied from other projects. Or
they're plugins, which should be fixed separately.
Copyright dates are taken from original creation of the file.
Change-Id: I3be07ac46fd999f07c230eacbf4508f39fda1b77
* stable-2.16:
Fix missing `</section>` in gr-settings-view
Suggest --no-edit when Change-Id is missing
PG: Assume weblinks have correct direct or relative urls
PG: Make commitlink selection configurable and consistent
Add config gerrit.primaryWeblinkName
gerrit.sh: Improve error message when JRE cannot be found
PrologEnvironment#setPredicate: Reduce log level to DEBUG
ElasticContainer: Bump V7_0 test server to 7.0.0-beta1
Change-Id: I8bef4ae02e935809de6d7abf59e1a8de6800432c
* stable-2.15:
gerrit.sh: Improve error message when JRE cannot be found
PrologEnvironment#setPredicate: Reduce log level to DEBUG
Change-Id: I26703bd42f91a96dc985a2de8e90f93be78bdd63
Add gerrit.primaryWeblinkName to ServerInfo.
Lets the UI know which is the preferred weblink in instances were
only one weblink can be used, for example in inline links.
Change-Id: I01deaca3418d5c0486e3f5ebabf10827d47c3631
This commit makes it so that we publish all private changes that get
merged.
A subsequent commit will add a warning to the UI to inform the user
about this.
Change-Id: I7f6c1b9128cee54a341c8318aabb918ccaca85fa
We want to improve the UX of private changes by limiting the number of
merged private changes. As a first step, we stop allowing users to mark
merged (or abandoned) changes private.
A subsequent commit will auto-publish private changes on submission and
include a UI dialog that tells the user about this process.
Change-Id: Ia4039099b5b23b9db6c88183be51687168e59580