Skip to content

Conversation

@pahud
Copy link
Contributor

@pahud pahud commented Aug 27, 2025

Issue # (if applicable)

Closes #35336.

Reason for this change

The TarballImageAsset class hardcoded the docker command in its executable array instead of respecting the CDK_DOCKER environment variable. This caused failures when users tried to use alternative container runtimes like Finch, breaking existing workflows that rely on CDK_DOCKER for container runtime selection.

Description of changes

  • Modified TarballImageAsset to use ${process.env.CDK_DOCKER ?? 'docker'} pattern instead of hardcoded 'docker' command
  • Added comprehensive unit test to verify CDK_DOCKER environment variable is respected
  • Updated README.md to document CDK_DOCKER support for TarballImageAsset

The fix makes TarballImageAsset consistent with other CDK components that already respect the CDK_DOCKER environment variable, using the exact same pattern used throughout the CDK codebase.

Describe any new or updated permissions being added

N/A - No IAM permissions or resource access changes. This is a build-time bug fix affecting asset preparation only.

Description of how you validated changes

  • Unit tests: Added new test case "respects CDK_DOCKER environment variable" that sets CDK_DOCKER=custom-docker and verifies the executable array contains the custom command. All existing tests continue to pass (35/35 tests in aws-ecr-assets module).
  • Integration tests: Existing integration test passes with unchanged snapshot, confirming no CloudFormation template changes.
  • Manual validation: Tested with CDK_DOCKER=finch to verify alternative container runtime support works correctly.
  • Regression testing: Full test suite shows 15,874/15,883 tests passing (6 unrelated Docker daemon failures).

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team August 27, 2025 22:18
@pahud pahud changed the title fix(aws-ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable Aug 27, 2025
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Aug 27, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 27, 2025
@pahud pahud marked this pull request as ready for review August 27, 2025 22:19
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.

(This review is outdated)

@leonmk-aws leonmk-aws self-assigned this Sep 8, 2025
@leonmk-aws leonmk-aws added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Sep 8, 2025
@leonmk-aws leonmk-aws changed the title fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable Sep 8, 2025
@github-actions github-actions bot added effort/small Small work item – less than a day of effort and removed effort/medium Medium work item – several days of effort labels Sep 8, 2025
@leonmk-aws leonmk-aws changed the title fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable Sep 8, 2025
@leonmk-aws leonmk-aws changed the title fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable fix(ecr-assets): TarballImageAsset respects CDK_DOCKER environment variable Sep 8, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 8, 2025 08:39

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 8, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 8, 2025
@mergify
Copy link
Contributor

mergify bot commented Sep 8, 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 Sep 8, 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.

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.

@leonmk-aws
Copy link
Contributor

@Mergifyio requeue

@mergify
Copy link
Contributor

mergify bot commented Sep 8, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify
Copy link
Contributor

mergify bot commented Sep 8, 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.

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.

@leonmk-aws leonmk-aws force-pushed the fix-35336-tarball-asset-cdk-docker branch from 6a828e8 to 634213e Compare September 8, 2025 09:28
@mergify
Copy link
Contributor

mergify bot commented Sep 8, 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 Sep 8, 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 mergify bot merged commit 8bf6b00 into aws:main Sep 8, 2025
19 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-ecr-assets): TarballImageAsset does not use CDK_DOCKER environment variable

3 participants