summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 3.0.7v3.0.7David Pursehouse2020-02-055-5/+5
| | | | Change-Id: I65149602f87c148a84c19f5fa8511d85f46b80ff
* Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-02-053-5/+14
|\ | | | | | | | | | | | | | | | | | | | | * stable-2.16: Fix method name to register custom event types in plugins Don't send mails on publish change edits for WIP changes PatchSetInserter: allow to set "sendEmail" bit Set version to 2.16.17-SNAPSHOT Set version to 2.16.16 Change-Id: I997906ae9b014b3708cbbbdce444416bd01d57b0
| * Merge changes I6dd2035d,I6b6710d1,I43c5d7c6 into stable-2.16David Pursehouse2020-02-046-7/+28
| |\ | | | | | | | | | | | | | | | | | | * changes: Fix method name to register custom event types in plugins Don't send mails on publish change edits for WIP changes PatchSetInserter: allow to set "sendEmail" bit
| | * Fix method name to register custom event types in pluginsDavid Ostrovsky2020-02-041-3/+3
| | | | | | | | | | | | Change-Id: I6dd2035de403e3d6ce1d7c78634a3a0ffd8feff1
| | * Don't send mails on publish change edits for WIP changesDavid Ostrovsky2020-02-042-2/+9
| | | | | | | | | | | | | | | Bug: Issue 10397 Change-Id: I6b6710d17138f277ac118924355311d192710f5c
| | * PatchSetInserter: allow to set "sendEmail" bitChangcheng Xiao2020-02-043-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this new "sendEmail" bit, we will have more control for whether emails are going to be sent out after a new patch set is added. This is useful for avoiding duplicate emails, e.g merge (already have an email to notify a change is merged, no need to have another email to say a new patch set is uploaded). Change-Id: I43c5d7c6560316d5a6034dc8e711f7e87b7af932
| * | Set version to 2.16.17-SNAPSHOTLuca Milanesio2020-02-046-6/+6
| |/ | | | | | | Change-Id: I0de189351cf696c14127f303bfbdcfcb9efe87c3
| * Set version to 2.16.16v2.16.16Luca Milanesio2020-02-046-6/+6
| | | | | | | | Change-Id: I3d0d1c1e89dd6bc2030056ab8a4ce09189403a06
* | CreateChange#getCommitMessage: Remove unused parameters and variableDavid Pursehouse2020-02-041-9/+2
| | | | | | | | | | | | | | The merge done in change I666ee4c2c accidentally introduced unused parameters and an unused variable in the getCommitMessage method. Change-Id: I25afa4519f2ab2ce5e19387ca7e38fd44247b755
* | Remove MessageOfTheDay extensionThomas Draebing2020-02-032-65/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The message of the day functionality was heavily depended on components of Gerrit core. In Gerrit-3.0 only the extension point was left of this feature, but it wasn't used anywhere to actually display the messages registered with it. While this feature was reenabled for the PolyGerrit-UI in Gerrit 2.16, for compatibility reasons, it still depended on the components in Gerrit core. It is planned to move this functionality completely to the plugin. Since it was not usable with the new UI for a long while, the functionality will be removed completely until then. Change-Id: If653e7042db981e55d08fa29e14dd9201fb22627
* | Revert "Add MessageOfTheDay-entries to ServerInfo"Thomas Draebing2020-02-034-72/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c77032cc74b2d766cb8eb69b65a205dd0d8a5887. The message of the day functionality is still heavily depended on components of Gerrit core. It is planned to move this functionality completely to the plugin. Since it was not usable with the new UI for a long while, the functionality will be removed completely until then. Change-Id: I7a426d1814f29b3674283ee22132cee326894470
* | Revert "Add UI element to display messages of the day"Thomas Draebing2020-02-035-164/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1fbf53df6049cdadc8b2b2dd5bb61a19eefd90d4. The message of the day functionality is still heavily depended on components of Gerrit core. It is planned to move this functionality completely to the plugin. Since it was not usable with the new UI for a long while, the functionality will be removed completely until then. Change-Id: I7a1a0470932a0ba6275a54a4bc52b34237a219eb
* | Revert "Document MessageOfTheDay extension"Thomas Draebing2020-02-032-39/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cfff720610374fe538649f272a762569bb785998. The message of the day functionality is still heavily depended on components of Gerrit core. It is planned to move this functionality completely to the plugin. Since it was not usable with the new UI for a long while, the functionality will be removed completely until then. Change-Id: I6f8b13a92e8b20efce0748c27db631bacbda3123
* | Merge branch 'stable-2.16' into stable-3.0Thomas Draebing2020-02-0311-10/+273
|\| | | | | | | | | | | | | | | | | | | * stable-2.16: Tests: Use helper method for config change Document MessageOfTheDay extension Add UI element to display messages of the day Add MessageOfTheDay-entries to ServerInfo Change-Id: Ifd30e0eb3831373450559efe1759ab72a8e1d292
| * Merge changes from topic "motd" into stable-2.16Saša Živkov2020-02-0310-1/+271
| |\ | | | | | | | | | | | | | | | | | | * changes: Document MessageOfTheDay extension Add UI element to display messages of the day Add MessageOfTheDay-entries to ServerInfo
| | * Document MessageOfTheDay extensionThomas Draebing2020-01-312-3/+39
| | | | | | | | | | | | Change-Id: I99894e9d9b0376e11ac47796cee4c9e2e0c9be5a
| | * Add UI element to display messages of the dayThomas Draebing2020-01-315-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an UI element that displays messages registered with the MessageOfTheDay extension point. The messages will be displayed below the main navigation header. This functionality was already part of the GWT-UI, but was never migrated to the new UI. The messages can be dismissed by a button click, that will create a cookie that will prevent the message from being displayed again until the redisplay time configured with the message. The content of the message can be HTML. Depending on where the message- content is coming from, this might be harmful. In case of the messageoftheday plugin, the message is added as a config from the Gerrit server site, which can probably be considered save. However, in a future change rendering HTML should be made configurable and switched off by default. Text should then be rendered using `gr-formatted-text`. Change-Id: I2cbbcbcd49734b645701b9fac62a016a269d37f2
| | * Add MessageOfTheDay-entries to ServerInfoThomas Draebing2020-01-314-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The message of the day functionality was lost in the new PolyGerrit-UI, since the original implementation relied on the server side addition of the messages to the host page. This change adds the messages registered to the MessageOfTheDay- extension point to the ServerInfo, which can be fetched via Rest API. This allows accessing this information from the new UI. The UI elements that consume this information will be added in a followup change. Change-Id: I1deff5afbd812a1efaf6ad11e871544b36a5d88d
| * | Tests: Use helper method for config changeSven Selberg2020-02-032-25/+3
| | | | | | | | | | | | | | | | | | | | | Use enableCreateNewChangeForAllNotInTarget() from AbstractDaemonTest instead of duplicating the code. Change-Id: Ic2fe137533a7b6ad33fc1705947473766730bf56
* | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-02-037-38/+90
|\| | | | | | | | | | | | | | | | | | | | * stable-2.16: Generate Change-Ids randomly instead of computing them from commit content and timestamp Change-Id: I666ee4c2c2f10bdee0189fb376072232a221a633
| * | Merge "Generate Change-Ids randomly instead of computing them from commit ↵David Pursehouse2020-02-037-39/+90
| |\ \ | | | | | | | | | | | | content and timestamp" into stable-2.16
| | * | Generate Change-Ids randomly instead of computing them from commit content ↵Edwin Kempin2020-02-027-39/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and timestamp If Change-Ids are computed from the commit content and timestamp it can happen that 2 changes get the same Change-Id. E.g. this can happen if the Create Change REST endpoint is used to create empty changes in parallel. In this case the base commit, the commit content (empty) and the commit timestamp are the same, so that the same Change-Id is computed for several changes. This also means that the commit message and hence the commit SHA1 can be identical between the changes. If in a follow-up steps identical change edits are published in parallel on these changes you can even get non-empty changes for the same commit SHA1. Having multiple changes for the same commit SHA1 (and with the same target branch) is an inconsistency in Gerrit that Gerrit cannot deal well with (e.g. this causes issues during submit). To prevent such duplicate Change-Ids we are now randomly generating Change-Ids. This means 2 parallel Create Changes requests will use different Change-Ids even if the commit content and timestamp is the same. A new test does parallel calls to Create Change REST endpoint and verifies that commit SHA1's of the created changes differ (they differ because in the commit message we have different Change-Ids now). When the Change-Ids were computed from the commit content and timestamp this test failed. Also cherry-pick Change-Id: I9de36332 for keeping the secure random generation out of the GWT-related code and minimise the conflicts with the merge upstream. Bug: Issue 12246 Co-authored-by: Luca Milanesio <luca.milanesio@gmail.com> Change-Id: Ie4f01e5a32b1efca58f8b443ff046623f0e5f188 (cherry picked from commit 73163490b75a8d39aaa2eb60ba2de0cb27f6ba70)
* | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-02-031-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Highlight WORKSPACE as python Highlight BUILD.bazel as python Change-Id: I48d9cc5c83d6cd1a90517caa767e47ff26f59622
| * | | Highlight WORKSPACE as pythonDavid Ostrovsky2020-02-021-0/+1
| | | | | | | | | | | | | | | | Change-Id: I2f46d6de7989f3951fcea49475c52ea216b25c94
| * | | Highlight BUILD.bazel as pythonDavid Ostrovsky2020-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bazel supports both BUILD and BUILD.bazel files and in this issue: [1] there is a discussion to prefer BUILD.bazel over BUILD naming convention. Detect BUILD.bazel files as Python code in addition to BUILD files. [1] https://github.com/bazelbuild/bazel/issues/4517 Change-Id: Iabc719b914fcd08ef6e73c314f09f924540c3794
* | | | Merge branch 'stable-2.16' into stable-3.0Marco Miller2020-01-314-21/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Move documentation for Jetty metrics to a separate section Improve Jetty thread pool metrics Fix commentlinks with same prefix in pattern and link NoteDbMigrator: Totally skip migration for orphan changes Change-Id: Iff7f3ee762d3ca725144ad516f4b06ccb5759a07
| * | | Move documentation for Jetty metrics to a separate sectionMatthias Sohn2020-01-311-4/+9
| | | | | | | | | | | | | | | | Change-Id: Ibdb1516b091c81203c282384dbe8aa2276c838ff
| * | | Merge "Improve Jetty thread pool metrics" into stable-2.16David Pursehouse2020-01-312-12/+19
| |\ \ \
| | * | | Improve Jetty thread pool metricsMatthias Sohn2020-01-312-12/+19
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up change for be4184f7 which missed documentation. Also names of newly added metrics didn't align with existing metrics for REST API. - add documentation for the jetty metrics - improve descriptions of the jetty metrics - rename jetty thread pool metrics from httpd/jetty/* to http/server/jetty/* in order to align metric names with already existing REST API metrics Change-Id: I1d4eabec91749f28d09df7d2d29606b133fefc4d
| * | | Merge "NoteDbMigrator: Totally skip migration for orphan changes" into ↵David Pursehouse2020-01-312-4/+53
| |\ \ \ | | | | | | | | | | | | | | | stable-2.16
| | * | | NoteDbMigrator: Totally skip migration for orphan changesDavid Ostrovsky2020-01-112-4/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This case was explicitly handled by ChangeRebuilderImpl, and NoteDbMigrator in fact caught RepositoryNotFoundException and let the migration proceed. Unfortunately, this would then cause the primary storage migration step to fail with: com.google.gwtorm.server.OrmRuntimeException: change X has no note_db_state; rebuild it first Work around this by catching this exception and checking after the fact whether the change is known to be unrecoverably corrupt. There is already another check in place: no patch set, in which case the migration process would also proceed, that was added in I0439c7fc8e5. So that we are just adding yet another "supported" kind of change corruption recovery mechanism to the migration proccess. Also add a test that is trying to migrate two different changes from two different projects, where one project was deleted on the file system. That test demonstrates, that one change is completely migrated while for another change the migration is skipped, as it is detected as corrupted change. The usual use case for orphan changes, also, the changes with not existing git repsitories on the file system, is often seen for gerrit test instances: Database replicated from the production system but only a couple of git repositories are replicated, leading to orphan changes. Reported-by: Alan Tokaev <tokaev@gmail.com> Bug: Issue 12097 Change-Id: I516f40f03feaafe3014fabb0c2f5c40d6753b8bc
| * | | | Fix commentlinks with same prefix in pattern and linkThomas Draebing2020-01-312-9/+26
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If using the commentlinks.%NAME%.links option and having the same prefix in the pattern and the url, the parsing did not work properly. For example: [commentlink "test"] pattern = [Hh][Tt][Tt][Pp]example link = http://example.com and the line in the message: httpexample 1234 would result in: http<a href="://example.com" ...>httpexample 1234</a> This bug was introduced in a change implementing the possibility to have overlapping patterns, e.g. allowing a comma-separated list of issue ids. (commit: fb48902ef303d008c6f0dd38d654106c00313530). This would have however anyway only worked for the `html`-variant of comment links, which allow to directly provide html-elements as a substitute for the text matching the pattern. Thus, this change restricts the logic introduced in the above mentioned commit to the html-variant. Bug: Issue 12197 Change-Id: I9efd9308f2b40f3fec8405c93849d13d4576562a
* | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-01-311-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Use bugs.chromium.org in gr-linked-text_test Change-Id: I0ce5f97f302561c4ef2ac22dcff82fe6c6c5e5dd
| * | | Use bugs.chromium.org in gr-linked-text_testDavid Pursehouse2020-01-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests are using code.google.com issue tracker links but this tracker has not been used for ages. Replace them with links to the new Monorail tracker on chromium.org. This makes no functional difference in the tests, it is just a cosmetic change. Change-Id: I33fbc1cdc1f28a585f4c6c12a8bbd88568a20fc4
* | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-01-3113-15/+329
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Expose jetty threadpool metrics via dropwizard Fix editing name & email for service user Fix accountBelongsToRealm implementation Fix support for python3 in download_bower.py Change-Id: I4e2d984af74eac279ad22d11f3e606c3ef361c94
| * | | Merge "Fix support for python3 in download_bower.py" into stable-2.16David Pursehouse2020-01-311-1/+2
| |\ \ \
| | * | | Fix support for python3 in download_bower.pyPaladox none2020-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was getting "TypeError: write() argument must be str, not bytes" Change-Id: I68ba54f7df1ba4c9ae160442f93a74c837ddc9d3
| * | | | Merge "Expose jetty threadpool metrics via dropwizard" into stable-2.16David Pursehouse2020-01-315-4/+143
| |\ \ \ \
| | * | | | Expose jetty threadpool metrics via dropwizardMatthias Sohn2020-01-305-4/+143
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I91496c38683c4b41f11978d832eaacd1f60adcf0
| * | | | | Merge changes Ic4e04936,I6462d87c into stable-2.16David Pursehouse2020-01-317-10/+185
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | * changes: Fix editing name & email for service user Fix accountBelongsToRealm implementation
| | * | | | Fix editing name & email for service userFrancois Ferrand2020-01-293-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A service-user (either created by SSH command or through ServiceUser plugin) is actually not bound to the realm : so it makes no sense to check if the realm supports editing FULL_USERNAME or EMAIL. To overcome, we now check realm capabilities only for users which belong to that realm. Change-Id: Ic4e04936a5d2444bf6b4644a2f8a3838a2686256
| | * | | | Fix accountBelongsToRealm implementationFrancois Ferrand2020-01-294-2/+165
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to search the whole external id's string, instead of looking at the scheme only. In particular, when account deactivation is enabled, this causes deactivation of system accounts with username 'gerrit.xxxxx' (typically used for replication between gerrit instances). Bug: Issue 12243 Change-Id: I6462d87cb55040f5d1bdc949a763b19a9e010861
* | | | | DeleteZombieCommentsRefsTest: Open RevWalk in try-with-resourceDavid Pursehouse2020-01-311-7/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib151acaeca1d7c5e7371ccdd88b6c6e221a4a119
* | | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-01-301-15/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Improve log if VersionedMetaData fails to update Change-Id: I2c24678dc63c13b523068390474fe16c060559e0
| * | | | Merge branch 'stable-2.15' into stable-2.16David Pursehouse2020-01-301-15/+9
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | * stable-2.15: Improve log if VersionedMetaData fails to update Change-Id: Ic2635cf7319276dbf32d18c2c690bb3f38d0a3e7
| | * | | Improve log if VersionedMetaData fails to updateEryk Szymanski2020-01-301-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of lock failure there is no hint on what commit has caused it. This change adds ref log message, which is "commit:" + subject line of commit message or "commit: meta data update" in case of no commit message, to the exception message. Also extract the exception message creation to a separate method, so that the same info is available when update fails for other reasons. Change-Id: I5686e079853807ba88dae6d8ccf184eb81b50013
* | | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-01-290-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Replace documentation of gerrit.ui with gerrit.enableGwtUi Change-Id: I2b4d3f5befbb364d4279487fe454803dfa2ed9ec
| * | | | Replace documentation of gerrit.ui with gerrit.enableGwtUiDavid Pursehouse2020-01-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gerrit.ui setting is no longer supported. The default UI is always PolyGerrit and this cannot be changed. It is possible however to make the GWT UI available by setting gerrit.enableGwtUi; in this case the UI still defaults to PolyGerrit but allows the user to switch to GWT. Change-Id: Ifbeca8ea7d1c9c90c7f86e184fc365288129c1dd
* | | | | Merge branch 'stable-2.16' into stable-3.0David Pursehouse2020-01-299-74/+479
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: Use the environment variables provided by the GerritCodeReview-plugin DeleteZombieCommentsRefsTest: Open RevWalk in try-with-resource Documentation: Mention unused_deps with buildifier Bazel: Remove bazel version check Documentation: Recommend Bazelisk to launch bazel Add a pgm to delete dead draft comments refs Change-Id: I7ce0b91695a99cbfc630ba5fd69ba1cf20e84f7a
| * | | | Merge "Use the environment variables provided by the ↵Luca Milanesio2020-01-281-37/+7
| |\ \ \ \ | | | | | | | | | | | | | | | | | | GerritCodeReview-plugin" into stable-2.16