Skip to content

Conversation

@hassaku63
Copy link
Contributor

@hassaku63 hassaku63 commented Jul 1, 2025

Issue # (if applicable)

Closes #34871

Reason for this change

This feature request proposes add Annotations.addInfoV2() method to provide CDK developers the way to suppressable info message. This allows the CDK users to suppress the unnecessary info annotation message.

I propose adding addInfoV2() -- the Info-level counterpart to addWarningV2() -- which would let builders acknowledge an Info message once and prevent it from re-appearing in subsequent runs.

Description of changes

This PR adds the following new features to the Annotations class:

  1. addInfoV2 method - A method to add acknowledgeable info messages
  2. acknowledgeInfo method - A method to mark specific info messages as acknowledged

These changes follow the same pattern as the existing warning message functionality (addWarningV2/acknowledgeWarning), maintaining API consistency.

Describe any new or updated permissions being added

This PR does not add any new IAM permissions.

Description of how you validated changes

The following tests were added to validate the functionality:

  1. Tests confirming that addInfoV2 correctly adds info messages
  2. Tests verifying that acknowledgeInfo correctly marks info messages as acknowledged and they are no longer displayed

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@hassaku63 hassaku63 requested a review from a team as a code owner July 1, 2025 17:09
@aws-cdk-automation aws-cdk-automation requested a review from a team July 1, 2025 17:09
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK labels Jul 1, 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)

@hassaku63 hassaku63 marked this pull request as draft July 1, 2025 18:23
@hassaku63 hassaku63 marked this pull request as ready for review July 2, 2025 15:07
@hassaku63
Copy link
Contributor Author

Exemption request for integration test / snapshot requirement

This change only adds functionality inside the core package’s Annotations class.

  • There is currently no existing integration test file that targets Annotations
  • An integ test just to hit addInfoV2() would add boilerplate without meaningful new coverage—the unit test already verifies the method’s behavior.

Given that Annotations operates entirely within the core library and does not affect synthesized templates directly, I believe an integration test is unnecessary in this case.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Jul 2, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 2, 2025
@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Jul 17, 2025
@badmintoncryer
Copy link
Contributor

I've compared it with the existing addWarningV2 method implementation, and I think it looks good to me.

@mrgrain mrgrain added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jul 18, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review July 18, 2025 08:47

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mrgrain mrgrain changed the title feat(core): add addInfoV2 method for Annotations feat(core): addInfoV2 method for info-level Annotations Jul 18, 2025
@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Jul 18, 2025
@mrgrain mrgrain changed the title feat(core): addInfoV2 method for info-level Annotations feat(core): addInfoV2 method for suppressible info Annotations Jul 18, 2025
mrgrain
mrgrain previously approved these changes Jul 18, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jul 18, 2025
@mergify
Copy link
Contributor

mergify bot commented Jul 18, 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
Copy link
Contributor

mergify bot commented Jul 18, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mrgrain
Copy link
Contributor

mrgrain commented Jul 18, 2025

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Jul 18, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/codecov-upload.yml without workflows permission

@mergify mergify bot dismissed mrgrain’s stale review July 18, 2025 09:02

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Jul 18, 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 fb1792c into aws:main Jul 18, 2025
20 checks passed
@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 Jul 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(core): add suppresable info-level annotation message

4 participants