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

Add backwards compatibility for executor scaling feature #424

Merged
merged 11 commits into from
Nov 24, 2023

Conversation

GavinBurris42
Copy link
Collaborator

The new executor scaling feature involved the introduction the new executorScaler field for EC2FleetCloud, and the removal of the scaleExecutorsByWeight field. Upon upgrading from from an old version to a new version, including this change, the EC2FleetCloud unmarshalled from the users Jenkins config.xml file would set the executorScaler field to null, causing a NullPointer error during Agent provisioning.

The Jenkins clouds are being updated to include the new field during its periodic update. The executorScaler is based on the old scaleExecutorsByWeight field, which is now solely used for the instantiation of the executorScaler field. If a user previously configured executors to be scaled by weights it will continue to do so. These changes are then saved to the user's Jenkins config.xml file.

Testing done

Updated unit tests for the changed made for the backwards compatibility.
Performed manual testing regarding upgrading from version 3.0.1 and 3.0.2. Validated that the config.xml file pertains its configurations and is updated with the new executorScaler field.

…w test for cloud replacement when no Scaler is present
@GavinBurris42 GavinBurris42 merged commit 9617537 into master Nov 24, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants