Skip to content

Conversation

@mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented Mar 4, 2023

When the retrieve from the scm of a library into the cache fails, we end up with a corrupted cache directory. All following pipelines using this library will fail until the cache has expired.

This fix will create a temporary directory into which the library is retrieved. Afterwards the directory is renamed to the actual cache directory (which is more or less atomic).

JENKINS-69573

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

In case the retrieve of the library sources from the scm fails, we
end up with a corrupted cache directory that is only cleaned when the
cache expires.
To avoid this fetch the sources into a tmp directory and rename to the
actual cache dir once completed.
@mawinter69 mawinter69 requested a review from a team as a code owner March 4, 2023 02:45
@jglick
Copy link
Member

jglick commented Mar 4, 2023

Note: likely minor merge conflicts with #55 or #57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants