commit | 44ed20244a7809cade1da9fc92e480fda872202f | [log] [tgz] |
---|---|---|
author | Fabio Ponciroli <ponch78@gmail.com> | Tue Mar 21 19:33:22 2023 +0100 |
committer | Fabio Ponciroli <ponch78@gmail.com> | Wed Mar 22 18:27:54 2023 +0100 |
tree | 9a19efcd7774e6b14d1bd450c65f3f5f850ca424 | |
parent | 6860207e32d4e8cb2c6c7efaee2a6f5482e84207 [diff] |
Allow creation of new projects This change [1] introduced a regression when creating a new project. Project creation is skipped since the Source#shouldReplicate check for projects existance in the cache [2], hence the method should NOT be invoked for new projects. Check the source configuration, but skipping the cache. As part of the source configuration check, the `remote.NAME.createMissingRepositories` flag is checked as well. Note that the logic is not taking into consideration if a project is hidden. A project could potentially be created on the remote and be visible until the correct 'refs/meta/config' isn't replicated from the source. The same is currently happening for push-replication, hence there is no regression between the two solutions. [1]: https://gerrit-review.googlesource.com/c/plugins/pull-replication/+/363004 [2]: https://gerrit.googlesource.com/plugins/pull-replication/+/refs/heads/stable-3.4/src/main/java/com/googlesource/gerrit/plugins/replication/pull/Source.java#376 Bug: Issue 16790 Change-Id: Idd1bd88b8c46d31993896640fd9f9ae071ee034d