jenkinsci / jenkinsci/amazon-ecs-plugin

Use :latest task definition instead of registering a new one every time.

Open
#263 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
197
Forks
226
Avg merge
2d 15h
Merged PRs (30d)
1

Description

### Jenkins and plugins versions report

Environment


```text
Jenkins: 2.332.3
OS: Linux - 4.14.275-207.503.amzn2.x86_64
---
ace-editor:1.1
amazon-ecs:1.40
ant:1.13
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-cloudformation:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-codebuild:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ec2:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ecr:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ecs:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-elasticbeanstalk:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-iam:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-logs:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-minimal:1.12.163-315.v2b_716ec8e4df
aws-java-sdk-ssm:1.12.163-315.v2b_716ec8e4df
bitbucket:223.vd12f2bca5430
blueocean:1.25.3
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.3
blueocean-commons:1.25.3
blueocean-config:1.25.3
blueocean-core-js:1.25.3
blueocean-dashboard:1.25.3
blueocean-display-url:2.4.1
blueocean-events:1.25.3
blueocean-git-pipeline:1.25.3
blueocean-github-pipeline:1.25.3
blueocean-i18n:1.25.3
blueocean-jwt:1.25.3
blueocean-personalization:1.25.3
blueocean-pipeline-api-impl:1.25.3
blueocean-pipeline-editor:1.25.3
blueocean-pipeline-scm-api:1.25.3
blueocean-rest:1.25.3
blueocean-rest-impl:1.25.3
blueocean-web:1.25.3
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-6
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:757.vddedc5f2589a_
cloudbees-folder:6.708.ve61636eb_65a_5
command-launcher:1.6
configuration-as-code:1414.v878271fc496f
credentials:1087.1089.v2f1b_9a_b_040e4
credentials-binding:1.27.1
display-url-api:2.3.5
durable-task:493.v195aefbb0ff2
echarts-api:5.3.0-2
email-ext:2.87
favorite:2.4.1
font-awesome-api:6.0.0-1
git:4.10.3
git-client:3.11.0
git-parameter:0.9.16
git-server:1.10
github:1.34.3
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.4
gradle:1.38
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
htmlpublisher:1.29
jackson2-api:2.13.1-246.va8a9f3eaf46a
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.3
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-2
jquery:1.12.4-1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.54
ldap:2.8
locale:144.v1a_998824ddb_3
lockable-resources:2.14
mailer:408.vd726a_1130320
matrix-auth:3.1
matrix-project:1.20
mercurial:2.16
momentjs:1.1.1
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.7
pipeline-aws:1.43
pipeline-build-step:2.16
pipeline-github-lib:36.v4c01db_ca_ed16
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-milestone-step:100.v60a_03cd446e1
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.23
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.23
plain-credentials:1.8
plugin-util-api:2.14.0
popper-api:1.16.1-2
popper2-api:2.11.2-1
pubsub-light:1.16
resource-disposer:0.17
role-strategy:3.2.0
scm-api:595.vd5a_df5eb_0e39
script-security:1138.v8e727069a_025
snakeyaml-api:1.29.1
sonar:2.14
sse-gateway:1.25
ssh-credentials:1.19
ssh-slaves:1.806.v2253cedd3295
sshd:3.1.0
structs:308.v852b473a2b8c
timestamper:1.17
token-macro:280.v97a_82642793c
trilead-api:1.0.13
variant:1.4
workflow-aggregator:2.7
workflow-api:1138.v619fd5201b_2f
workflow-basic-steps:2.24
workflow-cps:2660.vb_c0412dc4e6d
workflow-cps-global-lib:566.vd0a_a_3334a_555
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1145.v7f2433caa07f
workflow-multibranch:711.vdfef37cda_816
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:813.vb_d7c3d2984a_0
ws-cleanup:0.40
```

### What Operating System are you using (both controller, and any agents involved in the problem)?

OS: Linux - 4.14.275-207.503.amzn2.x86_64

### Reproduction steps

1. Configure ECS template with a template name

### Expected Results

Plugin reuse the same task definition on ECS

### Actual Results

The plugin creates one task definition per Job, which starts to increase the number of task definitions for the aws account. Currently we have thousands of revisions of the same task definition.

### Anything else?

We tried Task Definition Override option but it seems to work for that purpose but Jobs don't run in parallel. Is there another way?

Contributor guide

Open the contributing guide

Research direction

Start with the ECS template configuration and the Task Definition Override option described in the reproduction steps. Trace how a template-backed job registers task definitions, then verify that parallel jobs can reuse the intended definition without creating a new revision for each job.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.