Skip to content

Conversation

@mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented Sep 16, 2025

Previously the temporary file was deleted when the job was waiting in the queue and Jenkins was restarted.

fixes #254

Testing done

Added a unit test which fails without this fix.
Manually verified that the temporary folder with the file is deleted when cancelling the entry from the queue

Submitter checklist

  • 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 demonstrate the feature works or the issue is fixed

@mawinter69 mawinter69 requested a review from a team as a code owner September 16, 2025 11:17
@jglick
Copy link
Member

jglick commented Sep 17, 2025

compare jenkinsci/jenkins#11081

@jglick
Copy link
Member

jglick commented Sep 17, 2025

This will work in a test and may work in certain server environments, but will not work in general, for example when running Jenkins as a StatefulSet in Kubernetes with $JENKINS_HOME mounted to a PersistentVolumeClaim: /tmp will be thrown out and recreated on each restart.

@jglick jglick added the bug Something isn't working label Sep 17, 2025
@jglick jglick merged commit 69e65a6 into jenkinsci:master Sep 17, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stashedFile parameter is not retained during a Jenkins restart while in the queue

2 participants