Jenkins GitLab Branch Source plugin likely affected by branch list cache
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=333548)
</details>
<!--IssueSummary end-->
In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61688 we introduced a short-lived cache for the branches list API to prevent excess load on Gitaly. This might have an effect on the following plugin for Jenkins, which queries that API after a push:
https://plugins.jenkins.io/gitlab-branch-source/
We should verify whether this is affected and whether we can change anything in the short-term to improve it, but the long-term solution is to finish https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61692 and remove the cache when it is no longer necessary.
Some notes:
1. If there's a delay of up to 30 seconds before the Jenkins job hits the API, there's unlikely to be an issue, unless:
1. Multiple jobs are run in short succession and hit the API endpoint with identical params
1. We might be able to implement a delay somewhere
1. Alternatively we can document this quirk and its temporary nature, and instruct Jenkins users to add a 30s delay into their job run for this plugin
/cc @cptiglo who reported this on the previous MR
@sean_carroll I'm not sure who maintains the Jenkins plugin or whether we have anything to do with it, but I suspect we need to solicit feedback from people who use it first to see if this is negatively affecting them.
issue