| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: If9299908a0a894e674371dd6e2bf227241202eb4
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-2.14:
GerritServerId: Update comment for correct location of server Id
Index{Activate,Start}Command: Include name in error message when unknown
Index start/activate command: fix unknown name use
Index start/activate commands: fix Elastic support
Change-Id: I0227ce9f054b7d904639fcd0c64183a1ab85c344
|
| |\
| | |
| | |
| | | |
into stable-2.14
|
| | |
| | |
| | |
| | |
| | |
| | | |
The server id is stored in gerrit.config, not etc/uiid
Change-Id: I2c4a9f255de8734d821d70f6c6b8ae25a308b926
|
| |/
| |
| |
| | |
Change-Id: I738b56bfb953ccd75ba84b16fc3c22f26b8a21dd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this fix, using the IndexStartCommand [1] while passing an
invalid or unknown index name with the --force option led to an NPE in
the log, thus a fatal error in user's console. Also, using an unknown
index name either without --force or through the sibling
IndexActivateCommand [2] used to display an inaccurate console message.
This fix always shows a clearer message to the user, upon passing an
unknown index name to either [1] or [2]. It also now prevents that NPE.
[1] https://gerrit-review.googlesource.com/Documentation/cmd-index-start.html
[2] https://gerrit-review.googlesource.com/Documentation/cmd-index-activate.html
Bug: Issue 8715
Change-Id: I16cb800fbe9af00e47bb22105d1c4d4bf044fdc5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this fix, the IndexStartCommand and IndexActivateCommand worked
only for the Lucene index-type case. Replace the latter hard-coded case
with support for it but also the Elastic case as well. Meaning, use
AbstractVersionManager rather than its LuceneVersionManager sub-type, so
that ElasticVersionManager can also be (seamlessly) supported for those
commands. Hence bind AbstractVersionManager to the configured sub-type
class, in order for it to be used that way.
This change can be fully tested through using the --force option of the
gerrit index start command [1]. The gerrit index activate command [2]
does not have such an option.
[1] https://gerrit-review.googlesource.com/Documentation/cmd-index-start.html
[2] https://gerrit-review.googlesource.com/Documentation/cmd-index-activate.html
Bug: Issue 8584, Issue 8585
Change-Id: Ibd8d22dca3a94e8b6a81db2935d1c34b1e80401d
|
|\|
| |
| |
| |
| |
| |
| | |
* stable-2.14:
Fix support for python3 in tools/js/bower2bazel.py
Change-Id: Ie650a12f9cd27e776e16057a844a81ed0402b7ad
|
| |
| |
| |
| |
| | |
Change-Id: I1f222dafcacbdfe8525c95823a2e4ab07493460a
(cherry picked from commit 0fb28c14d356030ffc06401d4a3644ee2a09e54d)
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: If37864289dbdc17e2f6c04297d32bb2a38074b5a
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previosuly, 404 errors showed a generic error message, making it unclear
what could have gone wrong. For security reasons, we don't want people
to know if the group does not exist or if the group exists but the user
does not have permission. This change updates the error message to
reflect both of these possibilities.
Bug: Issue 8252
Change-Id: I6940d53b342a81ca10ec78977de4ec548fd10a6f
(cherry picked from commit 01a9e9d4be44d8743f97ddcd232ce203b9b903ec)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Lower the log of a project lookup failure to DEBUG, so that noise
can be reduced when creating a new project.
For all other exceptions, keep the warning as before, because
it could be a project corruption or misconfiguration.
Bug: Issue 8703
Change-Id: If844b9845c4c6588a119102942b45796e5ce723f
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
* stable-2.14:
Fix index ssh commands with elasticsearch type
Change-Id: I52384174fbfc63d4b54df7ff9676c0fc2f0bbbe2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, executing the index changes and project ssh commands on the
elasticsearch index type Gerrit site would result in the error: "fatal:
gerrit: index not found". This change modifies the condition that
restricts the indexing of changes and projects to only Lucene type site
so that the index commands are available for the elasticsearch type
site.
Bug: Issue 8690
Change-Id: I139ffad045b4d855f7b341c769fa38c3831cd58c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The keybinding for shift+r was erroneously returning every time.
Removing the check allows the keyboard shortcut to work again.
Bug: Issue 8574
Change-Id: Ifb84d4d7347dce28121393b2cdb64cc88c97e8f3
(cherry picked from commit 6b11a72277fb226f3a8dea4b359e36f70356547f)
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
into stable-2.15
* changes:
Remove unnecessary 'algorithm' parameter of PatchListKey
Remove some more false negatives for edits due to rebase
Remove some false negatives for edits due to rebase
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Because of I209cf815, the 'algorithm' parameter of PatchListKey isn't
necessary anymore. As that change tried to avoid an invalidation of the
PatchList cache, it wasn't removed at that time. Since I18018676
needs to invalidate the PatchList cache, we use the opportunity to get
rid of this parameter.
Change-Id: I540325c7694af395ee820b5c3d0dd9d56adf2318
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The 'begin' value of JGit's Edit is inclusive while the 'end' value
is exclusive. For the transformation of edits in EditTransformer, we
were a bit too careful by treating the 'end' value as inclusive for
determining whether hunks overlap. This resulted in some edits not being
marked as due to rebase even though they could have been.
This change requires an invalidation of the PatchList cache and hence
also of the IntraLineDiff cache.
Bug: Issue 6583
Change-Id: I18018676d0ab90ed45498e893896621edd7052e1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When intraline diffs are enabled, we apply some optimizations (see
Ie9f4210c2). Those optimization modify identified edits.
Unfortunately, this clashes with the highlighting of edits due to
rebase. As we use JGit's Edit class to represent an edit, we don't have
a way to pass any additional details along with an edit. For this
reason, we compare all identified edits with the ones we know are
introduced by a rebase right before we send the diff results out of the
Gerrit server. This only works if the identified edits aren't modified
after being computed by JGit's diff mechanisms.
A side effect of this issue is that the number of added/deleted lines
for a file on the change screen doesn't always match the number of
added/deleted lines of the regular hunks shown on the diff screen when
comparing patch sets. The reason is that we use the non-intraline diffs
for the numbers shown on the change screen even when intraline diffs
are shown to a user on the diff screen.
To fix this, we don't apply the optimizations whenever an edit due to
rebase is involved in a to-be-combined edit. As users shouldn't need to
look closely at any edits/hunks which are introduced by a rebase, it
should be innocuous that we don't apply the optimizations in that case.
Ideally, we would switch our internal representation from Edit to a
custom class which allows us to associate custom attributes with an
edit. In that case, we could apply the optimizations again for
to-be-combined edits which consist completely of edits due to rebase.
Using the optimization for mixing edits with edits due to rebase still
wouldn't be possible. As this refactoring takes some more effort, we at
least get in this quick fix for the moment.
This change needs to invalidate the IntraLineDiff cache.
Change-Id: If68b68b4cebd243defdb71181326a1eceee95954
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some endpoints allow both JSON and raw input. parseRequest selects
whether to parse to JSON using a reader or to provide the raw input as
an InputStream based on the request's content-type.
Since v2.15-rc0~1847^2 (Discard request HTTP bodies before writing
response, 2017-03-16), on endpoints that permit raw input, we call
getInputStream to obtain the rest of the response body and discard it
before writing the response. When the request was JSON, this produces
errors from Jetty, since calling getInputStream after getReader violates
the servlet API:
[HTTP-66] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in PUT /a/plugins/reviewers.jar
java.lang.IllegalStateException: READER
at org.eclipse.jetty.server.Request.getInputStream(Request.java:844)
at javax.servlet.ServletRequestWrapper.getInputStream(ServletRequestWrapper.java:138)
at javax.servlet.ServletRequestWrapper.getInputStream(ServletRequestWrapper.java:138)
To fix it, instead of guessing whether this was a raw request based on
whether the endpoint supports raw requests, use the parseRequest result
to decide whether this is a raw request for which we need to discard any
unconsumed content.
Bug: Issue 8677
Change-Id: I1db69104f31e1c04b137d994523422a07ca5cf43
(cherry picked from commit 91136bb28ec45cbbd66e7d8aabe209a6faa7eb2a)
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| |
| |
| |
| | |
* stable-2.14:
ElasticTestUtils: also reuse index name constants
Change default elasticsearch prefix to gerrit_
Fix init with elasticsearch and companion reindex
ElasticChangeIndex: reuse change index name string
Change-Id: Ic36572111501cae21a09dde364342d14a177fdfc
|
| |
| |
| |
| |
| |
| |
| | |
Rather than the no longer reused _PREFIX ones, now that the index name
constants are all properly refactored, which enabled such reuse.
Change-Id: Ifc1244f5633fc31f6c71bca1277dbe2fab5a8a82
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
AbstractElasticIndex: use the real (raw) index name in markReady
(setReady, towards index config), rather than the one formatted with
prefix and version suffix. Indeed, setReady assumes no prefix in index
config and already appends the version -independently of the raw index
name.
Concatenating the prefix with index names (alongside versions) is
already assumed internally within gerrit when interacting with its
Elasticsearch indices. Such a dynamic, on-the-fly behaviour is based on:
1. the prefix -for this site instance, configured in gerrit.config, and
2. index names with version suffixes, configured in gerrit_index.config.
VersionManager classes: align the Elasticsearch implementation with the
one for Lucene. Namely, make the 'dirtiness' of Elastic versions
consistent with Lucene's. Meaning, align the existence nature of an
index between the two implementations: have an Elasticsearch index exist
only if part of the Elasticsearch server indices, even if listed as a
known schema version. The lucene implementation does this through the
existence of a corresponding index directory, within the site.
Before the aforementioned co-fixes, reindexing a site just initialized
with elasticsearch failed, by means of extra indices generated within
gerrit_index.config:
1. some with previous schema versions and ready = false set for them,
2. and some others with wrongfully prefixed index names, which also had
their version suffix doubled; e.g., [index "gerrit_changes_0039_0039"],
which reads [index "changes_0039"] and appears only once after this fix
(also expectedly set as ready = true).
The above sample exposes the fact that such a 'gerrit_' prefix does not
match the default 'gerrit' (no trailing underscore). A follow-up change
could consider changing that default to a more readable gerrit_ prefix.
The current Elasticsearch implementation still requires a reindex after
a site init, as per the ui console message already shown -telling the
init user about such a necessity. So, a reindex is required in order to
generate gerrit_index.config after an init, and this very change is to
properly generate that file, for the site to work with Elasticsearch.
Bug: Issue 8553
Change-Id: I33d0f02fcca1bacb9d66c57f3d0bc3fa3b233197
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It looks nicer than just gerrit, for example:
gerrit_accounts_0004
gerrit_groups_0002
gerrit_changes_0039
rather than:
gerritaccounts_0004
gerritgroups_0002
gerritchanges_0039
Change-Id: I477d1715f80bf2bc5a7cbe16b16ce92fbddce03b
|
| |
| |
| |
| |
| |
| |
| | |
Align such reuse with the current one in the sibling ElasticAccountIndex
and ElasticGroupIndex classes.
Change-Id: I5ccf05b279fab49b16c803f3cf4db6b560fc4983
|
|\ \
| | |
| | |
| | | |
stable-2.15
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a wrapper method that tries to call open() with Python 3 semantics,
and falls back to Python 2 if it fails.
Bug: Issue 8609
Helped-by: Paladox none <thomasmulhall410@yahoo.com>
Change-Id: Ic46eb31a23506d47edcf6518dc1ccfb274f45c52
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ia8f06bd02dc4aba95d8ff103f33572f8054b39cf
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|/ / /
| | |
| | |
| | | |
Change-Id: If7c5853cfcffad27017f241df9c8ffe576534948
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I5b6b014d06f76981adeded4d4e62e0a859f57e26
|
|\ \ \ \
| |_|/ /
|/| | /
| | |/
| |/|
| | |
| | | |
* stable-2.14:
Mention groups index in documentation of index start command
Change-Id: I2fc1e735c4b701408a367c69f464a42f019db235
|
| | |
| | |
| | |
| | |
| | | |
Bug: Issue 8629
Change-Id: I61317f6485962069729166b601a109706e71a0a1
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change I4878f066b6 allowed administrators to toggle the WIP flag on any
change but the UI action was still disabled for admins.
Change-Id: I55dd6400dc07d57fe2aaaf3528ff429d5baf48ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Sometimes this can be useful, e.g. if one developers starts a WIP
change, goes to vacation and another developer makes the change ready.
At the moment the WIP flag cannot be removed by anyone else than the
change owner.
Change-Id: I4878f066b633b349dbfe927480ebb143539bf4d3
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For external groups the group name is missing if there is no group
backend that can resolve the group UUID. E.g. this can happen when a
plugin that provided a group backend was uninstalled (e.g. the
singleusergroup plugin).
Change-Id: I0d7f7253698c0125d7692781fa32f4294cda3bcc
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The group name is missing if there is no group backend that can resolve
the UUID. This can e.g. happen if the singleusergroup was used and
single user groups have been added to Gerrit groups, but then the
singleusergroup plugin was uninstalled so that the single user groups
can no longer be resolved.
Change-Id: I1bccec4bb38b55f6ad9b2d2ac83227b379d09071
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A group UUID cannot be resolved if there is no groupback that handles
it. This can e.g. happen if the singleusergroup was used and single user
groups have been added to Gerrit groups, but then the singleusergroup
plugin was uninstalled.
Change-Id: I87b83c3904172e8ff32cfd07c15e9a9951921c71
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-2.14:
Limit assignee suggestions to users that can see the change
Add account predicate that checks if user can see a certain change
Change-Id: Ia1bf19cf51533fd7eb1f0d79de369999bda38fc7
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: Issue 5181
Change-Id: Ib64248a285e8feca1fd8f18e825f302d09d252ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This predicate is useful if account queries are used to suggest users
in the context of a change, because then users that can't see the
change should be filtered out. E.g. this predicate should be used when
suggesting assignees for a change.
Change-Id: I2c43d04c65718e1e6419cf94c4bbfb21aaf7d9f8
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: Issue 5181
Change-Id: Ib64248a285e8feca1fd8f18e825f302d09d252ed
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This predicate is useful if account queries are used to suggest users
in the context of a change, because then users that can't see the
change should be filtered out. E.g. this predicate should be used when
suggesting assignees for a change.
Change-Id: I2c43d04c65718e1e6419cf94c4bbfb21aaf7d9f8
Signed-off-by: Edwin Kempin <ekempin@google.com>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
* changes:
Included-In dialog polish
PolyGerrit: Add support for "Included In"
|