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

Test support for cloud management changes #875

Merged
merged 13 commits into from
Sep 13, 2023

Conversation

car-roll
Copy link
Contributor

@car-roll car-roll commented Jul 28, 2023

The moving of cloud management to multiple pages (jenkinsci/jenkins#7658) appear to have broken some tests.

Bug also discovered when changing cloud name. See https://issues.jenkins.io/browse/JENKINS-71737

Also upstream of #888

cc @Vlatombe

Testing done

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options
Loading

pom.xml Outdated Show resolved Hide resolved
@car-roll car-roll changed the title update Jenkins version to 2.403 Test support for cloud management changes Jul 28, 2023
@car-roll
Copy link
Contributor Author

car-roll commented Jul 28, 2023

So testSshKeysCredentialsIdRemainsUnchangedAfterUpdatingOtherFields still fails. Looks to be a regression. When you change the cloud node name, the user then receives a 404 saying the URL to the old cloud config page does not exist.
However, the cloud name does change successfully when you go back, it's just that submitting the name change tries to take you back to the old cloud name config page.

Will look into James' comment about Items requiring special handling for renames.

@car-roll
Copy link
Contributor Author

car-roll commented Jul 28, 2023

It does look like 'Clouds' handles the name change successfully
https://github.com/jenkinsci/jenkins/blob/e1d64393f6001821d7a0448205bc6544421ead32/core/src/main/java/hudson/slaves/Cloud.java#L317

I guess the return url after the save is not being done correctly...somewhere...

Update: interesting, did some debugging and the test passed. Might be a race condition somewhere?

@car-roll
Copy link
Contributor Author

Turns out the issue is here: https://github.com/jenkinsci/jenkins/blob/31721319231f19bead0adcbb005b99c84a6f9171/core/src/main/java/hudson/slaves/Cloud.java#L334
The redirect is incorrect to return to the top of the clouds page. Will file a PR for fix.

@car-roll car-roll changed the title Test support for cloud management changes [JENKINS-71737] Test support for cloud management changes Aug 11, 2023
@raul-arabaolaza
Copy link

I beieve this handles properly the UI changes, while the 404 is managed by the core pr, I see no reason not to ship this fixes.

Copy link

@raul-arabaolaza raul-arabaolaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should try to move this forward

pom.xml Outdated Show resolved Hide resolved
src/test/java/hudson/plugins/ec2/AmazonEC2CloudTest.java Outdated Show resolved Hide resolved
@car-roll car-roll changed the title [JENKINS-71737] Test support for cloud management changes Test support for cloud management changes Aug 18, 2023
@car-roll
Copy link
Contributor Author

@Vlatombe I believe this PR is ready for review now. Would you be able to take a look at it?

@car-roll car-roll requested a review from rsandell August 31, 2023 23:57
@car-roll
Copy link
Contributor Author

Sorry forgot to remove an unnecessary TODO (related to name change fixes). I changed the test so it didn't rely on name changes and just changed a different property.

@car-roll car-roll closed this Sep 11, 2023
@car-roll car-roll reopened this Sep 11, 2023
@car-roll
Copy link
Contributor Author

dealing with CI flakes

@car-roll car-roll closed this Sep 11, 2023
@car-roll car-roll reopened this Sep 11, 2023
@car-roll
Copy link
Contributor Author

@res0nance Could you take a look at this PR? Tests fail here when the jenkins version is upgraded. It also revealed a regression in core (See jenkinsci/jenkins#8310)

Will continue to work on getting CI to pass. I believe it is infrastructure right now that is making it fail.

@car-roll
Copy link
Contributor Author

ci now passes

@res0nance res0nance added the dependencies Pull requests that update a dependency file label Sep 12, 2023
@res0nance
Copy link
Contributor

Hi @car-roll changes look fine would you like this merged or do you still have work to do in this area?

@car-roll
Copy link
Contributor Author

Hi @res0nance this PR is done so we can merge it 🚀 many thanks!

@res0nance res0nance merged commit 821b427 into jenkinsci:master Sep 13, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
6 participants