summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Set version to 3.9.3v3.9.3Luca Milanesio2024-04-125-5/+5
| | | | | Release-Notes: skip Change-Id: I2c27576e1f3518103019b84db093d8d13991c155
* Fix endless loop when using "is:watched" in project watchesEdwin Kempin2024-04-124-11/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "is:watched" predicate matches changes that are being watched. To match changes that are being watched the "is:watched" predicate is expanded to an OR query that has one "project:<watched-project> <project-watch-filter>" predicate per project watch ("project:<watched-project>" is omitted if the project watch is the All-Projects project, "<project-watch-filter>" is omitted if the project watch doesn't set a filter). This expansion happens when the IsWatchedByPredicate is instantiated. Expanding the query requires loading the project watches of the user and parsing the filter (to convert the filter string into Predicates). If the filter of a project watch used the "is:watched" predicate, querying changes by "is:watched" or checking whether a change matches the project watch triggered an endless loop: If "is:watched" is used ChangeQueryBuilder.parse creates an IsWatchedByPredicate instance (in the is(String) method), which is expanded to the OR query (in the IsWatchedByPredicate constructor), which requires parsing the project watch filters. Parsing the project watch filters was done by ChangeQueryBuilder.parse which creates another IsWatchedByPredicate instance (in the is(String) method), which is again expanded to the OR query (in the IsWatchedByPredicate constructor), which again requires parsing the project watch filters, starting the loop anew. To fix this we: 1. Disallow using "is:watched" in ProjectWatch.WatcherChangeQueryBuilder which is a subclass of ChangeQueryBuilder.parse used to check whether a change matches a project watch. 2. Change IsWatchedByPredicate to use ProjectWatch.WatcherChangeQueryBuilder to parse the project watch filters instead of ChangeQueryBuilder. Using ProjectWatch.WatcherChangeQueryBuilder in IsWatchedByPredicate makes the matching logic for project watches when a change is updated consistent with the matching logic for project watches when "is:watched" is used in a regular change query. By disallowing "is:watched" in ProjectWatch.WatcherChangeQueryBuilder project watches that use "is:watched" in their filter do not match any change now. Before this change they triggered an endless loop, affecting the stability of the service. Note, IsWatchedByPredicate did have a check to prevent an endless loop in this case, but it didn't work since the endless loop happened before this check was reached. Bug: Issue 321784734 Release-Notes: Fix endless loop when using "is:watched" in project watches Change-Id: Ie38535b2df123a62dfd6a6e4b4ee60a80b0254f3 Signed-off-by: Edwin Kempin <ekempin@google.com>
* ReviewCommand: When available use project when identifying a changeSven Selberg2024-04-111-13/+17
| | | | | | | | | | | | | | Changes#id(String, int) is guaranteed to unambiguously identify exactly one change if such a change is available. If project is provided in CLI call use this method to get ChangeApi. If project was not provided lookup the ChangeApi with only the change-number through Changes#id(String) which may identify several changes and throw an Exception (e.g. if changes have been imported from another Gerrit instance so that two changes have the same change-number). Release-Notes: ReviewCommand identify change with project,change-number if project is provided in CLI call. Change-Id: I04eb63949f7768f7e719f0d49ce4f7d64834e37f
* Merge branch 'stable-3.8' into stable-3.9Luca Milanesio2024-04-108-0/+23
|\ | | | | | | | | | | | | | | | | | | | | * stable-3.8: Emit value change event even when no items are matched Fix gr-dropdown-list not updating on items change Suppress deprecation warning for LabelType.Builder#setFunction(...) Ensure we don't end up in an infinite loop when updating path. Release-Notes: skip Change-Id: I7dfdd22c09e5bd0d8a7765739d723524f6b20ec1
| * Merge branch 'stable-3.7' into stable-3.8Luca Milanesio2024-04-108-0/+23
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Suppress deprecation warning for LabelType.Builder#setFunction(...) Release-Notes: skip Change-Id: I3bde59d5f6300dc48f38754b713e2650a25c1d1d
| | * Suppress deprecation warning for LabelType.Builder#setFunction(...)Sven Selberg2024-04-108-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | As long as we have Rest API and tests for label functions we will use this method and the compiler warnings makes it difficult to check if new changes introduces other compiler warnings. Release-Notes: skip Change-Id: I788ef20091b39d72712ecfaed287a15af5921001
| * | Merge changes I9dfe61d6,I6b5457f7 into stable-3.8Luca Milanesio2024-04-103-12/+20
| |\ \ | | | | | | | | | | | | | | | | | | | | * changes: Emit value change event even when no items are matched Fix gr-dropdown-list not updating on items change
| | * | Emit value change event even when no items are matchedKamil Musin2024-04-103-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In I6b5457f71 we kept the original logic, where the event is only emitted if value changed and one of the items matched. But that creates an issue if value and items are updated on separate iterations. 1. Value updates, no items -> so no event 2. Items update, no value change -> so no event Even though in the end both value and items satisfy the requirement, the event was never sent. Since gr-dropdown-list is a utility class it generally makes sense for it to be as simple as possible, and not try to account for logic of components using it. The issue in gr-admin-view that didn't work with this previously was that it doesn't maintain it's own invariants: It was possible for the value set on gr-dropdown-list to not be in the subsectionLinks, due to render happening in the middle of `reload()`. We fix this issue in this change. Release-Notes: skip Google-Bug-Id: b/296106236 Change-Id: I9dfe61d6f7a247842e5392976378915eec6775f2 (cherry picked from commit 13948dfbb562033992d5b5346970de755a2a574a)
| | * | Fix gr-dropdown-list not updating on items changeKamil Musin2024-04-102-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handleValueChanged is dependent on contents of `items` therefore it needs to be recalculated if it changes. items were being received/set later than path when loading gr-diff-view from a url, resulting in no path shown in the gr-dropdown-list We only emit an event if the new value matches one of the items. It matches the behaviour before the change. It might make sense to emit the value anyway, but that broke gr-admin-view tests, because they don't set up rest api calls. So we keep it at the old behaviour. Also, spotted some small indexing errors in admin-view tests and fixed that. Google-Bug-Id: b/296106236 Release-Notes: skip Change-Id: I6b5457f71b573c9c56c425372cb0f4ec242e10f0 (cherry picked from commit ae6aa0f26a985d7ac34b3eef5be6ef24c1bbda86)
| * | | Merge "Ensure we don't end up in an infinite loop when updating path." into ↵Luca Milanesio2024-04-101-1/+1
| |\| | | | | | | | | | | | | | stable-3.8
| | * | Ensure we don't end up in an infinite loop when updating path.Chris Poucet2023-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't call handleValueChange if gr-drop-down-list hasn't actually changed value Analysis: - Navigate to https://go-review.googlesource.com/c/go/+/494187/29/src/runtime/trace2buf.go - gr-diff-view eventually ends up with this.path = src/runtime/trace2buf.go. - Press Shift+m - handleNextUnreviewedFile gets called - this.setReviewed(true) gets called - this.navigateToUnreviewedFile('next') - this.naveToFile gets called which computes newPath src/runtime/trace2cpu.go - this.getChangeModel().navigateToDiff gets called wit the newPath - Before the model has time to finish updating gr-diff-view, the header gets re-rerendered due to this.setReviewed(true) - this.path gets updated based on the listener for this.getViewModel().diffPath$ - gr-dropdown-list.willUpdate is called based on the re-render of #8, it still has the old path. It's items' have changed but not its `path. - This triggers the spin-locking back and forth. Google-Bug-Id: b/296388347 Release-Notes: skip Change-Id: I88196b34ddb037809ece6952555cb82e41171ad2 (cherry picked from commit 687f1203adf46755149dbdcec0069fb6b7571dfa)
* | | | Merge branch 'stable-3.8' into stable-3.9Nasser Grainawi2024-04-1014-22/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.8: Fix large event_details in dashboard displayed Avoid work in Optional.orElse() calls Fix a bug with paper-tooltip. Fix a bug with paper-tooltip. Release-Notes: skip Change-Id: I7c435a872f744314b37f3b90c7c28c98dae57467
| * | | Merge branch 'stable-3.7' into stable-3.8Nasser Grainawi2024-04-1014-22/+24
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Avoid work in Optional.orElse() calls Fix a bug with paper-tooltip. Change-Id: I7016b62f40df0b61a05b6b78878e84296292e6e5 Release-Notes: skip
| | * | Avoid work in Optional.orElse() callsNasser Grainawi2024-04-0914-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any code inside the orElse() will always be called, even if the result isn't used because the optional is present. This is wasteful at a minimum and can be actively harmful (as seen in [1]) because of side effects or performance impacts. Fix that by replacing all orElse() calls that create new instances or do non-constant work with either a call to orElseGet() or an if statement. It's possible this will result in performance improvements, but I didn't attempt to measure any, so I'm not including a release note. It would be nice if there were an ErrorProne checker for this, but one doesn't exist yet. [1] https://gerrit-review.googlesource.com/c/gerrit/+/417915/comment/0ea287cd_bfecb7f2/ Change-Id: Icab4115998fb4f3787ca74c0890949cb3ce5c6a6 Release-Notes: skip
| | * | Fix a bug with paper-tooltip.Chris Poucet2024-04-092-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set properties, not attributes for paper-tooltip. Google-Bug-Id: b/333416564 Release-Notes: skip Change-Id: I48d41184d10aa0b2fd719717c38664792fa8bc54 (cherry picked from commit 4f7449246c08c9d6066ebbf5dca54423d07a9afc)
| * | | Fix large event_details in dashboard displayedMilutin Kristofic2024-04-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our logs we found out event details with over 750k characters and daily max around 100k characters. This is caused only by dashboard displayed that can accumulate large rpcList when it is refreshing without router change location. This special case was introduced in Change 350774. Release-Notes: skip Google-Bug-Id: b/330373302 Change-Id: I9052621367ce3efe4c73f321b13bce53b6ddc1e5 (cherry picked from commit 6e6f42e4e7fd59b6e248ed1f45e8d14b5bff2334)
| * | | Fix a bug with paper-tooltip.Chris Poucet2024-04-092-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set properties, not attributes for paper-tooltip. Google-Bug-Id: b/333416564 Release-Notes: skip Change-Id: I48d41184d10aa0b2fd719717c38664792fa8bc54 (cherry picked from commit 4f7449246c08c9d6066ebbf5dca54423d07a9afc)
* | | | Merge "Ensure plugin modules are bound in the baseInjector" into stable-3.9Nasser Grainawi2024-04-1010-8/+138
|\ \ \ \
| * | | | Ensure plugin modules are bound in the baseInjectorNasser Grainawi2024-04-0910-8/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's required to do an explicit bind when using child injectors in order to prevent just-in-time bindings from being promoted to an ancestor injector. This is a well documented issue in Guice [1] that is only mentioned a couple places in the javadocs, most prominently at [2]. In Gerrit this became a problem with the introduction of the plugin ApiModule. That module is expected to be the base for other plugins, but shouldn't get any bindings promoted from the per-plugin ServerPluginInfoModule. Adding explicit bind() calls in ServerPluginInfoModule for each of the plugin modules prevents that from happening, as seen in the new PluginBindingsIT suite. Also fix an issue with creating child injectors using a buggy Optional.orElse() pattern when creating the new root injector for a plugin. This was causing two new injectors to always be created for the ServerPluginInfoModule. [1] https://github.com/google/guice/issues/973 [2] https://google.github.io/guice/api-docs/latest/javadoc/com/google/inject/Injector.html#createChildInjector(java.lang.Iterable) Bug: Issue 332512505 Change-Id: I8633083d97d28ea9d1e61a90bb86efdb399c12d0 Release-Notes: Fix installing plugins injecting the injector when an ApiModule plugin is also installed
* | | | | Fix large event_details in dashboard displayedMilutin Kristofic2024-04-101-0/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our logs we found out event details with over 750k characters and daily max around 100k characters. This is caused only by dashboard displayed that can accumulate large rpcList when it is refreshing without router change location. This special case was introduced in Change 350774. Release-Notes: skip Google-Bug-Id: b/330373302 Change-Id: I9052621367ce3efe4c73f321b13bce53b6ddc1e5 (cherry picked from commit 6e6f42e4e7fd59b6e248ed1f45e8d14b5bff2334)
* | | | Fix a bug with paper-tooltip.Chris Poucet2024-04-092-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set properties, not attributes for paper-tooltip. Google-Bug-Id: b/333416564 Release-Notes: skip Change-Id: I48d41184d10aa0b2fd719717c38664792fa8bc54 (cherry picked from commit 4f7449246c08c9d6066ebbf5dca54423d07a9afc)
* | | | Improve change-model load change consistencyKamil Musin2024-04-085-45/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Only update the change if change is undefined, or if the change number is the same: There must be a consistency between ChangeViewModel and ChangeModel. Only change to a ChangeViewModel is allowed to change the changeNum, while all other calls to updateStateChange can only update the info of the current change to a more recent one. The update through rxjs can load a different change since updateLoadingState sets the change to undefined. 2. Simplify LoadingState and remove RELOADING: RELOADING state previously could only happen as the result of a following race condition ChangeViewModel forceLoad sets changNum to undefined and then async schedules setting it back to the original state. The RELOADING is only set if the processing of restApi results (no actual calls are performed since changeNum is undefined) is scheduled later in the Event Queue than the restoration of the original state. Moreover the actual difference between LOADING and RELOADING never matters in code. We simplify the logic by removing RELOADING state. Passing a undefined changeNum, will immediately set the change to undefined and LoadingState to NOT_LOADED. Previously it would be "change is undefined", loading state "LOADED", until it changes to "NOT_LOADED" in the next Event Queue cycle (or "RELOADING" if the race is won by the forceLoad) 3. Move updateRevisionsWithCommitShas into updateStateChange: This makes the state more consistent. Now the change in ChangeModel always has the values set, regardless whether the value came from a manual call or subscription. 4. Add catchError, to reset LoadingState if the RestApi calls throw an error Google-Bug-Id: b/328632912 Release-Notes: skip Change-Id: I0ed368df7152150ed974c0b337894758ee531344 (cherry picked from commit 22f4e92288ac07a679765c62000068d2fa8a7aed)
* | | | Merge branch 'stable-3.8' into stable-3.9Diego Zambelli Sessona2024-04-0415-41/+241
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.8: Reset pageResultSize when PaginationType NONE back-fill results Add test paginationType NONE to query only if there are more results Fix paginationType NONE to run further queries only if needed Run tests in FakeQueryChangesTest for paginationType NONE Fix detection of invalid SSH key algorithm Demonstrate SshKeyUtil fails to validate invalid SSH keys Move comment of PaginatingSource.read() Fix visibility filter for changes when paginationType NONE Add tests for pagination to back fill the results Allow plugins to use PredicateArgs Release-Notes: skip Change-Id: Idcdb072a9cde471cd43d680363778cdfc4b5e3ff
| * | | Merge branch 'stable-3.7' into stable-3.8Diego Zambelli Sessona2024-04-0414-73/+262
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Reset pageResultSize when PaginationType NONE back-fill results Add test paginationType NONE to query only if there are more results Fix paginationType NONE to run further queries only if needed Run tests in FakeQueryChangesTest for paginationType NONE Fix detection of invalid SSH key algorithm Demonstrate SshKeyUtil fails to validate invalid SSH keys Move comment of PaginatingSource.read() Fix visibility filter for changes when paginationType NONE Add tests for pagination to back fill the results Allow plugins to use PredicateArgs Release-Notes: skip Change-Id: I80dcc0e671fe46e9ca98c99f09bd6503ff5d6fab
| | * | Merge branch 'stable-3.6' into stable-3.7Diego Zambelli Sessona2024-04-0414-67/+255
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.6: Reset pageResultSize when PaginationType NONE back-fill results Add test paginationType NONE to query only if there are more results Fix paginationType NONE to run further queries only if needed Run tests in FakeQueryChangesTest for paginationType NONE Fix detection of invalid SSH key algorithm Demonstrate SshKeyUtil fails to validate invalid SSH keys Move comment of PaginatingSource.read() Fix visibility filter for changes when paginationType NONE Add tests for pagination to back fill the results Allow plugins to use PredicateArgs Release-Notes: skip Change-Id: I78775c62d60bbdb63eb19dd8683179091c6ca447
| | | * \ Merge branch 'stable-3.5' into stable-3.6Diego Zambelli Sessona2024-04-0414-67/+255
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.5: Reset pageResultSize when PaginationType NONE back-fill results Add test paginationType NONE to query only if there are more results Fix paginationType NONE to run further queries only if needed Run tests in FakeQueryChangesTest for paginationType NONE Fix detection of invalid SSH key algorithm Demonstrate SshKeyUtil fails to validate invalid SSH keys Move comment of PaginatingSource.read() Fix visibility filter for changes when paginationType NONE Add tests for pagination to back fill the results Allow plugins to use PredicateArgs Release-Notes: skip Change-Id: I8e166780d069267e3f25c454dc947ebe1d32d949
| | | | * \ Merge branch 'stable-3.4' into stable-3.5upstream/stable-3.5Diego Zambelli Sessona2024-04-041-0/+1
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.4: Reset pageResultSize when PaginationType NONE back-fill results Release-Notes: skip Change-Id: I32a22fcbd7c84d07ff96df44975dd4c53259b94e
| | | | | * | Reset pageResultSize when PaginationType NONE back-fill resultsupstream/stable-3.4Diego Zambelli Sessona2024-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up of change 413358. In particular, if some results are skipped because of of the visibility constraints, more changes need to be asked from the index, and pageResultSize needs to be reset to know how many results are returned from each query. Without this change querying for more changes could end up in an infinite loop as exposed in a test in 3.6 [1] [1]: https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.6/javatests/com/google/gerrit/server/query/change/FakeQueryChangesTest.java#126 Release-Notes: skip Change-Id: I566010c6f5bfcb4fbc003bc6693aa25d4dd44a81
| | | | * | | Add test paginationType NONE to query only if there are more resultsDiego Zambelli Sessona2024-03-291-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the first query to the index did not fill the full limit the caller wants, we paginate to obtain more results. However, subsequent queries are not needed if there are no more results from the previous query. This add a test for the change 413358 [1], that has reintroduced the issue fixed in change 344695. [1]: https://gerrit-review.googlesource.com/c/gerrit/+/413358/comment/85bca522_2b3552b2/ Bug: Issue 330195358 Release-Notes: skip Change-Id: If578ee877587488fdf3715331bd8d23e9d86f750
| | | | * | | Merge branch 'stable-3.4' into stable-3.5Diego Zambelli Sessona2024-03-2910-34/+204
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.4: Fix paginationType NONE to run further queries only if needed Fix detection of invalid SSH key algorithm Demonstrate SshKeyUtil fails to validate invalid SSH keys Move comment of PaginatingSource.read() Fix visibility filter for changes when paginationType NONE Add tests for pagination to back fill the results Release-Notes: skip Change-Id: I9df29c9ae3b37026c9866fd97b6bb7f8dbb0dde9
| | | | | * | Fix paginationType NONE to run further queries only if neededDiego Zambelli Sessona2024-03-271-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the first query to the index did not fill the full limit the caller wants, we paginate to obtain more results. However, subsequent queries are not needed if the previous query returned less results than the limit. This is a follow up of the change 413358 [1], that has reintroduced the issue fixed in change 344695. [1]: https://gerrit-review.googlesource.com/c/gerrit/+/413358/comment/85bca522_2b3552b2/ Bug: Issue 330195358 Release-Notes: Fix pagination to stop querying when there are no more results Change-Id: Ie326f3628f5312a83bf83177a3fa5134f042b59a
| | | | | * | Fix detection of invalid SSH key algorithmLuca Milanesio2024-03-254-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verify that the OpenSSH key algorithm matches the one associated with the public key. Throw a new specific InvalidKeyAlgorithmException if the two algorithms do not match. This is a breaking change because invalid OpenSSH keys have been tolerated since the very beginning, when Shawn introduced the SSH support in Change 6610. Attempting to store new invalid SSH keys would fail and result an HTTP status 400 error as response to the add keys REST-API. Make SshKeyCacheImpl tolerant to existing keys stored in the accounts' profile, otherwise Gerrit may start flagging keys that have been previously stored as invalid, resulting in random authentication failures by existing users. Existing invalid keys are reported in the error_log with the associated exceptions and automatically fixed, removing the invalid key from the accounts profile and adjusting the key algorithm with the one associated with the public key. Bug: Issue 330758152 Release-Notes: Breaking change: validate and reject SSH keys with invalid or mismatched algorithm Change-Id: I83c89a786f70aa3b88744a70f10012415f45f284 (cherry picked from commit 6eac4fe62a6a081c5c9395f8874bdc49615eea0d)
| | | | | * | Demonstrate SshKeyUtil fails to validate invalid SSH keysLuca Milanesio2024-03-252-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SshKeyUtil has always missed the validation of the SSH key algo specified as a prefix of the Base-64 encoded key. Whilst the behaviour has always been the same since 2008, it is nonetheless buggy and should be validated for preventing the storage of invalid keys. TODO: Mark the SSH key validation test as disabled for allowing the build to succeed. The test can be enabled back again once the validation has been amended to verify the key algorithm. Bug: Issue 330758152 Release-Notes: skip Change-Id: I42b1c6474fa876828e5353e81e97b21b981665f9 (cherry picked from commit 4f3ff5abdb18ad34078d8dd2f0ad1d4e610957d1)
| | | | | * | Move comment of PaginatingSource.read()Diego Zambelli Sessona2024-03-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the comment about restarting the DataSource for back filling results skipped for visibility. The comment in fact is valid for any PaginationType specified. Adress the comment in change 413358 [1]. [1]: https://gerrit-review.googlesource.com/c/gerrit/+/413358/comment/d7a90bb0_0f8ebc9f/ Release-Notes: skip Change-Id: I9826b8be4005a946c7952ae89eb81f8c191997e3
| | | | | * | Fix visibility filter for changes when paginationType NONEDiego Zambelli Sessona2024-03-185-38/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of paginationType NONE in change 379354 affected the API pagination. In particular, if some results are skipped because of of the visibility constraints, more changes need to be asked from the index, until we have filled the full limit the caller wants or if there are no more changes [1]. [1]: https://gerrit-review.googlesource.com/c/gerrit/+/379354/8/java/com/google/gerrit/index/query/PaginatingSource.java#72 Bug: Issue 328958027 Release-Notes: Fix NONE paginationType filtering of changes Change-Id: I3ccff7f8ba5a6d3903f9acbe3f5c439c55225ce2
| | | | | * | Add tests for pagination to back fill the resultsDiego Zambelli Sessona2024-03-151-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When querying Lucene, if we have not filled the full limit the caller wants, `PaginatingSource.read()` need to restart the source and continue. This should happen regardless of the paginationType. Bug: Issue 328958027 Release-Notes: skip Change-Id: I02bc97eeecde2149e374dd036b87dd4c06034f27
| | | | * | | Run tests in FakeQueryChangesTest for paginationType NONEDiego Zambelli Sessona2024-03-265-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests in FakeQueryChangesTest were executed only for the default pagination (OFFSET) and SEARCH_AFTER Release-Notes: skip Change-Id: Ic5c84bdc28fccbf0a4c931d7137ce8f232907622
| | | | * | | Allow plugins to use PredicateArgsKaushik Lingarkar2024-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change visibility of the PredicateArgs constructor to public. This will allow plugins implementing operators with args to use PredicateArgs instead of implementing their own arg parser. Release-Notes: skip Change-Id: Ief39f4606a96c24ae3ad58bd0031a825ce4cdcab
* | | | | | | Revert "During online reindexing of all changes skip changes already present"Luca Milanesio2024-04-044-46/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 366ae421f263acf201adbcc1f13c69f03fef40cf. Reason for revert: Broke the offline reindexing (see Issue 322269961) Bug: Issue 322269961 Release-Notes: Fix the disappearance of all changes after performing a full reindex Change-Id: Ifa90a4eddb8b6eccc2bee7d99757e478fd983b1e (cherry picked from commit ce49afb24e97e600a48dfc0f68f2014d20bdb197)
* | | | | | | Do not allow unload/restart plugins with ApiModuleLuca Milanesio2024-04-044-9/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ApiModule from plugins is used for creating the base injectors for all other plugins and cannot be unloaded without potentially breaking all the other plugins that depend on them. Block the start of the new plugin for avoiding leaving the overall Guice stack in an inconsistent state. Plugins with ApiModule need to be effectively considered mandatory. Release-Notes: Prevent reload of plugins with ApiModule Bug: Issue 324462734 Change-Id: Iac2851022ea34e52014c519eeef70ce6028f4fda
* | | | | | | Merge branch 'stable-3.8' into stable-3.9Nasser Grainawi2024-04-033-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.8: Fix ReturnMissingNullable bug pattern flagged by error prone Stop considering WIP changes "unmergeable" Test submitting a change with WIP parent Use virtual change id for account patchset reviewdb clear action Bump JGit to c0b415fb0 Release-Notes: skip Change-Id: Ia27300fa0707611d0a5b37d704ebfd97bfa93211
| * | | | | | Merge branch 'stable-3.7' into stable-3.8Nasser Grainawi2024-04-038-9/+28
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Stop considering WIP changes "unmergeable" Test submitting a change with WIP parent Use virtual change id for account patchset reviewdb clear action Bump JGit to c0b415fb0 Release-Notes: skip Change-Id: I7898848017befec27aeb015907dadaf283c639a6
| | * | | | | Merge "Bump JGit to c0b415fb0" into stable-3.7Nasser Grainawi2024-04-034-6/+6
| | |\ \ \ \ \
| | | * | | | | Bump JGit to c0b415fb0Nasser Grainawi2024-03-214-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new feature enabled by the new core.trustLooseRefStat config key which can be set to `after_open` in order to invalidate NFS attribute caching before trusting the dir/file attributes of loose refs and their parent directories. This has the benefit of fixing some multi-primary race conditions at the downside of some performance impacts. Additionally using the SnapshottingRefDirectory via Gerrit's usePerRequestRefCache will limit the NFS invalidation done during a single request and mitigates all the major performance impacts of the `after_open` setting (some minor performance impacts are still expected). In order to update to this JGit version we also need to bump the Bazel version to 6.3.2 (originally done in change I993fb2b36) in order to get the ijar fix necessary to update to the newer libraries (originally done in changes I62c90995 and I0ad4adce) needed by this JGit version. This also includes some other minor JGit fixes. $ git log --oneline --no-merges acf21c0bc...c0b415fb0 81d64c913 Cache refreshed loose ref dirs in SnapshottingRefDirectory 72fa0a53e TreeRevFilter: correct changedPathFilter usage for multi-paths inclusion 9e841dd4a PathFilterGroup: implement getPathsBestEffort() e5a17df8f CleanupService: preload JgitText if not running in OSGi c1eba8abe DfsPackFile: get commitGraph.readChangePaths from repo config 631cbf59f CommitGraphLoader: receive readChangedPaths as parameter 900c5e62b Add pull request template discouraging usage of pull requests dc4fa3906 Update CONTRIBUTING.md to point to GitHub issues 328008aa2 FS_POSIX.runInShell(): on MacOS use a login shell da7a88bce [ssh] Implement the "Ciphers" SSH config bf7dd9add ShutdownHook: run on bundle deactivation if in OSGi 819c5bcc8 [diffmergetool] Fix running command on Cygwin 24307bd38 [releng] Bump japicmp base version to 6.9.0.202403050737-r fe681b34f DfsBlockCache: move cache table specific implementations to a new class 07d7452b3 Prepare 6.10.0-SNAPSHOT builds e61c20b1e Prepare 6.9.1-SNAPSHOT builds d764bc34f JGit v6.9.0.202403050737-r 058faa28f JGit v6.9.0.202403050045-r d69a6c5de Prepare 6.9.0-SNAPSHOT builds 21f7fdff7 Introduce core.trustLooseRefStat config 407ccef1c JGit v6.9.0.202402281855-rc1 64911e211 Update SECURITY.md 5c94dcc56 DfsObjDatabase: Let object database instantiate DfsPackFiles 049749558 DfsPackFile: Abstract the bitmap loading to support other backends d132050c2 Remove unused API problem filters a44b9e8bf Support public key in IdentityFile f11d1365f Revert "StartGenerator: Fix parent rewrite with non-default RevFilter" 55f3a9586 Prepare 6.9.0-SNAPSHOT builds 36dd4dd9b JGit v6.9.0.202402211805-m3 89bf38087 Delete org.eclipse.jgit.ssh.apache.agent/bin/.project 3e624306d Allow to discover bitmap on disk created after the packfile e4b95ee56 DfsReader#getObjectSize: use size index if possible 3d4a4bd93 Update jetty to 10.0.20 90674ab15 Update maven plugins 37f64ceea Update org.assertj:assertj-core to 3.25.3 b219040cd Update org.mockito:mockito-core to 5.10.0 1fd8b0f7d Update org.apache.commons:commons-compress to 1.26.0 1f9feb613 Update byte-buddy to 1.14.12 f4f992cdc Add SystemReader.Delegate to reduce boiler-plate code needed to subclass 426d67848 storage.file: Do not throw NSFE when deleting tmp files 67142cacb FS.detectSymlinkSupport: fix a race 99333e75b [errorprone] Fix wrong comparison which always evaluated to false af5d4d37a [errorprone] Remove unnecessary comparison 617f89131 Errorprone EscapedEntity: Do not use HTML entities inside @code javadoc e5fd2409c ChangedPathFilter: Suppress warning about backing array (errorprone) 15363e4c3 PackWriterBitmapPreparer: Do not generate bitmaps for excessive branch tips. e6d83d61e Don't use localized String during JVM shutdown 5afb92aad RawParseUtils.nextLfSkippingSplitLines: fulfil contract as stated 5eff1dd4c [gpg] Refactor the GpgSignatureVerifier b079968cd RawParseUtils: utility method to get a header value 906c2bebe RebaseCommand: fix stopping on root commit conflicts c701c01b4 Improve handling of NFS stale handle errors e0910eda3 Fix handling of missing pack index file c64664925 CherryPick: add ability to customise cherry-picked commit message 74471b8d7 RawParseUtils: Add missing @since tag for new API method f94619d49 Silence API warning for new constant 18d0924a4 [ssh] Bump Apache MINA sshd 2.11.0 -> 2.12.0 ba5adc4ce Add tests for handling pack files removal during fetch ee4443091 PackWriterBitmapPreparer: Set limit on excessive branch count 81f1c0209 Update jna to 5.14.0 307885377 DfsInserter/PackParser: keep min size for index in the inserter 8116f66b9 FooterLines: handle extraction from messages without headers 331fa023e Remove invalid/unnecessary Maven settings b1cc74b75 Update maven plugins 2199b74ce Update org.eclipse.dash:license-tool-plugin to 1.1.0 ff20da9b8 Enable using slf4j 2.x 80a2b067f Update Tycho to 4.0.4 b450ff180 Update mockito to 5.8.0 3cefca094 Add 4.31 target platform and update orbit to 4.31 a00afad54 Update ecj to 3.36.0 d1189a1cd Renormalize line endings based on .gitattributes eb0dd3a4e Configure .gitattributes to manage line endings 40e97af2d Normalize line endings to LF for all text files 788487316 BasePackFetchConnection: Skip object/ref lookups if local repo is empty faa50c683 LooseObjects: Use File#exists when possible 1ab2c73b4 Remove invalid spotbugs configuration 5553f3b30 Fix PMD plugin configuration b2abab271 DfsReader: give subclasses visiblity over the pack bitmap index e25bf9573 PackBitmapIndex/StoredBitmap: Expose size and counts 52c18ae15 PackWriter/Statistics: Remove the bitmapt hit stats a2fed4293 Configure Github issue reporting ab132937f FooterLine: Protect from ill-formed message 4592603b9 API filter for PackStatistics.objectsWithBitmapsFound db5ce6b5c StartGenerator: Fix parent rewrite with non-default RevFilter 6a5bde568 Update MANIFEST.MF b05894436 Document option gc.writeCommitGraph 6cdd04aa4 Bump last release version to 6.8.0.202311291450-r b54592c8e Prepare 6.9.0-SNAPSHOT builds 8ea5409ec BitmapWalkerTest: New test for the walker 5e563e1ba PackWriter: store the objects with bitmaps in the statistics 555224258 FooterLine: First line cannot be a footer acf97be2d Reapply "Improve footer parsing to allow multiline footers." e99fb6edc Revert "Improve footer parsing to allow multiline footers." 796fb2e5c Prepare 6.8.1-SNAPSHOT builds c43560487 JGit v6.8.0.202311291450-r 6514a46a3 Rename method parameter to fix warning about hidden field 29ad7d56e Fix warnings about empty control flow statements e4abd0123 BitmapIndexImpl: externalize error message 232813bfc Suppress not-externalized string warnings ff0ec5c61 Silence API error for new method BitmapIndex#addBitmapLookupListener 5a717a705 Update Orbit to orbit-aggregation/2023-12 ef901e9ae Adapt to type parameter added in commons-compress 1.25.0 340cc787a Improve footer parsing to allow multiline footers. 2a739ad2c Make the tests buildable by bazel test 9a05ca42b Prepare 6.8.0-SNAPSHOT builds 7bc697dfd JGit v6.8.0.202311212206-rc1 aab75dba7 BitmapIndex: Add interface to track bitmaps found (or not) c0d15c2ab BitmapWalker: Remove BitmapWalkListener cd8322091 Update repository URLs in CONTRIBUTING.md 823b6a45f Fix typo in FileUtils.isStaleFileHandle() javadoc e4a341db4 Fix branch ref exist check 52af8dbaf gpg.bc: Supress errorprone InsecureCryptoUsage 5c173c632 Adjust javadoc to pass errorprone checks 705e3d686 Update org.apache.commons:commons-compress to 1.25.0 2986d39ae Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD e612c2522 BitmapWalkListener: Use plain interface with noop instance 4d82d0aa1 BitmapWalkListener: Add method and rename for commits 8af2f785e Update bouncycastle to 1.77 754a1b492 PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream d3f711ca1 BitmapWalker: announce walked objects via listener interface d9568eda9 Prepare 6.8.0-SNAPSHOT builds 8db605620 Update jetty to 10.0.18 ac0a99597 SSH: bump org.apache.sshd to 2.11.0 375710194 JGit v6.8.0.202311151710-m2 91c914622 Fix typo in constant name CONFIG_KEY_STREAM_FILE_TRESHOLD 4aaf8cad9 Simplify StringUtils#commonPrefix 4f18c5095 Optimize RefDirectory.getRefsByPrefix(String...) fcea1fe49 CommitGraphWriter: Remove unnecesary progress update call b761a0fc3 Use try-with-resource to ensure UploadPack is closed 32f7db784 Fix hiding field warning 15c6947fd Fix warning for empty code blocks 3652dd437 Fix boxing warnings 3ca786d76 errorprone: remove unnecessary parentheses 50d670133 Update mockito to 5.7.0 and bytebuddy to 1.14.9 6007371e3 Enable Maven reproducible builds 97afcb050 Upgrade bazlets to the latest revision 7ac2d2573 Revert "Optimise Git protocol v2 `ref-prefix` scanning" 38344badf Document GIT_TRACE_PERFORMANCE to show timings 8e9eab799 config-options.md: fix sort order ac70632f5 ComboBitset: Add Javadoc 593fbf7c3 CommitGraphWriter: Add progress monitor to bloom filter computation 5207bf070 CommitGraphWriter: Use ProgressMonitor from the OutputStream c46b54eea CommitGraphWriter: Unnest generation-number progress 3937300f3 Optimise Git protocol v2 `ref-prefix` scanning 1c320d0d4 UploadPackTest: Cover using wanted-refs as advertised set 5f563e386 UploadPack: use want-refs as advertised set in fetch v2 093bde518 BasePackFetchConnection: Avoid full clone with useNegotiationTip 7b2005d52 .gitignore: ignore all Maven output directories `target/` 26d6c325d benchmarks: use org.eclipse.jgit-parent as parent pom 8ca649c16 Generate SBOMs using cyclonedx maven plugin f91afe5f5 DfsPackFile: Do not attempt to read stream if pack doesn't have it 9323b430b PackObjectSizeIndexLoader: Log wrong bytes on exception c89f7b874 Silence API warnings for API added in 5.13.3 0f078da4e FileBasedConfig: in-process synchronization for load() and save() f6774fa8e FileUtils.rename(): better retry handling cb46ee354 FileBasedConfig: ensure correct snapshot if no file 621685d3c DeleteBranchCommand: update config only at the end ecf94d159 Config.removeSection() telling whether it changed the config f93ccb7fd RebaseCommand: return correct status on stash apply conflicts 0b5d4c3aa Use net.i2p.crypto.eddsa 0.3.0 from new Orbit build 5705e2af1 [errorprone] Fix InconsistentCapitalization 5138b97b6 TestRepository: Add getInstant method 790fa7e81 Update orbit to orbit-aggregation/2023-12 e0acf2579 Prepare 6.8.0-SNAPSHOT builds e5a79343c JGit v6.8.0.202310031045-m1 42917767f UploadPack: Delay freeing refs in sendPack() 39707c673 ByteBufferInputStream: add missing @since 6.8 0ca7438f1 Fix log level for successful execution of ShutdownHook#notify to debug cf9d05485 Eclipse features: update copyright year 2ab7c3ebe SSH agent: correct plug-in title b6b1e0a0a Fix DefaultCharset bug pattern flagged by error prone 6672bacca Activate additional error prone checks a2bce029a WorkingTreeIterator: directly filter input stream 84ced89dc [errorprone] Add missing javadoc summary d56ae55c8 [errorprone] Fix BadImport a7edc7889 [errorprone] Prevent int expression may overflow 4cfe27dd0 [errorprone] Suppress ByteBufferBackingArray ac3794bf0 [errorprone] Suppress JavaLangClash to avoid breaking change 049782743 [errorprone] Fix EqualsGetClass 8c42901b5 [errorprone] MockSystemReader: fix CatchAndPrintStackTrace 34fb4d487 [errorprone] MetaFilter: fix IdentityHashMapUsage 7b79feb07 [errorprone] InternalFetchConnection: Suppress CatchAndPrintStackTrace f8d91c273 [errorprone] Don't swallow exception 298f93e98 [errorprone] Fix inconsistent capitalization e5e54b61b [errorprone] PageRef#isStringRef: suppress UnusedMethod 37f60c798 [errorprone] FileReftableStack: fix EqualsUnsafeCast bf92bb9bc [errorprone] Suppress MissingSummary for translation bundles e23796cbd [errorprone] CommandLineMergeTool: Remove unused constuctor 254ffbfb0 [errorprone] SimilarityRenameDetector: suppress IntLongMath 7092803ad Add comment why protocol list uses WeakReference d5bcf199c [errorprone] Transport: Suppress ModifyCollectionInEnhancedForLoop 8302377d9 [errorprone] Rename method parameter to silence InvalidParam e6c808600 [errorprone] MyersDiff#main: fix CatchAndPrintStackTrace 2d16df1a0 [errorprone] TagCommand: Remove unused parameter of private method 28d4b3490 [errorprone] PathFilter#getPathsBestEffort: fix ArrayAsKeyOfSetOrMap cda8ffdbb [errorprone] DirCacheEntry: suppress JavaInstantGetSecondsGetNano d0b9ab1c4 [errorprone] Directly implement functional interface ba2f9affc [errorprone] InterruptTimer#terminate: ensure Thread#join succeeds a17e05437 [errorprone] RawParseUtils@parseHexInt64: suppress IntLongMath 978cbb84c [errorprone] Exceptions should not override #toString 1e92426c5 [errorprone] Fix invalid param in javadoc e53c1864e [errorprone] FS#searchPath: handle surprising behavior of String#split a94e54ce8 [errorprone] FileStoreAttributes#FUTURE_RUNNER: Fix corePoolSize 13bea495c [errorprone] Express duration using seconds which is clearer ec0657ba0 [errorprone] Use ArrayList instead of LinkedList b4f4ae472 [errorprone] AddCommand#filepattern: use a more specific type ebdf71c11 [errorprone] Suppress UnnecessaryParentheses 4cf246c9a [errorprone] Remove unnecessary parentheses d65170603 tools/BUILD: Sort errorprone rules alphabetically 136b8953e Update jetty to 10.0.16 ff10cd2d8 Update bazel to 6.3.2 01d6d8a19 DfsPackFile: remove unnecessary @SuppressWarnings("boxing") 1924d353e CommitGraphWriter: Remove unnecessary semicolon 4262150f7 CommitGraphWriter: fix boxing warnings c57257bc0 CommitGraphWriter#createCoreChunks: Remove not-thrown exceptions 2390a89f2 CommitGraphWriter: Decouple Stats from computing bloom filters f1a9d92a3 CommitGraphWriter: Move bloom filter calculation out of createChunks e0bd4882f Documentation: Move writeChangedPaths flag from commitGraph to gc section. 916200e27 [errorprone] Fix wrong comparison which always evaluated to false cf5ec856b [errorprone] Remove unnecessary comparison 290902d9f Update org.eclipse.jdt:ecj to 3.35.0 12e9c3f1f Update org.apache.commons:commons-compress to 1.24.0 0acc5aeaf [errorprone] Suppress ImmutableEnumChecker for ShutdownHook 8d62e5d04 Update bytebuddy to 1.14.8 642f16023 Use ShutdownHook to gracefully handle JVM shutdown d4d6c2b5a Add ShutdownHook to cleanup FileLocks on graceful JVM shutdown f94be665f Unregister ShutdownHook when GC#PidLock is closed e3798df6e OSGi: move plugin localization to subdirectory 3bc1da30d ssh: Remove redundant null check for home.getAbsoluteFile() 82c6638c7 RevertCommand: support for inserting a Gerrit change ID 7e502953c [releng] Bump japicmp base version to 6.7.0.202309050840-r 7baa5a157 DfsPackFile: Record index loads only in one place 30427485d DfsPackfile: Emit the index load with the index object 3a3b72cf9 Prepare 6.8.0-SNAPSHOT builds bb12dd4cb Prepare 6.7.1-SNAPSHOT builds 09f6383f5 Switch back to wagon-ssh-external b43880484 Fix generation of maven site ba1653162 Ensure home directory not null before using in Sshdsessionfactory 4f5afe9d7 CommitGraphWriter: Make the list of chunks immutable f90f0717a CommitGraphWriter: Assert written bytes ea02caf1e JGit v6.7.0.202309050840-r c024cb23d Remove unused API problem filters a5ffa44d5 [releng] Bump japicmp base version to 6.6.0.202305301015-r 43681ee74 Fix list of 3rd party bundles in p2 repo ee0b20c64 Add missing source bundle org.osgi.service.cm.source to target platform 13c8dacae CommitGraphWriter: throw exception on unknown chunk fb51a2234 Document commit-graph options supported by JGit a40abb0a1 Fix warning raised for local variable hiding DfsPackFile#index 4f3db912c Suppress boxing warnings in DfsPackFile 807cf678a Remove unused API problem filters 02b45a844 Suppress boxing warnings in tests 35b5344c9 Fix warning about empty block e51a0e51e Update mockito to 5.5.0 24c5d0120 Update byte-buddy to 1.14.7 c5d8936c8 Prepare 6.7.0-SNAPSHOT builds c54acc582 JGit v6.7.0.202308301100-rc1 2be8bf2b3 Remove the cbi-snapshots Maven repository 8995a6429 Update Orbit to orbit-aggregation/release/4.29.0 2a64412e9 Add target platform for Eclipse 2023-09 (4.29) 9fd44e098 Use release p2 repo for Eclipse 2023-06 (4.28) 2d0a5fa64 Update tycho to 4.0.2 b6b0d323a Update jmh to 1.37 46264ba48 Update bouncycastle to 1.76 e29834a77 Fix some tests in ConfigTest a2f326b76 Handle global git config $XDG_CONFIG_HOME/git/config 0d5e01761 IO: use JDK convenience methods 055a7c20e org.eclipse.jgit.junit.ssh/.settings/.api_filters: fix unclosed tags a56930723 ReadChangedPathFilter: fix Non-externalized string literal warning e7a09e316 Introduce core.packedIndexGitUseStrongRefs config key 9919a9faa DfsReader: Make PackLoadListener interface visible to subclasses 551ca93cc DfsGarbageCollector: provide commit graph stats 6f7333693 DfsGarbageCollector: put only GC commits into the commit graph b4b8f05ee DfsReader: Expose when indices are loaded de7b5b7b2 Prepare 6.7.0-SNAPSHOT builds 1d26471c1 JGit v6.7.0.202308011830-m2 24b6a35d3 Add missing @since tags ba8f3cb1f Fix errorprone warning about precedence c353645a0 Move footer-line parsing methods from RevCommit to FooterLine 462c57ec8 Merge: Add diff3 style merge conflict formatter. c8f5a3f99 RevCommitCG: Read changed-path-filters directly from commit graph eecd93714 Update commons-codec to 1.16.0 68c08265a Add missing @since tags for new API methods 8879eec46 Add missing package import needed to use MurmurHash3 ec3d919aa Identify a commit that generates a diffEntry on a rename Event. f196c7a0e Pack: open reverse index from file if present 000e7caf5 PackReverseIndexV1: reverse index parsed from version 1 file 2eba4e5b4 PackReverseIndex: open file if present otherwise compute 8123dcd69 PackReverseIndex: verify checksums 7d2669587 ComputedPackReverseIndex: Clarify custom bucket sort algorithm 3b77e33ad CommitGraphWriter: add option for writing/using bloom filters 77aec6214 CommitGraphWriter: reuse changed path filters d3b40e72a RevWalk: use changed path filters ff0f7c174 CommitGraphLoader: read changed-path filters 49beb5ae5 CommitGraphWriter: write changed-path filters 23758d7a6 ssh: PKCS#11 support db08835c6 GC: Remove handling of extra pack for RefTree f41c5e8c0 Remove unnecessary @SuppressWarnings("serial") 010a14f24 Remove unused API problem filters b2f7dc189 Remove redundant specification of type arguments 760bdd09b DfsPackParser: Create object indices if config says so afb013b98 PackParserTest: Extract pack-writing helper code to its own class cb99ff5bb DfsInserter: generate object size index if config says so 4d2a003b9 DfsInserter: populate full size on object insertion 12a4a4cca DFSGarbargeCollector: Write object size indices 9dace2e6d DfsReader/PackFile: Implement isNotLargerThan using the obj size idx 8a053b57a [releng] Use tycho 4.0.0 instead of 4.0.0-SNAPSHOT dceebe350 Update mockito to 5.4.0 and bytebuddy to 1.14.5 79b46a0ef Fix S3Repository getSize to handle larger object sizes 91b23cc55 DfsPackFile: make #getReverseIdx public 55230e2b9 Add missing bazel dependency to benchmarks 4d5f2ada5 Update JMH to 1.36 00fa17680 Update bouncycastle to 1.75 d2f114589 Update org.eclipse.jdt:ecj to 3.34.0 8f1693c2d Update eclipse-jarsigner-plugin to 1.4.2 23a0e7e06 Update maven-surefire-report-plugin to 3.0.0 6eb5a4cc8 Update maven-project-info-reports-plugin to 3.4.3 9a60f7f7a Update maven-compiler-plugin to 3.11.0 5fcd681ac Update maven-enforcer-plugin to 3.3.0 6250020fa Update build-helper-maven-plugin to 3.4.0 a00f1663d Update spring-boot-maven-plugin to 2.7.13 d32352a44 Update maven-source-plugin to 3.3.0 8e6197162 PackReverseIndex: separate out the computed implementation faefa90f9 Default for global (user) git ignore file 7b955048e Fix all Javadoc warnings and fail on them c7960910f Mark COMMIT_GENERATION_* constants final 74547f4a6 PackReverseIndex: use static builder instead of constructor 181b629f7 Gc#writePack: write the reverse index file to disk 0f071a7bc Bump bazel vesion to 6.2.0 9afff3e80 Prepare 6.7.0-SNAPSHOT builds Release-Notes: Update JGit to c0b415fb0 Change-Id: I961bdb25823fcd03954214ada46ca24d76ee2fa5 (cherry picked from commit eef3529120308bbbd4a6b309f3c1f00bd724a9cd)
| | * | | | | | Stop considering WIP changes "unmergeable"Nasser Grainawi2024-04-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While work-in-progress changes are unsubmittable, they can be mergeable. This is important if a site has set change.mergeabilityComputationBehavior to a value other than NEVER. Without this change, WIP changes always show as having a merge conflict when viewed as search/query results. A new test is added for that behavior and it fails prior to this change. Bug: Issue 40014889 Change-Id: I8ae13f6563fd7a527b1af92ba1533433949b61f9 Release-Notes: Fixed WIP changes always showing Merge Conflict in searches (cherry picked from commit e48a495f9d4da5fcd49f10ce756538c19e0deeec)
| | * | | | | | Test submitting a change with WIP parentNasser Grainawi2024-04-031-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new test for this behavior to show that the child change does not cause a regression or any change in behavior for submit. Release-Notes: skip Change-Id: I4b45699ceccbdc3cf71e007ad8487f11f8304972 (cherry picked from commit 07e2deb03bc15959959c036bad30e418c094508f)
| | * | | | | | Use virtual change id for account patchset reviewdb clear actionJacek Centkowski2024-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that reviewed flags are removed from the correct change. Release-Notes: Ensure that clearing reviewed flags is performed on correct change when it is imported from another instance Forward-Compatible: checked Change-Id: I27899f76f804d41eacdf9a0f81fc74c012ff2c03
| * | | | | | | Fix ReturnMissingNullable bug pattern flagged by error proneDavid Ostrovsky2024-04-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release-Notes: skip Change-Id: I732b1799abcb0d6b514a7c1824745cb26342deeb
* | | | | | | | Merge branch 'stable-3.8' into stable-3.9Dariusz Luksza2024-03-2921-78/+268
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.8: Revert urelated changes to external_plugin_deps.bzl Fix starred changes clash after repo import from another site Resolve draft comment reference ambiguity for imported changes Fix DereferenceWithNullBranch bug pattern flagged by error prone Expose change's serverid in Change class Make ChangeNumberBitmapMaskAlgorithm a NOOP for local serverId Set version to 3.7.9-SNAPSHOT Set version to 3.7.8 Release-Notes: skip Forward-Compatible: checked Change-Id: Id634dd61b4a3de41d8cb3fdd72706d52a823f094
| * | | | | | | Revert urelated changes to external_plugin_deps.bzlDariusz Luksza2024-03-281-67/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By accident some of the modifications to plugins/external_plugin_deps.bzl were included in the latest merge commit from stable-3.7. Release-Notes: skip Change-Id: Ib86f2facda6830e770e6d5953f5f87947b61ddb7