summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix "stopEdit" not disappearing under Polymer 2"master-basedPaladox none2019-08-021-1/+3
|\
| * Fix "stopEdit" not disappearing under Polymer 2Paladox none2019-08-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you click "edit", you are given the option to press "Stop Editing", but when you click "Stop Editing". The button is still shown (even though 'edit' is now shown). To fix this we assign a fake value to notifyPath. This works around the issue under Polymer 2. See [1]. [1] https://github.com/Polymer/polymer/issues/2631#issuecomment-325131305 Change-Id: I39be6483f3a8d36cbd22ee4a5fa59374c48ca8af
* | Merge "fix clone command in tutorial document"Tao Zhou2019-08-021-1/+1
|\ \
| * | fix clone command in tutorial documentTao Zhou2019-08-021-1/+1
| | | | | | | | | | | | Change-Id: Idf88bcdf970deacfd5e4226568b00624b0f13db4
* | | Merge "Fix broken link for rest-api-projects.html#commentlink-info"Edwin Kempin2019-08-021-3/+3
|\ \ \
| * | | Fix broken link for rest-api-projects.html#commentlink-infoGal Paikin2019-08-021-3/+3
| | | | | | | | | | | | | | | | Change-Id: Ifa0bd5e2d0029915c18e59c3ee19eed3a5e25028
* | | | RetryHelper: Fix spelling mistake in log messageEdwin Kempin2019-08-021-1/+1
|/ / / | | | | | | | | | | | | Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ib010b903dbc46a9897a4a5e328007f0f5d19cc37
* | | Merge "PluginContext: Fix one of the error messages for plugin failures"David Pursehouse2019-08-021-1/+1
|\ \ \
| * | | PluginContext: Fix one of the error messages for plugin failuresEdwin Kempin2019-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I177784f7ce77eb20c19121c464b08c9662728a75
* | | | Merge "Log encounters of invalid enum values in REST requests"David Pursehouse2019-08-014-1/+165
|\ \ \ \
| * | | | Log encounters of invalid enum values in REST requestsAlice Kober-Sotzek2019-08-014-1/+165
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A specified string value for an enum which doesn't match any existing enum value results in the enum field being simply ignored (= unset) in the request. This also means that simple typos in the name of an enum or the wrong case of it go unnoticed. We intend to reject such kind of requests and force callers to adjust their input. The base for this is already laid in this change. As a first step, we intend to only log such encounters, though. A follow-up change will change the behavior to rejections. As it's highly desirable to not re-implement all of the logic to map an enum to JSON and the other way around (and to also keep up with new Gson features), this change introduces a delegate implementation for enums which just does an additional check on top of the regular implementation. Due to this and limitations of Gson, we can't log the invalid enum value, though. This change also introduces some tests which document the current behavior. Those tests will also be helpful when we introduce the rejections in the future. Change-Id: I820fde9bca07038171da5d181518b9655d3a4dd2
* | | | Fix timeout waiting for endpoint properties initializationDmitrii Filippov2019-08-013-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gr-confirm-dialog contains gr-endpoint-decorator. gr-endpoint-param with the name action is bound to gr-confirm-dialog.action property. During the initialization, gr-endpoint-decorator waits while all properties are assigned. If a server returns revisionActions without submit property, then thr binding is not updated and gr-endpoint-decorator doesn't receive the notification when initialization is complete. Bug: Issue 11120 Change-Id: I529812c45edecf584897a4168fde28835feb316e
* | | | Merge "Add undefined check to gr-repo"Paladox none2019-08-011-0/+3
|\ \ \ \
| * | | | Add undefined check to gr-repoPaladox none2019-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Icb4dc00effe45492b6f84fe239f953267f444004
* | | | | Merge "Add undefined check to gr-list-view"Paladox none2019-08-011-4/+4
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Add undefined check to gr-list-viewPaladox none2019-07-311-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: Id4feb46555842a85353b3400a206a003d6cde027
* | | | | Merge "Document and test that plugins can throw RuntimeExceptions from ETag ↵Edwin Kempin2019-08-013-0/+43
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | computation"
| * | | | Document and test that plugins can throw RuntimeExceptions from ETag computationEdwin Kempin2019-08-013-0/+43
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error is encountered during the ETag computation in a plugin, the plugin can indicate this by throwing any RuntimeException. In this case no value will be included in the change ETag computation. This means if the error is transient, the ETag will differ when the computation succeeds on a follow-up run. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I08a91bfae5d37fe881ccee491f73ef5b35b4c180
* / | | AccountState: Remove generic key/value cachePatrick Hiesel2019-08-011-60/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AccountState grew a per-account, generic cache of properties. This is bad, because it makes AccountState mutable (values are added). AccountState is part of AccountCacheImpl's cache, so it should be immutable. We removed all callers on googlesource.com and there are no callers in Gerrit core or core plugins, so this commit removes this functionality. Change-Id: Icc0cac05466d650e89626d2493d999ff089d5ea9
* | | Merge "Consider change ETag computations from plugins when computing ETag ↵Alice Kober-Sotzek2019-07-312-7/+38
|\ \ \ | | | | | | | | | | | | for actions"
| * | | Consider change ETag computations from plugins when computing ETag for actionsEdwin Kempin2019-07-312-7/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I358e3d4fb added an extension point that allows plugins to contribute to the ETag computation of changes. One case where plugins need to contribute to the ETag computation is if they implement a SubmitRule which is based on plugin data, because only then it is guaranteed that callers always see current submittable information in ChangeInfo. In the case where a plugin implements a SubmitRule it is also important to include the change ETag computations from plugins when the ETag for revision actions is computed because the revision actions decide whether the 'Submit' button should be shown. If change ETag computations from plugins are not considered when the ETag for the revision actions is computed it can happen that the submittable information in ChangeInfo disagrees with the presence/absense of the 'Submit' button. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Id83533e7b67cc82737feb6615c8ec9277b676d1b
* | | Merge "Inline AccountState#getExternalIds(Schema) into only caller"Patrick Hiesel2019-07-312-8/+5
|\ \ \ | |/ / |/| |
| * | Inline AccountState#getExternalIds(Schema) into only callerPatrick Hiesel2019-07-312-8/+5
| | | | | | | | | | | | Change-Id: I79f0080ff5fc518599c0aa8bd2bd5da9ef217a6c
* | | Rework external ID cache loaderPatrick Hiesel2019-07-3114-168/+860
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current system uses an ExternalId cache that is serialized and written to disk (if configured). The cache holds an entire generation of all external IDs, keyed by the SHA1 of `refs/meta/external-ids`. This is roughly `Cache<ObjectId, List<ExternalID>>`. Prior to this commit, on servers where an update does not originate (on other masters or slaves), the cache loader would re-read all external IDs from Git when it was called. On googlesource.com, these regenerations can take up to 60 seconds. Within this time, the Gerrit instance comes to a grinding halt as lots of code paths depend on a value of this cache being present. Authentication is one of them. This commit rewrites the loader and implements a differential computation approach to compute the new state from a previously cached state by applying the modifications using a Git diff. Given the SHA1 (tip in refs/meta/external-ids) that is requested, the logic first tries to find a state that we have cached by walking Git history. This is best-effort and we allow at most 10 commits to be walked. Once a prior state is found, we use that state's SHA1 to do a tree diff between that and the requested state. The new state is then generated by applying the same mutations. JGit's DiffFormatter is smart in that it only traverses trees that have changed and doesn't load any file content which ensures that we only perform the minimal number of Git operations necessary. This is necessary because NotesMap (the storage format of external ids on disk) shards pretty aggressively and we don't want to load all trees when applying only deltas. Once the (tree) diff is computed, we read the newly added external IDs using an ObjectReader. There is currently a broader discussion going on about if the primary storage format of external IDs should be changed (I87119506ec04). This commit doesn't answer or interfere with that discussion. However, if that redesign is required will - apart from other things - depend on the impact of this commit on the problems that I87119506ec04 outlines. We hope that this commit already mitigates a large chunk of the slow loading issues. We will use micro benchmarking and look closer at how the collections are handled if there is a need after this commit. Change-Id: I0e67d3538e2ad17812598a1523e78fd71a7bd88a
* | Merge "Remove default bug tracker from _feedbackUrl"David Pursehouse2019-07-312-6/+12
|\ \
| * | Remove default bug tracker from _feedbackUrlPaladox none2019-07-252-6/+12
| | | | | | | | | | | | | | | Bug: Issue 11216 Change-Id: I5cd33d8f74118a0e9b3c96a3bce949092181cc45
* | | Merge "PutMessage: automatically add Change-Id if requireChangeId is set"David Pursehouse2019-07-313-17/+27
|\ \ \
| * | | PutMessage: automatically add Change-Id if requireChangeId is setHan-Wen Nienhuys2019-07-293-17/+27
| | | | | | | | | | | | | | | | Change-Id: Ia3c270204b855e2330cef22ce58198f7619afaec
* | | | Fix docs referencing incorrect side of edit buttonAlex Saveau2019-07-311-1/+1
| | | | | | | | | | | | | | | | Change-Id: I3425ec45b9b84e8e7043d5de0f79c3fa04326be9
* | | | Merge branch 'stable-3.0'David Pursehouse2019-07-313-66/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.0: Remove 'Known Issues' section which discusses an issue with GWT UI HashtagsInput: Add a constructor allowing to initialize remove member Fix gr-identities styles Change-Id: I6b09615311863d73035a0972cf775c91ce576180
| * \ \ \ Merge branch 'stable-2.16' into stable-3.0David Pursehouse2019-07-312-32/+47
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.16: HashtagsInput: Add a constructor allowing to initialize remove member Fix gr-identities styles Change-Id: I5d44bbde7b44ae6e4c5969ca40c428d2cf8acbf0
| | * \ \ \ Merge branch 'stable-2.15' into stable-2.16Marco Miller2019-07-301-0/+5
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-2.15: HashtagsInput: Add a constructor allowing to initialize remove member Change-Id: I0362c2133b1e9782eb676a72c7346837a5623220
| | | * | | | HashtagsInput: Add a constructor allowing to initialize remove memberDavid Pursehouse2019-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The class already has a similar constructor, but it only allows to initialize the 'add' member. This means that if one wants to create an instance with both 'add' and 'remove', it is still necessary to instantiate it and then explicitly set 'remove'. Change-Id: Iacb8ca5b708d848dc39c1d48803f1ad312a7ec19
| | * | | | | Fix gr-identities stylesPaladox none2019-07-291-32/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it so the button is no longer a link. This also makes it so the text is not crushed together making it hard to read. This change slightly improves this. Change-Id: I7c48b72292e472fbbcb9568b7f0ced17fce72511
| * | | | | | Remove 'Known Issues' section which discusses an issue with GWT UIEdwin Kempin2019-07-301-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GWT UI is gone, hence this information is no longer needed. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I34f64aea823a9763d4f4135d01731afd1906fdab
* | | | | | | ReplaceOp: remove unused codepathHan-Wen Nienhuys2019-07-301-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReplaceOp would set an Ixxxx hash automatically. Since updates to changes always happen through refs/for/ upload, they always have an Ixxxx hash. Change-Id: Ia5235c1a53b654bf6c40f9e4c7ceaf3d434eb9c1
* | | | | | | Remove _legacyUndefinedCheck from gr-permission and gr-rule-editorPaladox none2019-07-292-2/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Change-Id: I25013e958306d4b190cbc79b03d86a83254f8dd3
* | | | | | Add undefined check to gr-repo-accessPaladox none2019-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to support Polymer 2 where you now have to handle undefined values correctly in the observer or computing function. Change-Id: Ia14f5ba0f02ab7cd170cf656ff5e2e9d58f24a67
* | | | | | Merge "Add undefined check to gr-permission"Paladox none2019-07-291-1/+2
|\ \ \ \ \ \
| * | | | | | Add undefined check to gr-permissionPaladox none2019-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id4b7f161b96e81d56c0b711c0d367eae2c1d9454
* | | | | | | Merge "Remove token param from getCapabilities"Paladox none2019-07-291-1/+1
|\ \ \ \ \ \ \
| * | | | | | | Remove token param from getCapabilitiesPaladox none2019-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The token param is unused. Change-Id: I0d8be4e45b4823f17092a3a562d0ac0b7257a028
* | | | | | | | Merge "Rename --background-color to --avatar-background-color"Paladox none2019-07-291-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | |
| * | | | | | | Rename --background-color to --avatar-background-colorPaladox none2019-07-261-1/+1
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the default background colour for gr-avatar under Polymer 2. Change-Id: I4547f3138fb381f5c3fd418f4e5df8332462101d
* | | | | | | Merge "Add documentation for CommentValidator interface"Joerg Zieren2019-07-291-0/+9
|\ \ \ \ \ \ \
| * | | | | | | Add documentation for CommentValidator interfaceJoerg Zieren2019-07-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I576f746852e7c4f25fc430c54a8d8db0b8e25ea9
* | | | | | | | Merge "Reorder preference defaults to match member ordering"David Pursehouse2019-07-292-13/+13
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | |
| * | | | | | | Reorder preference defaults to match member orderingPatrick Hiesel2019-07-262-13/+13
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | Change-Id: I994be2573a3c20e4708b8caf17bb3c5462073a39
* | | | | | | Merge "DefaultQuotaBackendIT: Migrate to assertThrows"Marco Miller2019-07-281-9/+6
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | |
| * | | | | | DefaultQuotaBackendIT: Migrate to assertThrowsDavid Pursehouse2019-07-271-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id18b88bba294708dfc3817c3824f4fab38591926