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

chore(ssm): update simple name description and documentation #30653

Merged
merged 7 commits into from
Jun 26, 2024

Conversation

GavinZZ
Copy link
Contributor

@GavinZZ GavinZZ commented Jun 24, 2024

Issue # (if applicable)

Closes #28778.

Reason for this change

There are issues with SSM StringParameter where the parameter ARN would have missing / or duplicate / depending on the setup of simpleName with unresolved tokens in the parameter name.

Description of changes

Update README and docstring to explain to users when and how to correctly use simpleName parameter.

Description of how you validated changes

No code changes made.

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 June 24, 2024 22:16
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Jun 24, 2024
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 24, 2024
@GavinZZ
Copy link
Contributor Author

GavinZZ commented Jun 24, 2024

Ideally it would be nice to throw a warning at synthesize time, but that's not possible because this issue only happens with unresolved tokens in parameter name. We can't determine whether the unresolved token contains / or not until later stage in the app life cycle. Thus, updating the docstring and README.

@GavinZZ GavinZZ marked this pull request as ready for review June 24, 2024 23:54
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jun 25, 2024
Copy link
Contributor

@paulhcsun paulhcsun left a comment

Choose a reason for hiding this comment

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

Just a few minor changes. Is there any validation present that checks if the simpleName boolean value is appropriate for the given parameterName? If not should we add some to enforce it or are there cases where we want to allow it?

packages/aws-cdk-lib/aws-ssm/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-ssm/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-ssm/README.md Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-ssm/lib/parameter.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-ssm/lib/parameter.ts Outdated Show resolved Hide resolved
@GavinZZ
Copy link
Contributor Author

GavinZZ commented Jun 26, 2024

Just a few minor changes. Is there any validation present that checks if the simpleName boolean value is appropriate for the given parameterName? If not should we add some to enforce it or are there cases where we want to allow it?

There're codes to verify is simpleName is appropriate to use. If not will raise exceptions. But this is to handle the case of unresolved token so we can't do much verifications.

@paulhcsun
Copy link
Contributor

Ideally it would be nice to throw a warning at synthesize time, but that's not possible because this issue only happens with unresolved tokens in parameter name. We can't determine whether the unresolved token contains / or not until later stage in the app life cycle. Thus, updating the docstring and README.

Ohh gotcha, ok that should be fine then.

@paulhcsun
Copy link
Contributor

@merigyfio update

@GavinZZ
Copy link
Contributor Author

GavinZZ commented Jun 26, 2024

@mergify update

Copy link
Contributor

mergify bot commented Jun 26, 2024

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Jun 26, 2024

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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: ce6ec7b
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 0247013 into main Jun 26, 2024
12 checks passed
Copy link
Contributor

mergify bot commented Jun 26, 2024

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 deleted the ssm_simple_name branch June 26, 2024 22:13
This was referenced Jul 1, 2024
@aws-cdk-automation
Copy link
Collaborator

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.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
3 participants