In or plugin we make copy of `refs/pull-request/1234/merge` ref to `refs/pull-request/1234/merge-pin` (to prevent Build Storm on CI) on PR rescope (from reference update only).
Since 3.9.2 (and maybe 3.9.1) Stash version we found some problems. If we update such reference and run build after a second, then CI server can't fetch right up-to date reference value. We get something like:
'/usr/bin/git fetch --progress origin +refs/pull-requests/36343/merge-pin:refs/pull-requests/36343/merge-pin' command failed. stderr: fatal: git fetch_pack: expected ACK/NAK, got 'A ref was requested that is no longer valid. The ref may have been updated while the git-upload-pack request was received. Please try again.' fatal: The remote end hung up unexpectedly
But if we turn SCM-Cache off then errors gone.
So, the question is: How we must use `git update-ref` in our code to make SCM-Cache work propertly?
Community moderators have prevented the ability to post new answers.
If you raise a (subclass of) RepositoryRefChangedEvent
, scm-cache will invalidate its ref-cache
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.