Skip to content

Add support for ECS agent pools to avoid cold start - #400

Open
arechavarria wants to merge 3 commits into
jenkinsci:masterfrom
arechavarria:feature/ecs_agents_pool
Open

Add support for ECS agent pools to avoid cold start#400
arechavarria wants to merge 3 commits into
jenkinsci:masterfrom
arechavarria:feature/ecs_agents_pool

Conversation

@arechavarria

Copy link
Copy Markdown

This update introduces the functionality to maintain a pool of pre-warmed ECS agents. This allows Jenkins to execute tasks more quickly by avoiding the delay caused when containers are started from scratch.
To achieve this, the classes ECSAgentPool and ECSAgentPoolMaintainer were added, along with adjustments to ECSCloud, ECSPoolSlave, and other related components.

Testing done
The new functionality was manually verified by running Jenkins with a configured agent pool. It was observed that the preexisting agents are used correctly and maintained according to the configuration.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Tests:

image
image
image

return FormValidation.ok();
}

public FormValidation doCheckMinIdleAgents(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing POST/RequirePOST annotation

Potential CSRF vulnerability: If DescriptorImpl#doCheckMinIdleAgents connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
return FormValidation.ok();
}

public FormValidation doCheckMinIdleAgents(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing permission check

Potential missing permission check in DescriptorImpl#doCheckMinIdleAgents
return FormValidation.error("Must be a non-negative integer");
}

public FormValidation doCheckMaxIdleMinutes(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing POST/RequirePOST annotation

Potential CSRF vulnerability: If DescriptorImpl#doCheckMaxIdleMinutes connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
return FormValidation.error("Must be a non-negative integer");
}

public FormValidation doCheckMaxIdleMinutes(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing permission check

Potential missing permission check in DescriptorImpl#doCheckMaxIdleMinutes
return FormValidation.error("Must be a non-negative integer");
}

public FormValidation doCheckMaintainSchedule(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing POST/RequirePOST annotation

Potential CSRF vulnerability: If DescriptorImpl#doCheckMaintainSchedule connects to user-specified URLs, modifies state, or is expensive to run, it should be annotated with @POST or @RequirePOST
return FormValidation.error("Must be a non-negative integer");
}

public FormValidation doCheckMaintainSchedule(@QueryParameter String value) {

Check warning

Code scanning / Jenkins Security Scan

Stapler: Missing permission check

Potential missing permission check in DescriptorImpl#doCheckMaintainSchedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants