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-codepipeline-actions] Failed to use template strings #10665

Closed
gotodeploy opened this issue Oct 3, 2020 · 5 comments · Fixed by #10706
Closed

[aws-codepipeline-actions] Failed to use template strings #10665

gotodeploy opened this issue Oct 3, 2020 · 5 comments · Fixed by #10706
Assignees
Labels
@aws-cdk/aws-codepipeline-actions bug This issue is a bug. effort/small Small work item – less than a day of effort p1

Comments

@gotodeploy
Copy link
Contributor

gotodeploy commented Oct 3, 2020

Template strings below did not work. It makes unintentional destroy. Should use buckticks instead of single quotes or just this.branch.

      const branchIdDisambiguator = this.branch === 'master' ? '' : '-${this.branch}-';

c.f. #10463

Reproduction Steps

const sourceAction = new codePipelineActions.CodeCommitSourceAction({
    actionName: "CodeCommit",
    repository: repository,
    branch: "dev",  // This line
    output: output,
});

What did you expect to happen?

$ cdk diff

(omitted)

Stack codecommit-dev
There were no differences

What actually happened?

$ cdk diff

(omitted)

Resources
[-] AWS::Events::Rule codecommitdevAA3605ADdevEventRule842F00D6 destroy
[+] AWS::Events::Rule codecommit-dev/AA3605AD-${this.branch}-EventRule codecommitdevAA3605ADthisbranchEventRule42AF1F65

Environment

  • CLI Version : 1.66.0
  • Framework Version: 1.66.0
  • Node.js Version: v13.9.0
  • OS : Ubuntu 18.04
  • Language (Version): TypeScript (4.0.3)

Other


This is 🐛 Bug Report

@gotodeploy gotodeploy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 3, 2020
@skinny85 skinny85 added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 5, 2020
@skinny85
Copy link
Contributor

skinny85 commented Oct 5, 2020

Thanks for opening @geduld . Any chance of a PR fixing this? 🙂 Here's our contribution docs: https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md .

@gotodeploy
Copy link
Contributor Author

gotodeploy commented Oct 5, 2020

@skinny85 Does the PR really need to write a test to change from single quotes to backticks?

@skinny85
Copy link
Contributor

skinny85 commented Oct 5, 2020

A test would be ideal, but I'll accept a PR without it 🙂

@gotodeploy
Copy link
Contributor Author

Thank you. I'm working on it. 👍

gotodeploy pushed a commit to gotodeploy/aws-cdk that referenced this issue Oct 5, 2020
@mergify mergify bot closed this as completed in #10706 Oct 5, 2020
mergify bot pushed a commit that referenced this issue Oct 5, 2020
…eCommitSourceAction (#10706)

Use backticks instead of single quotes for template strings.

Fixes #10665

----

*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 5, 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/aws-codepipeline-actions bug This issue is a bug. effort/small Small work item – less than a day of effort p1
Projects
None yet
2 participants