fix(JENKINS-76057): Fix EC2 plugin "Configure" UI - users cannot view or save cloud configurations #1140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves this ticketed bug:
https://issues.jenkins.io/browse/JENKINS-76057
Description
The EC2 plugin configuration UI is broken. Users cannot view or save EC2 cloud configurations on this page:
The page now shows empty AMI sections and broken form fields.
Form submissions fail with HTTP 500 errors, preventing users from saving any configuration changes.
A root cause analysis is included in the original ticket linked above.
Changes Made
SlaveTemplate.java
getZone()method public (was package-private)getAvoidUsingOrphanedNodes()method for missing fieldEC2Cloud.java
getName()method for JavaBean compliance@Extension DescriptorImplregistrationAmazonEC2Cloud.java
@DataBoundConstructorannotation to primary constructor for form binding@Extension DescriptorImplextendingEC2Cloud.DescriptorImplSimilar fixes applied to other EC2 plugin classes (SpotConfiguration in a467252, March 2020) and across many Jenkins plugins as framework requirements tightened.
Testing Done
mvn clean package- all tests passScreenshots
Before the change:
After the change:
Submitter checklist