summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 2.11.6v2.11.6David Pursehouse2016-02-028-8/+8
| | | | Change-Id: I88880291a338b210700bcbadd9c968ffe62dfff7
* Release notes for Gerrit 2.11.6David Pursehouse2016-02-022-0/+127
| | | | Change-Id: Id6bc60d895c8a1f6079edc1cd786ad347381daf5
* Update replication plugin to latest revisionDavid Pursehouse2016-01-291-0/+0
| | | | | | | - Revert "Replicate HEAD reference when replicating a project" - Fetch parent groups of the authGroups Change-Id: I0fab5d828fef06b583404f30cacf17f44c882da0
* Expose IndexCollection in plugin guice injectorDavid Ostrovsky2016-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secondary index underwent quite some evolution, by adding new fields or turning search predicates that (uncorrectly) used database to produce matches to use secondary index. When new index version is added, the previous index version must still be supported because of online reindexing feature. On very big site, reindexing may take hours, clearly such a long offline time is non acceptable, that why online reindexing feature was invented. To make online reindexing work, schema version must be fetched to route the current search predicate to use old (legacy) or new field. For that IndexCollection is accessed and the current schema version is read. Unfortunately, IndexCollection implements LifecycleListener and these classes are not copied in guice plugin injector when the plugin is loaded. This makes secondary index machinery not usable from within a plugin listener. For the reasons explained above some search predicates would try to retrieve the secondary index version but because singleton IndexCollection instance wasn't made available in plugin's guice injector, the correct instance is not found and guice injector creates new virgin IndexCollection instance where change index (and the schema version) is not set. As the consequence we are getting a NPE when secondary index is tried to be used from within plugin listener. To rectify, expose IndexCollection to plugin guice injector. Bug: Issue 3768 Change-Id: I2f9c40aa43aa7b1b954d8fa318df54e45dffcd95
* Merge "ReceiveCommits: Log error message when failing to insert patch set" ↵Edwin Kempin2016-01-221-0/+3
|\ | | | | | | into stable-2.11
| * ReceiveCommits: Log error message when failing to insert patch setDavid Pursehouse2016-01-201-0/+3
| | | | | | | | Change-Id: I15f4b6523368fe448d47253b8e908138d6692ccd
* | Merge "ReceiveCommits: Remove declaration of unthrown exception" into ↵Edwin Kempin2016-01-221-2/+1
|\| | | | | | | stable-2.11
| * ReceiveCommits: Remove declaration of unthrown exceptionDavid Pursehouse2016-01-201-2/+1
| | | | | | | | Change-Id: I3492be14103f31ef75e02aa2f78d5a247c78d7bf
* | Merge "Return case-preserving email when suggesting reviewers" into stable-2.11David Pursehouse2016-01-212-2/+6
|\ \
| * | Return case-preserving email when suggesting reviewersSaša Živkov2016-01-192-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Ie82c014e0 introduced case-insensitive by email search for reviewers, it also introduced a bug by returning the lower-cased email to the client. In case when an email for an account contained upper-case letter(s), this account couldn't be added as a reviewer by selecting it from the suggested list of accounts because its email (as received from the suggest reviewers REST call) was lowercased and Gerrit couldn't find such an account when adding the reviewer. The Ie82c014e0 already stored both original and lowercased email fields in the index, it just did it in a wrong order. Lucene's Document.get(fieldName) returns the first value of the field when there are multiple values. To fix the issue swap to order of the lower-cased and original-case values for the EMAIL field in the index. Change-Id: I4d9025810252641028288d961a1f9e62dd7b8e3e
* | Remove documentation of --type option from ls-groups commandDavid Pursehouse2016-01-211-10/+0
| | | | | | | | | | | | | | | | The --type option was removed in Change Ia67add4630 which was included in Gerrit version 2.9. Bug: Issue 3830 Change-Id: Iac6e46bd983acf111aa515738057dd372feb705b
* | Update replication plugin to latest versionHector Oswaldo Caballero2016-01-191-0/+0
|/ | | | | | - Replicate HEAD reference when replicating a project Change-Id: Ia18a416dc5ea29c08523148373476354ed7f0a24
* Update replication plugin to latest revisionDavid Pursehouse2016-01-131-0/+0
| | | | | | | - Revert "Remove obsolete remote.NAME.timeout from config documentation" - Add logging of cancelled replication events Change-Id: I5a90cdc11088a38a4957c0fecceb3827e078cc0c
* Use merge strategy for mergeability testing on "Rebase if Necessary" strategyOrgad Shaneh2016-01-131-2/+4
| | | | | | | | | | | | | | | | | | When a user pushes a chain of commits, they typically have inner dependencies, and it is likely that a commit in the middle of the chain cannot be merged by cherry-picking it alone, but if the chain is submitted in order it will be merged just fine. Applying cherry-pick for mergeability test fails for all the commits that cannot be picked without their dependencies, but this is obviously wrong when using "Rebase if Necessary", since the changes are never applied without their dependencies. With gerrit 2.12 this is even worse, since the Submit button is disabled for all the changes that are wrongfully marked as conflicted. Bug: Issue 3742 Change-Id: I6dd4d53e663bc9960c4c64b05cd011b87edcdabb
* OutputStreamQuery: Properly initialize c.patchSetsSebastian Schuberth2016-01-111-0/+1
| | | | | Bug: Issue 3762 Change-Id: I45eed63adddcdf124aabf3c2d71f4888501dea9d
* OutputStreamQuery: Minor indentation fixSebastian Schuberth2016-01-111-2/+2
| | | | Change-Id: I4f0265a97158671c616976067c09e9d0efc4ca29
* Improve documentation on commentlink.match regular expressionMatthew Webber2016-01-081-0/+5
| | | | | Bug: Issue 412 Change-Id: I2e7a7e0cc3d971d5f157be7e2f8899644d53c9de
* Fix handling of lowercase HTTP usernameLuca Milanesio2016-01-071-1/+5
| | | | | | | | | | | | | | When Gerrit config auth.userNameToLowerCase is set to true we need to convert the HTTP-provided username to lowercase as it is done on all the other authentication mechanism. Problem has been reported on version 2.12 but it seemed to be in the codebase since the beginning (see [1]). [1] https://groups.google.com/forum/#!topic/repo-discuss/spxE88RiDfo Change-Id: If4398bc959ee10e631149e96db05d272634d62ce Reported-By: Steffen Gebert <steffen@steffen-gebert.de>
* Remove warning about unstable change edit REST API endpointsDavid Pursehouse2015-12-181-3/+0
| | | | | | Since 2.11 these endpoints should be considered stable. Change-Id: I4023f5054a930f17982548bfb34bc20b3b703b70
* Document that ldap.groupBase and ldap.accountBase are repeatableDavid Pursehouse2015-12-161-0/+6
| | | | | | | | | | | | | | Both of these options can be given multiple times in the config file, for example: [ldap] accountBase = OU=Europe,DC=example,DC=net accountBase = OU=America,DC=example,DC=net accountBase = OU=Asia,DC=example,DC=net Extend the documentation to mention this. Change-Id: Iba684adc1beea145a7fdd1d1d71ca6c81bbda8a7
* Merge "OAuth-Linking: Don't create new account when claimed identity ↵David Pursehouse2015-12-161-6/+22
|\ | | | | | | unknown" into stable-2.11
| * OAuth-Linking: Don't create new account when claimed identity unknownDavid Ostrovsky2015-12-151-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Claimed Identity feature was enabled to support old Google OpenID accounts, that cannot be activated anymore. In some corner cases, when for example the URL is not from the production Gerrit site, like it's always the case on staging instance, the OpenID identity may deviate from the original one. In case of mismatch, the lookup for real user for the claimed identity would fail, and the linking mode is lost, and as the consequence a new account is created. Creating new account, when user asked for linking is always the worst option we have, as this cannot be easily undone. Detect this case, preserve the linking mode and keep trying to link instead of create new account. Note that in case this account already exist, the linking would fail with the sane message. Test Plan I: 1. Create gerrit site gerrit.example.org in year 2010 2. Configure the site to use OpenId (non SSO mode) 3. Observe that 85% user base using Google OpeID 4. After Google's OpenID shutdown in May 2015, nobody is able to login anymore using their account and link their identity primary to Launchpad 5. Swap production site to staging site with entire database and Git repository 6. Install gerrit-oauth-provider plugin and activate automagically Google OpenID old token discovery and linking option 7. Configure new OAuth application on Google developer console, but route it to gerrit-test.example.org. Note that this deviation breaks the old OpenID tokens! 8. Test with old user, that has OpenID Google account, that was additionally linked to Launchpad OpenID provider 9. Login with Launchpad OpenID iendtity for this user 10. Profile=>Setting=>Link another identity 11. Select Google OAuth provider offered by the gerrit-oauth-provider plugin 12. Intead of linking to the existing account (or linking error) new account is created 13. This diff fixed this. Error is issued, that the account already exist and linking is not possible Note that when all this would be done on real production site, this error wouldn't happen, because the URL wouldn't deviate and there wouldn't be token mismatch between OpenID token in the database and the token discovered by Google's OAuth OpenID scope. But still, we could easily prevent in this very specific corner case the creation of new account. Note that it's still possible with this setting to create duplicate account for this user by signing in directly with Google OAuth provider without linking mode. However, this would also work as expected on the real production site, because old OpenID token would match with the existing Gerrit account and linking would happen automagically. That is exactly why the option link-to-existing-openid-accounts = true was invented. Unfortunately there is no way to test that this work as expected already on staging Gerrit instance. Test Plan II: 1. User register first time after Google's OpenID 2.0 shut down with OpenID provider, say Launchpad 2. Login with Launchpad 3. Profile=>Setting=>Link another identity 4. Link with Google OAuth2 provider Expected: The OAuth2 identity is linked to the existing account. Actual: New account is created. This diff fixed it. The problem is that I apparently misunderstood the migration spec: [1] and assumed that the OpenID token is provided only when a user was already associated with this site. This is not true. OpenID token also returned for new users, that were never registered with this site before. To rectify it, and still to work for both, known and unknown users, we apply the check. If the OpenID token is known use it for linking. If it is not known, ignore it, but preserve linking mode. * [1] https://developers.google.com/identity/protocols/OpenID2Migration#map-identifiers Change-Id: Icf70cde5fd96cd72aa383218e1d143107a551b45
* | Update 2.11.5 release notes to mention forked buckDavid Pursehouse2015-12-091-0/+16
| | | | | | | | | | | | | | Add a warning that the Google repository needs to be added to the remotes. Change-Id: Ied78df702845215ba77f9ddef10e9d2b956a7df3
* | Revert "Update buck to ba9f239f69287a553ca93af76a27484d83693563"David Pursehouse2015-12-091-1/+1
|/ | | | | | | | | | | | | | | | | | | | | Buck was forked only so that I could build Gerrit on my Macbook with OSX El Capitan. However doing this made Gerrit not buildable for anyone who follows the build instructions, which do not include a step for adding the Google fork to the buck repository's remotes. It's not worth updating the documentation; this particular version of buck is only needed on the stable-2.11 branch and only if it's being built on OSX El Capitan. Instead, revert the fork, and live with the fact that we have to use Ubuntu, or a version of OSX that doesn't suffer from this issue, to build Gerrit. This reverts commit 4d97777677abccbd86e4023abd01e635984f70ee. Change-Id: I71e2e5d0e6ec758a5cd2ae7888fcd103d476a8bf
* ListTags: Fix NPE when annotated/signed tag has no tagger infoDavid Pursehouse2015-12-072-3/+6
| | | | | | | | | | | | | The implementation assumed that annotated/signed tags would always have a tagger, but this is not the case as we can see with the tag v0.99 on the git project [1], and this causes a NullPointerException when trying to convert to a GitPerson. Add a null check. Also update the documentation accordingly. [1] http://git.kernel.org/cgit/git/git.git/tag/?h=v0.99 Change-Id: I7dcb98a845d9a9e83c60d32f7ae5b51eba38bab6
* Improve visibility of comments on dark themesDoug Kelly2015-12-071-8/+17
| | | | | | | | | | | Comments when using dark themes were originally improved by Ie8b624b4201de696e6cfa282dca5f6000b1a901d, however due to a refactor, this CSS no longer worked in 2.11+. Update the CSS accordingly, and add a few more improvements for line numbers and range comments when using dark themes. Bug: Issue 3714 Change-Id: I8c4c69cbd8e988861a8022b6c906f98c54314b40
* CurrentSchemaVersion: Allow to use it in pluginsDavid Ostrovsky2015-11-301-3/+3
| | | | | | | | | | | To implement dedicated databases in plugin based on GWTORM, current version plays important role in upgrading schema version. Change the modifiers for the attributes and the constructor to allow this. Gerrit CI plugin needs this to support schema upgrade in init plugin step. Change-Id: I372be503cff79a48d1320244e625bc7c5635eca5
* Use REST implementation to list members for label with group operatorEdwin Kempin2015-11-274-61/+29
| | | | | | | | ListMembers already implements the listing of group members and we should not implement the same logic in ChangeQueryBuilder once again. Change-Id: I5eb406355dc21ec88d329a2563fdd432610bcb45 Signed-off-by: Edwin Kempin <ekempin@google.com>
* InitAdminUser: Don't assume the group ID of the Administrators groupDavid Pursehouse2015-11-271-1/+4
| | | | | | | | | | | | | When using a database configuration where auto-increment column values are pre-allocated, it is possible that the "Administrators" group is created with an ID other than "1". In this case, the created admin user will not be added to the correct group, and will not have the correct admin permissions. Instead of hard-coding the group ID, get it from the database. Bug: Issue 3698 Change-Id: Ie9b3f4f9166d03e91d58b2ec584c5ce47aa2021c
* Fix query for changes using a label with a group operator.Khai Do2015-11-264-10/+127
| | | | | | | | | | | | | | | | | | The group operator is being ignored when searching for changes with labels because the search index does not contain group information. This change will convert a group query into mutiple user queries. For example the query: 'label:Code-Review=+1,group=heros' Gets expanded to: 'label:Code-Review=+1,user=superman OR label:Code-Review=+1,user=batman' The latter is the actual query. Bug: issue 3018 Change-Id: Ief5408ee4774f9491fe713b0089e76aa4cae4403
* Add !important back to .cm-searching and .cm-trailingspaceMichael Zhou2015-11-261-2/+2
| | | | | | | Those were removed in change I907068f45, causing search results and trailing whitespaces to not be highlighted in intraline diff chunks. Change-Id: Ica8f8611cecdd34f0013fa5d3a67929cb1cb139d
* HttpPluginServlet: Fix "short read of block" IO error on plugin docsLuca Milanesio2015-11-261-3/+1
| | | | | | | | | | | | | When accessing plugins static resources from the Jar, treat the JarEntry size as a "hint" to the expected uncompressed size, rather than the exact size. Treating as "exact value" can result in an IO error whilst reading the resource: java.io.EOFException: Short read of block Change-Id: I6b488e58bb34620483d9ed7524ac3c23ce44071a
* HttpPluginServlet: Use try-with-resource in readWholeEntryDavid Pursehouse2015-11-261-4/+1
| | | | | | | | | | This was already done on master/stable-2.12 in change I94f481a33 which updated several places to use try-with-resource. Backporting this specific one so it's easier to apply Luca's fix for "short read of block" without conflict. Change-Id: I1ec84f15b09b860c3f416a5000ad4e950a2a3977
* Make InternalChangeQuery.query public so it can be used by pluginsDavid Pursehouse2015-11-241-1/+1
| | | | Change-Id: I83ca1ef41ab0ba7728ae60e075d6a7986cc91d50
* Merge "InitPlugins: Suggest to upgrade installed plugins per default" into ↵David Pursehouse2015-11-201-4/+5
|\ | | | | | | stable-2.11
| * InitPlugins: Suggest to upgrade installed plugins per defaultDavid Ostrovsky2015-11-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So we had again Gerrit outage for wrong default plugin installation option during gerrit upgrade from 2.10.4 to 2.10.7: [1]. The reason for that outage was wrong default option for plugin installation or upgrade in gerrit installer: Install plugin reviewnotes version v2.10.2-18-gc6c5e0b [y/N]? Gerrit administrator relies on the installer suggesting the right thing to do per default. And always confirms the default option suggested by Gerrit installer. In this specific case, the installer made it too easy to shoot the admin in the foot, because JGit version had API changes, by removing the function release() in favor of close(), and by not updating the plugin(s) installer left the Gerrit site in inherently broken state. Note, that Gerrit admin neither must necessarily know if libraries that are used by plugins had incompatible changes in Gerrit core or not, nor Gerrit admin is supposed to study the Git history of all related libraries before upgrading Gerrit site. It's always the right thing to do to upgrade the plugins. [1] http://paste.openstack.org/show/476639 Test plan: * The plugins suggested to be upgraded per default on site upgrade: Installing plugins. Install plugin replication version v2.11.4-29-gefa3c6a [Y/n]? version v2.11.4-29-gefa3c6a is already installed, overwrite it [Y/n]? Install plugin singleusergroup version v2.11.3-3-gf6df712 [Y/n]? version v2.11.3-3-gf6df712 is already installed, overwrite it [Y/n]? Install plugin download-commands version v2.11.3-11-g86eb557 [Y/n]? version v2.11.3-11-g86eb557 is already installed, overwrite it [Y/n]? Install plugin reviewnotes version v2.11.3-8-g26f38c4 [Y/n]? version v2.11.3-8-g26f38c4 is already installed, overwrite it [Y/n]? Install plugin commit-message-length-validator version v2.11-4-g8d295ed [Y/n]? version v2.11-4-g8d295ed is already installed, overwrite it [Y/n]? Change-Id: I5d7f83f050144fda9c084fff3f163c120c642077
* | Merge changes I6728ef75,I5f321aa8 into stable-2.11David Pursehouse2015-11-204-7/+7
|\ \ | |/ |/| | | | | | | * changes: Make JdbcUtil#port() public Allow to use GWTORM Key classes in plugins
| * Make JdbcUtil#port() publicDavid Ostrovsky2015-11-171-1/+1
| | | | | | | | | | | | This allows us to use it from plugins. Change-Id: I6728ef75d48af078e488cf06f886902d8963c576
| * Allow to use GWTORM Key classes in pluginsDavid Ostrovsky2015-11-173-6/+6
| | | | | | | | | | | | | | | | | | To implement dedicated databases in plugin based on GWTORM, keys are needed. Currently they can only be used from classes located in the same package. Changing the modifiers to public allow the plugin to reuse them, without keep using the same package name as in Gerrit core. Change-Id: I5f321aa89dbb9b71945c4bc53151e3d5a26cce74
* | SiteIndexer: Always scan changes from repo/dbDave Borowitz2015-11-192-26/+27
|/ | | | | | | | | | | | | | | | | This was changed to use ChangeCache in a2b7358d, with the intention of binding ChangeCache to ScanningChangeCacheImpl in Reindex. Unfortunately I forgot about the online reindexing case, where ChangeCache is bound to SearchingChangeCacheImpl in a running master. This had the effect of omitting from the list of changes to reindex any changes that were not already present in the index. In many cases this is fine, but if a change is missing for some reason (including a race condition during creation), it would not be found. Fix this by exposing the method in ScanningChangeCacheImpl to actually scan a repo, and using that from both its Loader and SiteIndexer directly. Change-Id: Id384ff93abbb7b6c54819b6c2672fb1f45dc55bc
* Set version to 2.11.5v2.11.5David Pursehouse2015-11-129-9/+9
| | | | Change-Id: I40e9ae66e3761c09de0697f39740d49d0b491aa1
* Release notes for Gerrit 2.11.5David Pursehouse2015-11-132-0/+90
| | | | Change-Id: I30af4773f610d4ddecb305f811591fd279c5b2a7
* Update replication plugin revisionDavid Pursehouse2015-11-121-0/+0
| | | | | | | - Destination: parse replication delay and retry as time units - Remove obsolete remote.NAME.timeout from config documentation Change-Id: I272cb2a8ff9023df0580378ddd6419942fbfe116
* Display latest result of branch list screen's filterSimon Hwang2015-11-121-2/+4
| | | | | | | | | | | Before the fix the branch list screen displays branches based on the filter but sometimes failed to display the latest result when filter is typed fast and server is slow enough. This change ensures that the branch list screen always displays the latest result of the filter. Change-Id: Iea902adea7f5e9753a54e140ebc0cbfff1f12239
* Merge "AccountManager: Update display name only if it is not null." into ↵David Pursehouse2015-11-121-0/+2
|\ | | | | | | stable-2.11
| * AccountManager: Update display name only if it is not null.Nadav Samet2015-11-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | During account linking initiated by the HttpLoginServlet, the code overrides the user's display name with null. This commit ensures that overriding the display name can only be done when the provided value is not null. Bug: Issue 3612 Change-Id: I8f47f5025349a244e2110aac902b44285cf8ad35
* | Merge "BanCommitCommand: Do not use commons.collections" into stable-2.11David Pursehouse2015-11-112-3/+1
|\ \ | |/ |/|
| * BanCommitCommand: Do not use commons.collectionsDavid Pursehouse2015-11-102-3/+1
| | | | | | | | | | Bug: Issue 3662 Change-Id: I7d6656f71fe9dea1b93a3f2fcc247104f7848f1a
* | ChangeHookValidator: Fix old revision retrieval for root commitDavid Ostrovsky2015-11-111-2/+4
| | | | | | | | | | | | | | | | onCommitReceived should not try to get the parent for the first commit in an empty repository. Bug: Issue 3666 Change-Id: Ib8ce3d69dc3dfce3ea9aec9315315f266c589eef
* | InlineEdit: Enable inline comments retrieval in change screenDavid Ostrovsky2015-11-112-3/+14
|/ | | | | | | | | | | Inline comments retrieval was erroneously disabled in change screen. While drafts cannot be created and published on change edits, comments from the based patch set should be shown. Activate this code path again and filter the file table for the patch set, the change edit is based on. Bug: Issue 3659 Change-Id: I6781f1e46174466165b7091a7311808e39a55fbc