Comments (14)
I was able to render a task def with this action. In one project it works just fine, in the other it does not work, and it throws Invalid task definition: Could not find container definition with matching name
Both projects have the same task def. Structure. This is super confusing.
Any fix or workaround?
from amazon-ecs-render-task-definition.
Update: the same task definition and GH workflow work with [email protected].
I'll be glad to send you debug output in private.
from amazon-ecs-render-task-definition.
Any updates?
from amazon-ecs-render-task-definition.
@roman-parkhunovskyi - it's good news for me, so I'm not crazy :-)
My plan B is forking v1.1.2, update @actions/core and rebuild - I already did that for about GHA (Slack notification). Of course, I'll publish it.
set-output deprecation notice and might stop working after May 31
Did GH already announce this date?
from amazon-ecs-render-task-definition.
I'm also having this issue. When will they fix this?
from amazon-ecs-render-task-definition.
Strange...
Even with Run aws-actions/amazon-ecs-render-task-definition@v1
getting same: Error: Invalid task definition: Could not find container definition with matching name
Here my current action step:
- name: Create new AWS ECS task definition on Stage (DEV)
id: dev-task-def
uses: aws-actions/[email protected]
with:
task-definition: task-definition.json
container-name: ${{ inputs.ECS_CONTAINER_NAME }}
image: ${{ steps.dev-image-build.outputs.image }}
I'm wondering if you really want to keep this issue closed.
from amazon-ecs-render-task-definition.
v1.1.2 appears to work, thanks @vitalykarasik. But it has set-output deprecation notice and might stop working after May 31.
v1.1.3 has this bug, described in the issue.
from amazon-ecs-render-task-definition.
Was able to resolve. Issue was lack of quotes around the name in the yaml file. The yaml file would parse but this would fail. Make sure that your container name is quoted.
from amazon-ecs-render-task-definition.
@brennh-animoca - thanks! Can you please provide more details:
- "I'm also having this issue" - your original config didn't work with v1.1.3, but worked with v1.1.2?
- "Issue was lack of quotes around the name in the yaml file" - do you mean task definition file? I'm using JSON format, and as far as I see all strings are quoted. Can you please share some example?
from amazon-ecs-render-task-definition.
I'm unclear what fixed it but i changed the task definition to have ALL hardcoded values until I got it working. Then when i went back through slowly, the only thing that I think could have changed is this:
"image": "${{ INPUT_IMAGE }}",
originally, there were not quotes around "${{ INPUT IMAGE }}". However, looking quickly at the code for the plugin, I'm still not sure.
Once I got it working, I moved back to v1.1.3 and it still was functioning.
from amazon-ecs-render-task-definition.
@brennh-animoca - thank you for the details.
Weird...
As far as I can see, all my task definitions are 99% similar, and I had an issue with one of them with v1.1.3.
It's more or less
"containerDefinitions": [
{
"name": "servicename",
"image": "XXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/server-name:hashhashhashhashhash",
from amazon-ecs-render-task-definition.
I rechecked this issue today and I'm going to close my issue.
According to my today's tests, all my task definitions are compatible with amazon-ecs-render-task-definition@v1, i.e. with 1.1.3.
(I have no idea what happened to me in February :-)
from amazon-ecs-render-task-definition.
@Abdullah-Shahen - does your workflow works with v1.1.2?
My workflow seems almost the same:
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
container-name: ${{ env.CONTAINER_NAME }}
image: ${{ steps.build-image.outputs.image }}
and relevant of a task definition is
"containerDefinitions": [
{
"name": "core-p",
"image": "xxxxxx.dkr.ecr.us-east-1.amazonaws.com/core-p:7da9b252999a69d0cc1ab1ed52f769f29f960e1d",
Again - I have no idea why I met this issue in Feb, but cannot reproduce now - neither action not my task definitions weren't modified as far as I see...
As for this issue - I prefer not to be an owner of it as far as I cannot reproduce it. Of course, you're welcome to reference or just copy-paste my issue in yours.
from amazon-ecs-render-task-definition.
I'll copy the issue and reference to it as well. Thanks for the approval to do so.
from amazon-ecs-render-task-definition.
Related Issues (20)
- set-output command is deprecated HOT 6
- Add ability to set env vars from file or from AWS AppConfig
- dynamic image change HOT 1
- The `set-output` command is deprecated HOT 4
- Render for more than one container HOT 3
- How to create a new revision for an existing task definition? HOT 2
- Unable to use multi-line environment variables HOT 3
- Bug: Invalid task definition: Could not find container definition with matching name HOT 2
- current status HOT 3
- how to update the awslogs-group? HOT 1
- new dist creation workflow (package) failing
- ephemeralStorage value is not copied over
- Adding support for `dockerLabels` in task HOT 1
- How to pass environment variable file to the action? HOT 2
- dockers-labels not working HOT 4
- Node16 deprecation warning HOT 16
- I think `v1.3.0` not working with command starts with `NODE_ENV=` HOT 3
- The render action does not delete environment variables that are no longer passed to it HOT 1
- Need a way to remove Docker commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ecs-render-task-definition.