Skip to content

Commit

Permalink
revert: "chore(ecs): clarify it's possible to use image digest on fro…
Browse files Browse the repository at this point in the history
…mEcrRepository" (#27143)

Reverts #27115

Renaming `tag` prop to `tagOrDigest` of the `ContainerImage.fromEcrRepository` function introduces a breaking change, not for typescript users, but for other languages that require specifying the property name when calling the function.
  • Loading branch information
sumupitchayan committed Sep 14, 2023
1 parent e6322aa commit 049153e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions packages/@aws-cdk/aws-sagemaker-alpha/lib/container-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ export interface ContainerImageConfig {
export abstract class ContainerImage {
/**
* Reference an image in an ECR repository
*
* @param repository ECR repository
* @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`)
*/
public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest'): ContainerImage {
return new EcrImage(repository, tagOrDigest);
public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest'): ContainerImage {
return new EcrImage(repository, tag);
}

/**
Expand Down
7 changes: 2 additions & 5 deletions packages/aws-cdk-lib/aws-ecs/lib/container-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ export abstract class ContainerImage {

/**
* Reference an image in an ECR repository
*
* @param repository ECR repository
* @param tagOrDigest Optional image tag or digest (digests must start with `sha256:`)
*/
public static fromEcrRepository(repository: ecr.IRepository, tagOrDigest: string = 'latest') {
return new EcrImage(repository, tagOrDigest);
public static fromEcrRepository(repository: ecr.IRepository, tag: string = 'latest') {
return new EcrImage(repository, tag);
}

/**
Expand Down

0 comments on commit 049153e

Please sign in to comment.