RFR: 1699: CommitCommentsWorkItem does excessive unnecessary work

Zhao Song zsong at openjdk.org
Wed Dec 21 18:04:31 UTC 2022


On Wed, 21 Dec 2022 14:05:18 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> > I want to verify my understanding of the` HostedRepositoryPool#materialize` and `HostedRepositoryPool#seedRepository` methods. As I understand it, the first method creates a new directory separate from the seed directory and clones the hosted repository into it, allowing read and write operations to be performed on the cloned repository. The second method simply returns the updated seed repository, which does not allow write operations and also does not require a health check before being used.
> 
> That is how I see it. However, the `seedRepository` method doesn't return a `ReadOnlyRepository` (which would have been nicer), and I couldn't make it do so, because the pr branch notifier is currently using the seed repository for creating the pr branch. I don't think this is good behavior. That bot should probably materialize a clone instead.
> 
> One could also argue that we really shouldn't be touching the seed repo at all. Maybe we could have two levels of materialize, something like `materializeReadOnly` that would return a `ReadOnlyRepository` and that method wouldn't need to perform as much health checking.
> 
> But for now, I think this is a reasonable change for this bot.

Agree with you!

-------------

PR: https://git.openjdk.org/skara/pull/1446


More information about the skara-dev mailing list