jenkinsci / ec2-fleet-plugin

The EC2 Fleet plugin launches EC2 instances as worker nodes for Jenkins CI server, automatically scaling the capacity with the load.
https://plugins.jenkins.io/ec2-fleet/
Apache License 2.0
111 stars 81 forks source link

cleaned up suffix generation for CloudNames and default name for CasC #402

Closed vineeth-bandi closed 1 year ago

vineeth-bandi commented 1 year ago

Suffix generation now uses a randomly generated string instead of incremental for default cloud name generation through UI or empty strings in CasC configurations.

Testing done

Altered and added Unit Tests in EC2CloudNamesTest.java for new functionality.

Added Unit Test in EC2FleetCloudConfigurationAsCodeTest.java for empty strings in CasC.

Tested that both UI and CasC generate default cloud names properly. On creation of new clouds and empty strings in yaml file for UI and CasC, respectively.

Verified functionality of added features in Jenkins version 2.277.2 and version 2.414

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
pdk27 commented 1 year ago

Could you add a test to https://github.com/jenkinsci/ec2-fleet-plugin/blob/master/src/test/java/com/amazon/jenkins/ec2fleet/EC2FleetCloudConfigurationAsCodeTest.java for the default name case?