RFR: Cache labels in GitHubPullRequest
Erik Helin
ehelin at openjdk.java.net
Thu Dec 5 09:50:22 UTC 2019
On Thu, 5 Dec 2019 09:35:32 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:
>> Hi all,
>>
>> please review this pull request that introduces a simple label cache for `GitHubPullRequest`. Since a `GitHubPullRequest` instance can't be accessed by multiple threads it is safe to use a very simple cache mechanism. The only calls that can mutate labels on a PR are `addLabel` and `removeLabel`. A user on GitHub could of course add a label, but we make no guarantees that a `GitHubPullRequest` instance reflects what happens on GitHub, code wanting to ensure they have the latest state must create a new `GitHubPullRequest` instance.
>>
>> Thanks,
>> Erik
>
> Looks good! I think it would be reasonable to do similar caching for other PR properties such as comments, but that can be done at some other time.
Thanks for reviewing Robin! Yes, I agree that there are other parts of `GitHubPullRequest` that it would be worthwhile to cache, but lets tackle that in another PR.
-------------
PR: https://git.openjdk.java.net/skara/pull/294
More information about the skara-dev
mailing list