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-69751] Add sorting for blocked projects #69

Merged
merged 14 commits into from
Dec 11, 2023

Conversation

monluk
Copy link
Contributor

@monluk monluk commented May 3, 2021

JENKINS-69751 Add sorting for blocked projects

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your master 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

What was wrong
When jobs were selected for moving from blocked to buildable list, the default sorting method was used, so that those jobs which have been in the queue for the longest time were moved to buildable first instead of those with highest priority.

What has been done
The default method for sorting blocked jobs has been overridden and now the same method is used for both buildable and blocked lists.

@monluk monluk force-pushed the bugfix/sortBlockedProjects branch from 2a817ac to 2061eed Compare May 3, 2021 20:14
@Si-So
Copy link
Contributor

Si-So commented Sep 30, 2022

I created a issue for this problem which can be found here: https://issues.jenkins.io/browse/JENKINS-69751

@MarkEWaite and @monluk : I intend to create a test for this PR sometime during the next week.

@github-actions github-actions bot added the test Automated test addition or improvement label Apr 15, 2023
@MarkEWaite MarkEWaite added bug Incorrect or flawed behavior and removed bugfix labels Nov 12, 2023
@olivierdagenais
Copy link
Member

Hello, I was having difficulty using this plugin to make sure some runs of a given job would start before others when I cranked up the logging and came to the same conclusion that our friends @monluk and @Si-So did: there was a gap in the implementation whereby we also need to sort blocked runs (it seems our use of "Do not allow concurrent builds" makes new runs show up as blocked).

I built an HPI from this pull request's branch, overwrote the version 5.0.0 plugin I had, restarted Jenkins and all of a sudden my configuration is working!

All this to say that I am eagerly anticipating a release of the Priority Sorter plugin for Jenkins which contains the changes in this pull request!

Is there anything I can do to help move this along? Are we satisfied with the tests provided in the PR? Do we want more documentation?? Do we want some torture/stress tests??? I'm happy to help.

Thanks!
Oli

@MarkEWaite
Copy link
Contributor

Is there anything I can do to help move this along? Are we satisfied with the tests provided in the PR? Do we want more documentation?? Do we want some torture/stress tests??? I'm happy to help.

@olivierdagenais, your interactive testing is enough to prompt me to merge and release it. I'd love to have additional documentation that describes the new behavior, but that can be a separate pull request.

@MarkEWaite MarkEWaite changed the title Bugfix/Add sorting for blocked projects Add sorting for blocked projects Dec 11, 2023
@MarkEWaite MarkEWaite removed the test Automated test addition or improvement label Dec 11, 2023
@MarkEWaite MarkEWaite changed the title Add sorting for blocked projects [JENKINS-69751] Add sorting for blocked projects Dec 11, 2023
@MarkEWaite MarkEWaite merged commit 4459da7 into jenkinsci:master Dec 11, 2023
@Si-So
Copy link
Contributor

Si-So commented Dec 12, 2023

Thanks for the merge :)

When do you plan to release a new version of the plugin?

@MarkEWaite
Copy link
Contributor

Thanks for the merge :)

When do you plan to release a new version of the plugin?

I want to do some basic testing of the pre-release in my environment over the next few days. I expect to release a version by the end of the week.

@olivierdagenais
Copy link
Member

I'd love to have additional documentation that describes the new behavior, but that can be a separate pull request.

Posted as #318

@Si-So
Copy link
Contributor

Si-So commented Dec 15, 2023

Hey,
this might be a little bit petty, but is it possible to add me to the list of contributors for 5.1.0?

I feel like that creating the unit test for monluk's changes added value.

If you don't add me, it is also fine :)

@MarkEWaite
Copy link
Contributor

Hey, this might be a little bit petty, but is it possible to add me to the list of contributors for 5.1.0?

I feel like that creating the unit test for monluk's changes added value.

Thanks for asking! I agree wholeheartedly that you should be listed. I've added you to the changelog. Thanks very much for your contribution!

@Si-So
Copy link
Contributor

Si-So commented Dec 15, 2023

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or flawed behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants