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: cdk.json "qualifier" ignored #28249

Closed
thoward-godaddy opened this issue Dec 4, 2023 · 7 comments · Fixed by #31410
Closed

core: cdk.json "qualifier" ignored #28249

thoward-godaddy opened this issue Dec 4, 2023 · 7 comments · Fixed by #31410
Assignees
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. effort/medium Medium work item – several days of effort needs-review p1 package/tools Related to AWS CDK Tools or CLI

Comments

@thoward-godaddy
Copy link

thoward-godaddy commented Dec 4, 2023

Describe the bug

Setting qualifier attribute in cdk.json appears to not have any impact on running cdk bootstrap as it continues to use the default qualifier.

Expected Behavior

Setting the qualifier attribute in cdk.json should behave the same as running cdk bootstrap --qualifier <QUALIFIER_VALUE>.

Current Behavior

Running cdk bootstrap does not inherit the qualifier value stored in cdk.json

Reproduction Steps

Add a qualifier value to cdk.json:

{
  "app": "npx ts-node --prefer-ts-exts bin/app.ts",
  "versionReporting": false,
  "watch": {
    "include": [
      "**"
    ],
    "exclude": [
      "README.md",
      "cdk*.json",
      "**/*.d.ts",
      "**/*.js",
      "tsconfig.json",
      "package*.json",
      "yarn.lock",
      "node_modules",
      "test"
    ]
  },
  "context": {
    "@aws-cdk/core:bootstrapQualifier": "sample-app",
    "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
    "@aws-cdk/core:stackRelativeExports": true,
    "@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
    "@aws-cdk/aws-lambda:recognizeVersionProps": true,
    "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
    "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
    "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
    "@aws-cdk/aws-iam:minimizePolicies": true,
    "@aws-cdk/core:target-partitions": [
      "aws",
      "aws-cn"
    ],
    "@aws-cdk/core:newStyleStackSynthesis": true
  },
  "qualifier": "sample-app",
  "toolkitStackName": "sample-app-cdk-toolkit"
}

Run cdk bootstrap and observe resources being created using the default qualifier.

Possible Solution

Unkown, I'd assume the CLI should plug in the qualifier value from cdk.json if not explicitly provided as an option to the command.

Additional Information/Context

No response

CDK CLI Version

2.113.0 (build ccd534a)

Framework Version

No response

Node.js Version

v20.9.0

OS

OSX 13.6 (22G120)

Language

TypeScript

Language Version

No response

Other information

No response

@thoward-godaddy thoward-godaddy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 4, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Dec 4, 2023
Copy link

github-actions bot commented Dec 4, 2023

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

@pahud
Copy link
Contributor

pahud commented Dec 5, 2023

Did you mean cdk bootstrap --qualifier <QUALIFIER_VALUE> works but it just ignores the pre-defined value in cdk.json?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Dec 5, 2023
@pahud pahud changed the title (aws-cdk): (cdk.json "qualifier" ignored) core: cdk.json "qualifier" ignored Dec 5, 2023
@pahud pahud added the @aws-cdk/core Related to core CDK functionality label Dec 5, 2023
Copy link

github-actions bot commented Dec 7, 2023

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Dec 7, 2023
@thoward-godaddy
Copy link
Author

Did you mean cdk bootstrap --qualifier <QUALIFIER_VALUE> works but it just ignores the pre-defined value in cdk.json?

Yeah, I'd expect it to use the value in cdk.json if the --qualifier option is not provided to the command.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Dec 8, 2023
@taabrcr
Copy link

taabrcr commented Feb 9, 2024

When doing a cdk synth or cdk deploy using the cdk version "2.123.0 (build a594112)", this is being ignored and breaks our deployments:

"context": {
"@aws-cdk/core:bootstrapQualifier": "myqualifier",
}

Please fix this problem.

Copy link

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.

1 similar comment
Copy link

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 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/core Related to core CDK functionality bug This issue is a bug. effort/medium Medium work item – several days of effort needs-review p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants