| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I4010235c44fecd27f0286eb17e0e132a4bd4f220
|
|
|
|
|
| |
Bug: Issue 9146
Change-Id: I11d8f4da87a0e27e9117e2c0087cbaff5d185338
|
|
|
|
|
| |
Bug: Issue 9147
Change-Id: Id33c105351b47c38a1f87258cde83d4c8fb4e8de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Elasticsearch, doing a query that involved the characters "."
and "_", from full text fields, did not include results with keywords as
a substring. This behavior was different from Lucene, where these two
characters are mapped to the space character (" ") so that the query
returns keywords separated by them.
This change adds character mappings for Elasticsearch in order to ensure
that the full-text queries return same results as when using Lucene. At
index creation time, this change creates a new elasticsearch setting
where an analyzer with character mappings is configured. This analyzer
is then added to the elasticsearch mappings to be used by the full-text
field queries.
Because the elasticsearch mappings and settings can only be configured
at index creation time, one should take the following steps to apply
this change:
1. delete the index (changes, accounts, groups).
2. initialize an Elasticsearch site with this change.
3. reindex the documents (changes, accounts, groups).
4. start the site.
This change applies to all the currently supported Elasticsearch
versions.
Bug: Issue 9146
Bug: Issue 9147
Change-Id: I6da7a98d35d912b5bee7cc510d02db4433f25538
|
|
|
|
|
|
| |
As the latter has been refactored through the one following it straight.
Change-Id: Iabeced6beae5e937d9c667b75981819de9511f86
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per Bazel test documentation [1] that is: run all the Elasticsearch
docker tests with the 'exclusive' tag set in. Do so to minimize the
slower execution speed factor, thus running them tests in a more natural
fashion. Doing so should then minimize flakiness or only leave true
failures to be fixed. -Actual test execution speeds depending on the
running host resources, of course.
[1] https://docs.bazel.build/versions/master/test-encyclopedia.html
Bug: Issue 9407
Change-Id: Ic9b57b84d06921abab91de57ecd4b86bcfb4272a
|
|
|
|
|
|
|
|
| |
Make this test rule generic enough, so that other potential new test
classes get executed with no change required. Exclude test classes that
are already picked up by sibling test rules.
Change-Id: I2814885b364d8b50017b728ea6fc6301516c45cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add execution of the V5 and V6 tests to the already included V2 default.
Include flaky tag support for the V6 tests though, as their accounts and
groups subset currently fails (cf. Issue 9252). Adding such a tag here
allows to exclude the V6 tests in a CI context. The V5 tests still pass
(just like V2's) thus require no such flaky tag for passing CI coverage.
Before this change, it was not possible to benefit from V5/V6 elastic
tests feedback. Thus the previous risk of elastic support regressions.
Once a fix for Issue 9252 becomes available, one will be able to get
such feedback for V6, on top of V5 added herein and default V2. Until
then, excluding the hereby flaky V6 tests allows for V5 and V2 checks:
bazel test //... --test_tag_filters=elastic,-flaky (e.g.).
Change-Id: I62fef6dca20a73065df6b3dd4b21deb1ac7653fd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ bazel test -t- //gerrit-elasticsearch/...
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed 3 targets (2 packages loaded).
INFO: Found 3 test targets...
INFO: Elapsed time: 126.687s, Critical Path: 124.80s
INFO: 9 processes: 2 remote cache hit, 4 darwin-sandbox, 3 worker.
INFO: Build completed successfully, 24 total actions
//gerrit-elasticsearch:elasticsearch_query_accounts_test PASSED in 65.0s
//gerrit-elasticsearch:elasticsearch_query_changes_test PASSED in 122.5s
//gerrit-elasticsearch:elasticsearch_query_groups_test PASSED in 53.5s
Executed 3 out of 3 tests: 3 tests pass.
INFO: Build completed successfully, 24 total actions
Change-Id: I1bc530879ae69d74d39750a173d5458b2fb72bd9
|
|
|
|
| |
Change-Id: I7556af36c770d1af8822c3d5bd36abc043f19092
|
|
|
|
|
|
|
|
| |
Buildifier is now also used for formatting .bzl files.
This change was created by running buildifier 0.12 over our source tree.
Change-Id: I9f15112d4fe23e5cec0700cfe47f1ca649f61d2a
|
|\
| |
| |
| |
| |
| |
| | |
* stable-2.13:
Update Bower to 1.8.2
Change-Id: I690bc00105d4987bec0aa14bc7936a85256b3f3b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See https://twitter.com/bower/status/918073147789889536
bower moved their mirror to in house so they can put it behind a cdn.
This also resulted in a domain change.
Change-Id: Ie26d464687fe10a46c1fd83b9445c5fcf3cbbca9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This dependency is not used in gerrit core. The only reason it's
included in WORKSPACE is because core replication plugin depends on it
and there is no way in Bazel to consume external dependency in core
plugin without defining this dependency in WORKSPACE file.
It turns out, that gitblit-plugin also depends on commons-io, but on the
newer version. Sync the versions to the same version used by gitblit.
Change-Id: Iae3545df95b23439d3c7fd385bfeae482d6d60ac
(cherry picked from commit 6488535f737cdce5feeca2550ce402d803d4d5a9)
|
| |
| |
| |
| | |
Change-Id: I9d8e186e5836e83ea8bb3d4917b349ff75e4374b
|
| |
| |
| |
| | |
Change-Id: I2d85bbade228d89caabad334742641ecccbe4af7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a change is pushed without a Change-Id footer, but with a potential
Change-Id line somewhere else in the body of the commit message, the
error message says:
Hint: A potential Change-IdChange-Id was found, but it was not
in the footer (last paragraph) of the commit message.
i.e. with repeated "Change-Id" in the first line.
Change-Id: I035e20b72b0b48b090a9183310f3460f97755d00
|
| |
| |
| |
| |
| |
| | |
Change-Id: I5e1a4550701a9eaad2bbfdb9e7183a21dfda7cec
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
Helped-by: Patrick Hiesel <hiesel@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When change is pushed for review typical response looks like:
remote: New Changes:
remote: http://[server]/gerrit/[change-id] [change subject]
It is not sufficient for sites that serve Gerrit as a service that is
integrated under unified UI (with unified Code Browser). In such
environment links to Gerrit are no longer valid and it should be
possible to alter them with desired format.
This patch introduces ChangeReportFormatter that can be replaced with
instance loaded from plugin (DynamicItem pattern) with default
implementation that preserves current behavior.
Change-Id: Ia2de44c121b6a73fcf93e1aaf11690697adb9abf
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
| |
| |
| |
| |
| |
| | |
Also update the test container to use version 6.3.1.
Change-Id: I78d24ba8ba1a8612276a78ab3549b37cd53708d2
|
| |
| |
| |
| | |
Change-Id: I4f7b4da57c29f95218c2e75beb256182d7f69f54
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changes can only be deleted by Administrators, or by the change owner
when they are granted the "Delete Own Changes" permission either on the
"Change Owners" virtual group or an internal group they are a member of.
This means that it is not possible to allow users to delete other users'
changes other than by granting the "Administrate Server" permission,
which also gives them all the other administrative capabilities. This is
also inconsistent with how the "Delete Drafts" permission works.
An example of where it would be better to have more flexible permissions
is allowing changes to be deleted by Project Owners on a per-project
basis, or by a group of users who are trusted (but not enough to grant
them Administrator capabilities).
Add a new permission "Delete Changes" which allows these use cases, thus
a change can now also be deleted by users who are:
- Member of a group that is explicitly granted "Delete Changes" on the
change's destination branch.
- Member of a group that is given the "Owner" permission on the project,
when the virtual group "Project Owners" is granted "Delete Changes" on
the change's destination branch.
Bug: Issue 9354
Change-Id: I9d5d779eb0a6ce18faca02b9fc90904ec5da91d9
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of cloning the repo as "user" and then using git push to create
the change, use the change API to create the change. This avoids the
unnecessary cloning of the repository, and makes it more explicitly
clear which user is supposed to be the owner of the created change.
Change-Id: Id4a3ff77a6128d4500eeaba37d01d69b8253b165
|
| |
| |
| |
| | |
Change-Id: Ib23c6bdc18212aba8b8e35ab56c25e6dc3fd8429
|
| |
| |
| |
| | |
Change-Id: I3100fac2c3e00d50a52d78c0eed58c376c102019
|
| |
| |
| |
| | |
Change-Id: I72a4f99bce5f335a57115ea815f1d161e19a7bda
|
| |
| |
| |
| |
| |
| |
| |
| | |
Test that the configuration reads the username and password settings
in the expected way.
Bug: Issue 9095
Change-Id: Icb9eccd38a5fdadf478d3b5492a509189e58b0a1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create static constants for the elasticsearch section name, the
keys, and default values.
Make them package visible so that they can be used in tests.
Update the configuration tests to use them.
Change-Id: I150e584f82825a25ae32604481b4b8e919850cb1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of configuring each server in its own section with separate
values for protocol, host and port, i.e.:
[elasticsearch "elastic1"]
hostname = elastic1
protocol = https
port = 1234
[elasticsearch "elastic2"]
hostname = elastic2
protocol = https
port = 1234
Configure them all under the main "elasticsearch" section as multiple
values, i.e.
[elasticsearch]
server = https://elastic1:1234
server = https://elastic2:1234
Allow the port to be omitted, and default it to 9200.
Require at least one server to be explicitly configured and throw a
provision exception if there are none.
During init prompt for the server, defaulting to http://localhost:9200.
Since the init framework doesn't support reading or setting string lists,
if there are multiple server values it will prompt the last one. Mention
in the documentation that configuration of multiple servers must be done
manually.
Since it is not expected that Elasticsearch is being used in production
anywhere, no backwards compatibility with the previous configuration is
provided. Users must adjust their configuration to the new format.
Add a new test, ElasticConfigurationTest, which in this initial version
only tests the configuration of the elasticsearch.server. More tests may
be added in follow-up commits.
Bug: Issue 9372
Bug: Issue 9383
Change-Id: Iad2c547ae82ba89b7ede777072e0869bc77d2025
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Limiting the heap causes severe performance degradation and
intermittent test failures when running all the tests at once.
This was not noticed before because only a subset of tests were
executed.
Rather than attempting to find a value that works, just revert
the limitation.
This reverts commit d332be11ab86f2922117e1d672fe72917578b673.
Change-Id: I8851025d14814aad4b03a917b548452fd4584a5f
|
|\ \
| | |
| | |
| | | |
init" into stable-2.14
|
| | |
| | |
| | |
| | |
| | | |
Bug: Issue 9384
Change-Id: I76bfd56c1bc6b6f7ac094227f76c14b4b249f239
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By default Elasticsearch tells the JVM to use a heap with a minimum
and maximum size of 1 GB [1]. We don't need to use so much for the
tests; limit the heap to minimum/maximum 128 MB.
[1] https://www.elastic.co/guide/en/elasticsearch/reference/6.3/heap-size.html
Change-Id: I568ba5ef89f53516a50bf83619fb1ec748877d4e
|
|\ \ \
| |/ /
|/| |
| | | |
stable-2.14
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the environment variable log4j.configuration is set, log files
defined by plugins don't get created because the appender can't be
found.
When creating a log file from a plugin, disregard the environment
variable and always create it with the given layout.
Bug: Issue 9345
Change-Id: Ic0bb86bfdc72fe34ce9a3cd7775daf346342b4ef
|
| | |
| | |
| | |
| | | |
Change-Id: I59bf396b993968b1a311bd0509566a3b8cf7c286
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The default username when installing Elasticsearch with X-Pack Security
enabled is "elastic". Allow to omit the username in the config, and default
it to "elastic" if a password was configured.
Change-Id: I927742be37637aa96e8055bf63e67c57375df9f2
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Switch to the regular (i.e. not "-oss") image for version 5.6 [1] which
includes X-Pack Security [2] by default.
Modify the configuration used by the 5.6 tests to set the password to
the default "changeme" value.
[1] https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
[2] https://www.elastic.co/guide/en/x-pack/5.6/security-getting-started.html
Bug: Issue 9095
Change-Id: I5c4adc86330635fd861749f0e460a8d3eb3a51a6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a new configuration value elasticsearch.maxRetryTimeout which is
used to set the retry timeout on the REST client. Make the value
default to 30000 ms which is the same as the default used by the
client when not set.
Remove the following configuration values which were previously used
to configure the JEST client and are redundant since moving to the
Elasticsearch REST client in change I720c9885c:
- elasticsearch.requestCompression
- elasticsearch.connectionTimeout
- elasticsearch.maxConnectionIdleTime
- elasticsearch.maxReadTimeout
- elasticsearch.maxTotalConnection
Bug: Issue 9373
Change-Id: Ie3dcbbfe2dec5944bb4a2549f64d9ee9cdab2ad5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the hosts member private and add a getter method. Move conversion
of the List to Array to this method.
In ElasticRestClientProvider, rather than keeping each used configuration
item as a member, keep the configuration and get each value from it as
needed. This will avoid having to add a new member for any new configs
that are added in future.
Change-Id: I711a53e90d59bb348a974872851856491755fb87
|
| |
| |
| |
| | |
Change-Id: I9e74ca8af9a6a7fa3259859b86e99c7400313fb7
|
| |
| |
| |
| | |
Change-Id: Iac9bd8b253212e730335bad073efa6e96344cc52
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Store the hosts as a List which is the type provided by the config class,
and only convert it to the native array when it's needed in the build
method.
Also, in ElasticConfiguration, rename 'urls' to 'hosts' to more closely
match its usage.
Change-Id: I9e86eee3b2bb0f246a20a0853a6ce6701d1592d2
|
| |
| |
| |
| | |
Change-Id: Ib53d70bc3a5fb7d390c4f95f0f4ff79efb2a28b3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is only possible for a user to delete their own change if they are
a member of a group that is assigned the Delete Own Changes permission.
This is counter-intuitive as it requires to either create a specific
group, or assign the permission to the Registered Users group.
Extend the permission checks to also allow assigning the permission
to the Change Owners group.
Change-Id: I13fa1bb1f4d0593d73cdb60d0fb4cb263de6c97c
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support for 6.3.0 was added in 2.14.9 but we overlooked upgrading
the REST client to the same version.
Change-Id: Ifc681fa07759715cc876e71dbfc9490b2b096c9d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
See https://twitter.com/bower/status/918073147789889536
bower moved their mirror to in house so they can put it behind a cdn.
This also resulted in a domain change.
Change-Id: Ie26d464687fe10a46c1fd83b9445c5fcf3cbbca9
(cherry picked from commit 2eaf593b63ea863084c86883259329fe3c54c6c4)
|
|/ /
| |
| |
| | |
Change-Id: I4fad262f7a938492748a38602c80676e9c07a682
|