Skip to content

Conversation

@abelmokadem
Copy link
Contributor

Issue # (if applicable)

N/A

Reason for this change

Docker Images can't be pushed from a staged tarball if CDK Stages are used.

This is because the relative path is not being compared against the correct directory. The current comparison is done against the assetOutDir instead of the outDir.

When a CDK app doesn't use stages, these 2 directories are the same and it works.
When a CDK app does use stages, these 2 directories are not the same and the docker tag command breaks.

Description of changes

Use outDir instead of assetOutDir.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

I deployed a stack with and without Stages, before and after I made the change.

In the before, the Stage approach failed.
After the change, both versions worked.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK label Aug 22, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team August 22, 2025 09:07
@github-actions github-actions bot added the p2 label Aug 22, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@abelmokadem abelmokadem changed the title Fix(ecr-assets): Fix relative path of tarball asset when using stages fix(ecr-assets): Fix relative path of tarball asset when using stages Aug 22, 2025
@abelmokadem abelmokadem changed the title fix(ecr-assets): Fix relative path of tarball asset when using stages fix(ecr-assets): fix relative path of tarball asset when using stages Aug 22, 2025
@abelmokadem
Copy link
Contributor Author

abelmokadem commented Aug 22, 2025

Is it possible to get this PR merged without introducing integration tests into this package? I don't have time to introduce integration tests into this change. The ecr-assets package doesn't come with those tests.

@abelmokadem
Copy link
Contributor Author

Exemption Request, please see comment above:

Is it possible to get this PR merged without introducing integration tests into this package? I don't have time to introduce integration tests into this change. The ecr-assets package doesn't come with those tests.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Aug 24, 2025
@vishaalmehrishi
Copy link
Contributor

Is it possible to get this PR merged without introducing integration tests into this package? I don't have time to introduce integration tests into this change. The ecr-assets package doesn't come with those tests.

Hi @abelmokadem , thank you for your contribution!

This fix should be accompanied by an update to the existing integration tests, to ensure the new (correct) behaviour is not broken in the future.

@vishaalmehrishi vishaalmehrishi self-assigned this Oct 24, 2025
@vishaalmehrishi vishaalmehrishi force-pushed the fix-docker-tarball-asset branch from 29e292c to 0cf8116 Compare October 24, 2025 10:39
@vishaalmehrishi vishaalmehrishi force-pushed the fix-docker-tarball-asset branch from 0cf8116 to 24bde72 Compare October 29, 2025 12:31
@vishaalmehrishi vishaalmehrishi dismissed aws-cdk-automation’s stale review October 29, 2025 14:44

Integ test has been updated; re-requesting a review does not seem to be working

@mergify
Copy link
Contributor

mergify bot commented Oct 29, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Oct 29, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/codebuild-pr-build.yml without workflows permission.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

✅ A exemption request has been requested. Please wait for a maintainer's review.

@vishaalmehrishi
Copy link
Contributor

Is it possible to get this PR merged without introducing integration tests into this package? I don't have time to introduce integration tests into this change. The ecr-assets package doesn't come with those tests.

Hi @abelmokadem , thank you for your contribution!

This fix should be accompanied by an update to the existing integration tests, to ensure the new (correct) behaviour is not broken in the future.

Hi @abelmokadem , just highlighting this since the existing integ test needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants