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

[core] Skipping bundling on stack with -e flag #10732

Closed
quantumew opened this issue Oct 6, 2020 · 1 comment · Fixed by #10767
Closed

[core] Skipping bundling on stack with -e flag #10732

quantumew opened this issue Oct 6, 2020 · 1 comment · Fixed by #10767
Assignees
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@quantumew
Copy link
Contributor

quantumew commented Oct 6, 2020

If I run cdk deploy -e '*-whatever' and the stack that matches that pattern has assets that need bundling, they are not bundled. However if I do cdk deploy -e 'fullname-whatever', they are bundled. This -e bundling feature should support partial wildcards, right? Glad to PR if so.

Here is the line that likely needs updating https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/core/lib/asset-staging.ts#L140. It looks like it only supports a full wildcard or an exact match.

Reproduction Steps

Have a stack with assets that is named fullname-whatever

cdk deploy -e '*-whatever' <- no assets bundled
cdk deploy -e 'fullname-whatever' <- assets bundled

What did you expect to happen?

I expect any stack being built to get their assets built.

What actually happened?

Assets were not built with partial wildcard.

Environment

  • CLI Version : 1.66.0
  • Framework Version: 1.66.0
  • Node.js Version: 12.18.3
  • OS : OSX
  • Language (Version): TS 4.0.2

Other


This is 🐛 Bug Report

@quantumew quantumew added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2020
@SomayaB SomayaB changed the title aws-cdk/core - Skipping bundling on stack with -e flag [core] Skipping bundling on stack with -e flag Oct 6, 2020
@github-actions github-actions bot added the @aws-cdk/core Related to core CDK functionality label Oct 6, 2020
quantumew pushed a commit to quantumew/aws-cdk that referenced this issue Oct 7, 2020
quantumew pushed a commit to quantumew/aws-cdk that referenced this issue Oct 7, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Oct 7, 2020
@mergify mergify bot closed this as completed in #10767 Oct 8, 2020
mergify bot pushed a commit that referenced this issue Oct 8, 2020
Use `minimatch` to match stack names when deciding whether to bundle assets or not. This will ensure that when `cdk deploy -e '*-stack'` is run and there is a stack with assets named `'my-stack`, the assets are bundled.

fixes #10732

----

*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

github-actions bot commented Oct 8, 2020

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants