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-72176] Split cloud management page into multiple pages #1443

Merged
merged 47 commits into from Oct 24, 2023

Conversation

scherler
Copy link
Contributor

@scherler scherler commented Oct 10, 2023

https://issues.jenkins.io/browse/JENKINS-72176

I want a better experience for managing pod templates within the Clouds management screen so that it is less confusing for which pod template I am updating. Further this will help loading speed of the configuration of both pages.

image(5)
image(4)
image(3)

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. Edit...
  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

Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
}

@POST
public HttpResponse doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is ATM not in use anymore

Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
@scherler scherler marked this pull request as ready for review October 11, 2023 20:07
@scherler scherler requested a review from a team as a code owner October 11, 2023 20:07
pom.xml Outdated Show resolved Hide resolved
@Vlatombe
Copy link
Member

In case you had not seen, I had filed a draft for this already in #1332

Copy link
Member

@Vlatombe Vlatombe left a comment

Choose a reason for hiding this comment

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

Looks like it's still work in progress

@scherler scherler changed the title [BEE-30772] JENKINS-72176] Split cloud management page into multiple pages Oct 13, 2023
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
@scherler
Copy link
Contributor Author

@Vlatombe no I did not know about your draft PR. I will try it now.

scherler and others added 2 commits October 13, 2023 11:00
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
…esCloud.java

Co-authored-by: Vincent Latombe <vincent@latombe.net>
@Vlatombe Vlatombe self-requested a review October 23, 2023 12:24
Comment on lines 619 to 640
// TODO: Remove when JENKINS-71737 is fixed
@POST
public HttpResponse doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException {

Jenkins j = Jenkins.get();
j.checkPermission(Jenkins.ADMINISTER);
Cloud cloud = j.getCloud(this.name);
if (cloud == null) {
return HttpResponses.notFound();
}
KubernetesCloud result = (KubernetesCloud) cloud.reconfigure(req, req.getSubmittedForm());
String proposedName = result.name;
if (!proposedName.equals(this.name)
&& j.getCloud(proposedName) != null) {
throw new Descriptor.FormException(Messages.cloudAlreadyExists(proposedName), "name");
}
result.templates = this.templates;
j.clouds.replace(this, result);
j.save();
// take the user back to the cloud top page.
return FormApply.success("../..");
}
Copy link
Member

Choose a reason for hiding this comment

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

Even if this starts from a good intention, I think it should be split to a separate PR as it is unrelated to the intent of this PR.

scherler and others added 3 commits October 23, 2023 15:58
Co-authored-by: Vincent Latombe <vincent@latombe.net>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
@scherler
Copy link
Contributor Author

@Vlatombe removed the workaround and applied suggestions

Copy link
Member

@Vlatombe Vlatombe left a comment

Choose a reason for hiding this comment

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

A few last non-blocking comments

  • Nothing prevents duplicate pod templates (with the same name) being created. No form validation either when entering the pod template name. (nothing new, just noting)
  • Now that pod templates can be edited in separate pages, Pod template to inherit from could use an autocomplete component to fill in references to other pod template names

scherler and others added 2 commits October 24, 2023 09:02
Co-authored-by: Vincent Latombe <vincent@latombe.net>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
Copy link
Member

@aneveux aneveux left a comment

Choose a reason for hiding this comment

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

Minor comments, good job!

@@ -45,8 +45,7 @@
<connectorHost />
<jenkins.host.address />
<slaveAgentPort />
<!-- TODO fix KubernetesCloudTest todos once past 2.414 -->
<jenkins.version>2.401.1</jenkins.version>
<jenkins.version>2.415</jenkins.version>
Copy link
Member

Choose a reason for hiding this comment

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

I imagine this bump is there to retrieve some necessary updates from core?

Cause it is higher than the recommended minimum version: https://www.jenkins.io/doc/developer/tutorial-improve/update-base-jenkins-version/

And also it does not align with the bom anymore (bom is using 2.401.x).

If it is intended and mandatory to have 2.415 it could be interesting to write a comment explaining it and a TODO to align the bom as soon as available?

Copy link
Member

Choose a reason for hiding this comment

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

Afair this is to get <l:delete ...>.

BOM should be bumped to the closest LTS which is 2.414.x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change was suggested by @Vlatombe, we need a version after jenkinsci/jenkins#7658, other than that ...

Vlatombe added a commit to Vlatombe/jenkins that referenced this pull request Oct 24, 2023
scherler and others added 2 commits October 24, 2023 10:32
Co-authored-by: Antoine Neveux <aneveux@cloudbees.com>
Co-authored-by: Vincent Latombe <vincent@latombe.net>
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
@Vlatombe Vlatombe added the enhancement Improvements label Oct 24, 2023
@Vlatombe Vlatombe merged commit 2d7cebd into jenkinsci:master Oct 24, 2023
6 checks passed
@scherler scherler deleted the BEE-30772 branch October 24, 2023 14:31
@jonesbusy
Copy link

Am I the only one that since this change when updating the cloud config via the UI all pod templates are lost ?

I'm not sure if it's expected, changing cloud config should not touch pod templates since they are moved to a separate page.

I can try to reproduce it in more isolated environment or even directly with hpi:run

@jglick
Copy link
Member

jglick commented Nov 15, 2023

I can try to reproduce it in more isolated environment or even directly with hpi:run

Yes please.

@jonesbusy
Copy link

@jglick It's here : https://issues.jenkins.io/browse/JENKINS-72314

Can be easily reproduced with mvn hpi:run -Dport=8081 -Dhost=0.0.0.0 and not extra configuration

@jglick
Copy link
Member

jglick commented Nov 16, 2023

@Vlatombe @scherler is a ^^^ regression fix forthcoming? Otherwise this should be reverted as a hotfix.

@Vlatombe
Copy link
Member

🤦 #1471

@scherler
Copy link
Contributor Author

Sorry for introducing a regression and thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements
Projects
None yet
8 participants