Skip to content

Conversation

@gasolima
Copy link
Contributor

@gasolima gasolima commented Dec 23, 2025

Issue # (if applicable)

Closes #.

Reason for this change

MathExpression class has multiple props that needs to be alphanumeric, that check for this is already there, but the problem is the checker doesn't check first if it's token or not. so for any tokens it always throw an error since it has $ even if the resolve of this token is alphanumeric string.

Description of changes

I'm checking if it's token or not, and if it's i'm passing the alphanumeric checker, since in this case u can't check it.

Describe any new or updated permissions being added

Description of how you validated changes

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 December 23, 2025 18:09
@github-actions github-actions bot added the p2 label Dec 23, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 23, 2025
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)

@gasolima gasolima marked this pull request as ready for review December 23, 2025 19:35
@gasolima gasolima added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Dec 24, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 24, 2025 11:22

✅ 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 Dec 24, 2025
});
console.log({ resources: JSON.stringify(Template.fromStack(stack).findResources('AWS::CloudWatch::Alarm'), null, 2) });

Template.fromStack(stack).hasResourceProperties('AWS::CloudWatch::Alarm', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick question : Does the Lazy variable already resolve on cdk synth ? (This test is checking cdk synth generated templates)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tokens resolve at deploy time => We should add a test to cover these conditions i.e the template should have the values in [Token* format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the Lazy variable already resolve on cdk synth ? (This test is checking cdk synth generated templates)

It does

Tokens resolve at deploy time => We should add a test to cover these conditions i.e the template should have the values in [Token* format

The code add for checking if it's token or not happening before the synth time, so for the checking part it doesn't make difference if it's going to resolve in synth time or deploy time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For checking part it doesnot BUT we are checking for the value token here which will not be correct if I use tokens that resolve at deploy time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the checks run before the resolve so this test fails, if i removed the fix implementation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the deploy and synth time resolution both will be caught here, adding extra checks doesnot make sense as synth time resolution will always be checked in the condition added above

@gasolima gasolima force-pushed the fix-validation-error branch from 106aafd to b888210 Compare December 31, 2025 12:16
@mergify
Copy link
Contributor

mergify bot commented Dec 31, 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 2845d47 into main Dec 31, 2025
22 of 23 checks passed
@mergify mergify bot deleted the fix-validation-error branch December 31, 2025 13:13
@mergify
Copy link
Contributor

mergify bot commented Dec 31, 2025

Merge Queue Status

✅ The pull request has been merged at b888210

This pull request spent 5 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge

@github-actions
Copy link
Contributor

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 Dec 31, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. 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.

3 participants