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

capacity providers #211

Merged
merged 7 commits into from
Jan 29, 2021
Merged

Conversation

chathsuom
Copy link
Contributor

@chathsuom chathsuom commented Aug 22, 2020

Enabling capacity provider support

@@ -307,7 +307,7 @@ TaskDefinition registerTemplate(final String cloudName, final ECSTaskTemplate te

if (template.isFargate()) {
request
.withRequiresCompatibilities(template.getLaunchType())
.withRequiresCompatibilities("FARGATE")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use a constant for "FARGATE" and "awsvpc"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to do that properly. (not from a development background). Do you have a sample somewhere in the code, so that I can refer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can re-use the enum in com.amazonaws.services.ecs.model
Example, for "FARGATE" you can use the enum in com.amazonaws.services.ecs.model.LaunchType
And for "awsvpc", you can use the enum in com.amazonaws.services.ecs.model.NetworkMode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Xantier
Copy link

Xantier commented Sep 9, 2020

Merging this in adds a new permission requirement. Should probably add that to the README file.
ecs:DescribeClusters on the main Jenkins instance is needed.

@chathsuom
Copy link
Contributor Author

Merging this in adds a new permission requirement. Should probably add that to the README file.
ecs:DescribeClusters on the main Jenkins instance is needed.

Fixed

@Xantier
Copy link

Xantier commented Oct 15, 2020

@webratz This could probably be something to merge in. We've been running this on our boxes for a while now and both Fargate and EC2 based tasks handle this nicely with the default capacity provider setting.

@MikeKroell
Copy link

Do we know when this will be officially merged in?

@webratz
Copy link
Contributor

webratz commented Oct 22, 2020

see #200

@mehta-akshay
Copy link

@webratz We started using this plugin recently and realized that you cannot cap max nodes it can spin up. Is there anything holding up this PR to be merged? This is one of the important feature for us to use this plugin. I would really appreciate if this can be merged.

@willychase
Copy link

@webratz , If it isn't too much to ask could this be merged? I understand you are looking for a new maintainer, but getting this change in would allow my Org to use a non-forked version of this project.

@tdspencer3
Copy link

We would really like for this PR to be merged in. We are actively using this code in our production environment (going on 2 months now). But it means we had to build it and side-load it because the code has not been released in this plugin yet.

@gokhanoner
Copy link

@willychase @tdspencer3 I'll look into this this week & merge ( I'm also using a similar version in my company as well, for the last 4 months now)

@carlosrodf
Copy link
Contributor

Any plans to merge this soon? this would be awesome to have without having to custom build/install it

@markjacksonfishing
Copy link
Contributor

@carlosrodf Let me see if I can get CI to pass and I will review and merge

@markjacksonfishing
Copy link
Contributor

@carlosrodf Wheels fall of the bus here:

[2021-01-28T23:52:20.636Z] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
[2021-01-28T23:52:20.636Z] /home/jenkins/workspace/Plugins_amazon-ecs-plugin_PR-211/src/main/java/com/cloudbees/jenkins/plugins/amazonecs/ECSTaskTemplate.java:[1038,41] no suitable constructor found for ECSService(java.lang.String,java.lang.String)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.lang.String,java.lang.String,java.lang.String) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.util.function.Supplier<com.amazonaws.services.ecs.AmazonECS>) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z] 

@carlosrodf, @chathsuom will need to correct that.

Copy link
Contributor

@markjacksonfishing markjacksonfishing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing failures in

[2021-01-28T23:52:20.636Z] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
[2021-01-28T23:52:20.636Z] /home/jenkins/workspace/Plugins_amazon-ecs-plugin_PR-211/src/main/java/com/cloudbees/jenkins/plugins/amazonecs/ECSTaskTemplate.java:[1038,41] no suitable constructor found for ECSService(java.lang.String,java.lang.String)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.lang.String,java.lang.String,java.lang.String) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.util.function.Supplier<com.amazonaws.services.ecs.AmazonECS>) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z] 

@chathsuom
Copy link
Contributor Author

Seeing failures in

[2021-01-28T23:52:20.636Z] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
[2021-01-28T23:52:20.636Z] /home/jenkins/workspace/Plugins_amazon-ecs-plugin_PR-211/src/main/java/com/cloudbees/jenkins/plugins/amazonecs/ECSTaskTemplate.java:[1038,41] no suitable constructor found for ECSService(java.lang.String,java.lang.String)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.lang.String,java.lang.String,java.lang.String) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.util.function.Supplier<com.amazonaws.services.ecs.AmazonECS>) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z] 

I will have a look soon.

@chathsuom
Copy link
Contributor Author

Seeing failures in

[2021-01-28T23:52:20.636Z] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
[2021-01-28T23:52:20.636Z] /home/jenkins/workspace/Plugins_amazon-ecs-plugin_PR-211/src/main/java/com/cloudbees/jenkins/plugins/amazonecs/ECSTaskTemplate.java:[1038,41] no suitable constructor found for ECSService(java.lang.String,java.lang.String)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.lang.String,java.lang.String,java.lang.String) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z]     constructor com.cloudbees.jenkins.plugins.amazonecs.ECSService.ECSService(java.util.function.Supplier<com.amazonaws.services.ecs.AmazonECS>) is not applicable
[2021-01-28T23:52:20.636Z]       (actual and formal argument lists differ in length)
[2021-01-28T23:52:20.636Z] 

Fixed

Copy link
Contributor

@markjacksonfishing markjacksonfishing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@markjacksonfishing markjacksonfishing merged commit a225334 into jenkinsci:master Jan 29, 2021
@carlosrodf
Copy link
Contributor

@markyjackson-taulia can an official release be made that includes this?

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.