-
Bug
-
Resolution: Unresolved
-
Major
-
None
GitHub PR
To fix this issue, I have submitted a pull request here: https://github.com/jenkinsci/ec2-plugin/pull/1140
Screenshots are attached on this ticket showing "broken" and "fixed" states.
Summary
Users cannot view OR save EC2 cloud configurations through the "Configure" page in the Jenkins UI.
Within Jenkins, navigate as follows:
Manage Jenkins -> Clouds -> [Cloud Name] -> Configure
On this "Configure" page, scroll down to the AMIs section.
Note that it is empty, even if you have slave templates registered.
As a result, users are not able to add/edit EC2 agent templates via UI. (See attached screenshots.)
The browser console shows repeated 404s for /manage/cloud/{name}/null when this page loads.
Root Cause Analysis
The UI is broken due to three missing Jenkins framework compliance requirements that became strictly enforced in recent versions.
(1) Missing JavaBean Getters in SlaveTemplate.java (Display Issue)
The plugin exposed configuration as public fields without getter methods. This worked until BeanUtils 1.10.0 (Jenkins 2.387.1, February 2023) removed an undocumented fallback that accessed public fields directly. The library now requires proper getters for Jelly template rendering, causing empty UI sections.
(2) Missing Descriptor Registration in AmazonEC2Cloud.java (Page Loading Issue)
AmazonEC2Cloud lacks a registered descriptor. Jenkins searches for AmazonEC2Cloud$DescriptorImpl but can't find it, resulting in /null requests and preventing the configuration page from loading properly.
(3) Missing @DataBoundConstructor in AmazonEC2Cloud.java (Form Submission Issue)
AmazonEC2Cloud lacks the annotation required for Stapler to bind form data. When users submit configuration changes, Jenkins throws NoStaplerConstructorException and returns HTTP 500 errors, preventing any settings from being saved.
All three issues stem from incomplete framework compliance that may have been previously tolerated by Jenkins but now causes complete UI failure.
Suggested Fixes
This should be a straightforward Jenkins framework compliance fix requiring three changes:
1. Add JavaBean getter methods - Fields and Jelly views are correct; they just need proper getters for UI display
2. Register AmazonEC2Cloud descriptor - Required for Jenkins to load the configuration page
3. Add @DataBoundConstructor annotation - Required for form submission to work
Similar fixes applied to other EC2 plugin classes (SpotConfiguration in March 2020, commit a467252) and across many Jenkins plugins as framework requirements tightened.
Changes are purely additive - no existing functionality is modified, only missing annotations and methods are added to meet modern Jenkins requirements.