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

Reserved resources available again after reloading CasC configuration #650

Merged

Conversation

mPokornyETM
Copy link
Contributor

fix #527

Testing done

Manuel tests in config page

Create jenkins instance with JCAC
Reserve resource in LRM page
restart jenkins
Resource is still reserved

Proposed upgrade guidelines

N/A

Localizations

N/A

Submitter checklist

  • The Jira / Github issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).
    • The changelog generator for plugins uses the pull request title as the changelog entry.
    • Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.

@mPokornyETM mPokornyETM requested a review from a team as a code owner April 26, 2024 20:31
@manosnoam
Copy link

Thanks for this PR @mPokornyETM.
Was it not merged yet due to some checks ?

@mPokornyETM
Copy link
Contributor Author

Thanks for this PR @mPokornyETM. Was it not merged yet due to some checks ?

It has failed last time. I have no idea. It is long time ago. I merged master again into this branch. We will see if it works. WHen are the check green now, we canmerge it.

@manosnoam
Copy link

manosnoam commented Aug 15, 2024

It has failed last time. I have no idea. It is long time ago. I merged master again into this branch. We will see if it works. WHen are the check green now, we canmerge it.

Checks failed on expected:<Reserved_A> but was:<null> , I think you need to update the test too:

assertEquals("Reserved_A", declaredResource.getReservedBy());

@mPokornyETM
Copy link
Contributor Author

It has failed last time. I have no idea. It is long time ago. I merged master again into this branch. We will see if it works. WHen are the check green now, we canmerge it.

Checks failed on expected:<Reserved_A> but was:<null> , I think you need to update the test too:

assertEquals("Reserved_A", declaredResource.getReservedBy());

thx for hit. I changed the test. Maybe now. But you are welcome to review this changes ;-)

@manosnoam
Copy link

thx for hit. I changed the test. Maybe now. But you are welcome to review this changes ;-)

I think now ConfigurationAsCodeTest.java needs a formatting fix with mvn spotless:apply

@manosnoam
Copy link

All checks passed!
Who can review and approve?

@mPokornyETM
Copy link
Contributor Author

All checks passed! Who can review and approve?

you ;-)

@mPokornyETM mPokornyETM added this to the Feature committed milestone Sep 19, 2024
@mPokornyETM mPokornyETM added bug Merged without review ! This PR was marged without reviewers labels Sep 19, 2024
@mPokornyETM mPokornyETM merged commit 99ca947 into jenkinsci:master Sep 19, 2024
16 checks passed
@mPokornyETM mPokornyETM deleted the feature/remove-reservedBy-from-JCAC branch September 19, 2024 07:52
@roded
Copy link

roded commented Sep 19, 2024

Hi, really looking forward for this fix.
I tried upgrading to the latest release which includes this fix and am still seeing the locks released after both a Jenkins restart or a CasC reload.

@mPokornyETM
Copy link
Contributor Author

which version do used? The release '1310.v99ca_947ed698' has been published 1 hour ago. Has you this version?

@roded
Copy link

roded commented Sep 19, 2024

Yeah, I've upgraded just for this fix.

image

@kaltsi
Copy link

kaltsi commented Sep 25, 2024

Happened to me too after a jenkins restart.
I was running Jenkins 2.462.1, updated plugins, upgraded Jenkins to 2.462.2 and updated plugins again.

All manually reserved resources had been released.

@kobihk
Copy link

kobihk commented Sep 25, 2024

+1
After "Reload existing configuration" all the reserved resources were released to me too
with:
Jenkins Version 2.452.4
Lockable Resources plugin Version1310.v99ca_947ed698

@mPokornyETM
Copy link
Contributor Author

Happened to me too after a jenkins restart. I was running Jenkins 2.462.1, updated plugins, upgraded Jenkins to 2.462.2 and updated plugins again.

All manually reserved resources had been released.

I see, my mistake. I does not understand it correctly. So I will revert the changes, open the issue again and try to find some other solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Merged without review ! This PR was marged without reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reserved resources available again after reloading CasC configuration
5 participants