Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-60434] Control pausing pipeline builds during quieting down period #932

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TueDissingWork
Copy link

@TueDissingWork TueDissingWork commented Sep 10, 2024

Change description

Adding a few new features as well as the needed configuration parameters:

  • control whether or not to pause pipeline builds during quieting down period
  • toggle whether or not to abort long running builds during quieting down period
    • adding a config parameter to control the length of timeout in minutes
  • default behaviour are unchanged

The feature implemented in this PR relates to the discussion in JENKINS-60434

The motivation for this change

We a running a large amount of individual Jenkins instances. That all run in Kubernetes. These are orchestrated by the Jenkins Operator and when a restart is needed by a reconcile loop, the operator does not wait for builds to finish -> causing abandoned build agents.

With this change it will be possible to introduce a grace period (the timeout) in which remaining builds can finish their work. When this grace period is over, any remaining builds will be aborted. This drains all nodes and makes it possible to perform a clean shutdown of Jenkins.

Testing done

Added a couple of new test cases that run through the different scenarios.

Also performed additional manual tests to ensure that the desired behaviour persists when running with build agents in Kubernetes.

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 demonstrates feature works or fixes the issue

@TueDissingWork
Copy link
Author

This is a more elaborated version of the solution proposed in the PR: #846

@TueDissingWork TueDissingWork changed the title [JENKINS-60434]Feature/control pausing during quieting down [JENKINS-60434] Control pausing pipeline builds during quieting down period Sep 10, 2024
@TueDissingWork TueDissingWork marked this pull request as ready for review September 10, 2024 13:13
@TueDissingWork TueDissingWork requested a review from a team as a code owner September 10, 2024 13:13
@TueDissingWork
Copy link
Author

a review or a comment on the work we be great :-)

@jglick
Copy link
Member

jglick commented Sep 20, 2024

On my list, but there is a lot on my list.

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.

2 participants