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-ecr-assets): Infinite folder creation when cdk.out is not excluded #14841

Closed
AlexGue opened this issue May 23, 2021 · 2 comments · Fixed by #16034
Closed

(aws-ecr-assets): Infinite folder creation when cdk.out is not excluded #14841

AlexGue opened this issue May 23, 2021 · 2 comments · Fixed by #16034
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@AlexGue
Copy link

AlexGue commented May 23, 2021

When creating a DockerImageAsset, if you specify the project root path as the build directory, an infinite loop creating folders is started and no error is logged in the console (even with verbose activated).

Reproduction Steps

Create a DockerImageAsset specifying root path as directory.
(The Dockerfile must exist in the example-folder)

    let imageAssetFailing = new aws_ecr_assets.DockerImageAsset(this, 'image-asset-failing', {
      directory: ".",
      file: "/example-folder/Dockerfile",
    });

And execute
cdk deploy
or
cdk synth

If the cdk.out is added in the exclude glob patterns, the problem is solved:

    const imageAssetWorking = new aws_ecr_assets.DockerImageAsset(this, 'image-asset-working', {
      directory: ".",
      file: "/example-folder/Dockerfile",
      exclude: ["cdk.out"] //Node_modules can be also added.
    });

What did you expect to happen?

The dockerImageAsset should be created or an error must be returned to the user avoiding the infinite loop.

What actually happened?

The CDK deploy process doesn't log anything in the console and an infinite loop creating folders inside cdk.out is started.

image

Environment

  • CDK CLI Version : 2.0.0-rc.4 (Also tested in 1.105.0)
  • Framework Version:
  • Node.js Version: v14.16.1
  • OS : Microsoft Windows [Versión 10.0.19041.804]
  • Language (Version): Javascript | TypeScript (3.8.3)

Other

Pull request with a possible fix:
#14842


This is 🐛 Bug Report

@AlexGue AlexGue added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 23, 2021
@github-actions github-actions bot added @aws-cdk/assets Related to the @aws-cdk/assets package @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets labels May 23, 2021
@eladb eladb added the p2 label May 24, 2021
@eladb eladb removed their assignment May 24, 2021
@eladb eladb added the effort/small Small work item – less than a day of effort label May 24, 2021
@eladb
Copy link
Contributor

eladb commented May 24, 2021

@AlexGue thanks for submitting the pull request for this!

@ryparker ryparker removed the needs-triage This issue or PR still needs to be triaged. label Jun 1, 2021
@mergify mergify bot closed this as completed in #16034 Aug 15, 2021
mergify bot pushed a commit that referenced this issue Aug 15, 2021
This PR is intended to cover a small bug that creates an infinite loop generating folders in cdk.out if the project root path is specified as the build directory.

With this fix 'cdk.out' folder will be added as glob exclude pattern no matters what.

More details in issue #14841

Original PR from @AlexGue

Closes #14841
Closes #14842



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@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.

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
This PR is intended to cover a small bug that creates an infinite loop generating folders in cdk.out if the project root path is specified as the build directory.

With this fix 'cdk.out' folder will be added as glob exclude pattern no matters what.

More details in issue aws#14841

Original PR from @AlexGue

Closes aws#14841
Closes aws#14842



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Sep 6, 2021
This PR is intended to cover a small bug that creates an infinite loop generating folders in cdk.out if the project root path is specified as the build directory.

With this fix 'cdk.out' folder will be added as glob exclude pattern no matters what.

More details in issue aws#14841

Original PR from @AlexGue

Closes aws#14841
Closes aws#14842



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
david-doyle-as24 pushed a commit to david-doyle-as24/aws-cdk that referenced this issue Sep 7, 2021
This PR is intended to cover a small bug that creates an infinite loop generating folders in cdk.out if the project root path is specified as the build directory.

With this fix 'cdk.out' folder will be added as glob exclude pattern no matters what.

More details in issue aws#14841

Original PR from @AlexGue

Closes aws#14841
Closes aws#14842



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
3 participants