-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
} | ||
|
||
@POST | ||
public HttpResponse doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException { |
There was a problem hiding this comment.
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
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
In case you had not seen, I had filed a draft for this already in #1332 |
There was a problem hiding this 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
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateAction.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/sidepanelx.jelly
Outdated
Show resolved
Hide resolved
Signed-off-by: Thorsten Scherler <[email protected]>
@Vlatombe no I did not know about your draft PR. I will try it now. |
Signed-off-by: Thorsten Scherler <[email protected]>
…esCloud.java Co-authored-by: Vincent Latombe <[email protected]>
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Show resolved
Hide resolved
// 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("../.."); | ||
} |
There was a problem hiding this comment.
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.
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Vincent Latombe <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
@Vlatombe removed the workaround and applied suggestions |
There was a problem hiding this 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
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/Messages.properties
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud.java
Outdated
Show resolved
Hide resolved
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/sidepanel.properties
Outdated
Show resolved
Hide resolved
Co-authored-by: Vincent Latombe <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
There was a problem hiding this 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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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 ...
src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/csanchez/jenkins/plugins/kubernetes/KubernetesCloud/sidepanel.jelly
Outdated
Show resolved
Hide resolved
Noticed while reviewing jenkinsci/kubernetes-plugin#1443
Co-authored-by: Antoine Neveux <[email protected]> Co-authored-by: Vincent Latombe <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
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 |
Yes please. |
@jglick It's here : https://issues.jenkins.io/browse/JENKINS-72314 Can be easily reproduced with |
🤦 #1471 |
Sorry for introducing a regression and thanks for the quick fix |
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.
Testing done
Submitter checklist