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

(aws_ecs: ContainerImage): why repository_name parameter is depricated? #16703

Closed
TRANTANKHOA opened this issue Sep 29, 2021 · 6 comments
Closed
Assignees
Labels
@aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets guidance Question that needs advice or information.

Comments

@TRANTANKHOA
Copy link

I noticed in document that there is this parameter for repository_name (Optional[str]) – (deprecated) ECR repository name. It would be something useful in my case since I can use that to have a stable reference to my image instead of the random hash cdk generates. This would help me clean up the ECR from all those obsolete images.

The question is why it is now deprecated?

@TRANTANKHOA TRANTANKHOA added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 29, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Sep 29, 2021
@peterwoodworth
Copy link
Contributor

Here's the PR which deprecated repositoryName: #5733

The PR doesn't specifically say why this was deprecated, however the comments left an alternative for the user:

/**
* ECR repository name
*
* Specify this property if you need to statically address the image, e.g.
* from a Kubernetes Pod. Note, this is only the repository name, without the
* registry and the tag parts.
*
* @default - the default ECR repository for CDK assets
* @deprecated to control the location of docker image assets, please override
* `Stack.addDockerImageAsset`. this feature will be removed in future
* releases.
*/
readonly repositoryName?: string;

@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Sep 29, 2021
@peterwoodworth peterwoodworth added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Sep 29, 2021
@TRANTANKHOA
Copy link
Author

TRANTANKHOA commented Sep 30, 2021

The comment in that PR leads into this rabbit hole I.e. I would have to implement the entire extension instead. Why this has to be so complicated?

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Sep 30, 2021
@peterwoodworth peterwoodworth added @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets and removed @aws-cdk/aws-ecs Related to Amazon Elastic Container labels Oct 2, 2021
@peterwoodworth
Copy link
Contributor

@eladb can you provide your input here? Thanks

@eladb
Copy link
Contributor

eladb commented Oct 11, 2021

Basically the recommended solution is to use https://github.com/wchaws/cdk-ecr-deployment if you wish to deploy docker images.

@eladb eladb closed this as completed Oct 11, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@TRANTANKHOA
Copy link
Author

that doesn't work if the image needs to be referred to in a lambda deployment, since the image isn't available at the time yet I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

4 participants