Skip to content

chore: add option unacknowledged to cdk notices#31250

Merged
mergify[bot] merged 13 commits intoaws:mainfrom
awslukeguan:gprnotices00
Sep 4, 2024
Merged

chore: add option unacknowledged to cdk notices#31250
mergify[bot] merged 13 commits intoaws:mainfrom
awslukeguan:gprnotices00

Conversation

@awslukeguan
Copy link
Copy Markdown
Contributor

@awslukeguan awslukeguan commented Aug 29, 2024

Issue # (if applicable)

Closes #23078

Reason for this change

cdk notices will show all the notices the cdk version is affected by.
The additional command cdk notices --unacknowledged will show the notices the customer hasn't acknowledge with cdk acknowledge <NUMBER>.

The output will display the number of unacknowledged notices, with the following line as the last statement:
There are <NUMBER> unacknowledged notice(s).
Customer or automation tools can use this command to filter for the number of unacknowledged notices.

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 August 29, 2024 14:32
@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK labels Aug 29, 2024
Copy link
Copy Markdown
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.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation added the pr/needs-cli-test-run This PR needs CLI tests run against it. label Aug 29, 2024
const version = await fixture.cdk(['version'], { verbose: false });
const noticesUnread = await fixture.cdk(['notices', '--unread'], { verbose: false });
// regex greaterThan 2.154.1 but not including 3.x.x
const regexVersionGreaterThan = /^2\.(154\.[2-9]|154\.1\d{1,}|15[5-9]{1}\.|1[6-9].{1,}|[2-9]\d{2}\.)/;
Copy link
Copy Markdown
Contributor

@comcalvi comcalvi Aug 29, 2024

Choose a reason for hiding this comment

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

This sort of regex is ripe for bugs. It's long and there's no way I'm checking its validity.

Why are we making this test version-specific? It shouldn't be, if you need special notices data, the CLI test should mock the needed calls.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Drop the -only maybe? Seems redundant.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mrgrain thoughts on naming? Should it be --unacknowledged or --unread, or something else?

@awslukeguan awslukeguan changed the title chore: add option unread to notices chore: add option unacknowledged-only to cdk notices Aug 29, 2024
@awslukeguan awslukeguan changed the title chore: add option unacknowledged-only to cdk notices chore: add option unacknowledged to cdk notices Aug 29, 2024
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

@comcalvi comcalvi added pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested and removed pr/needs-cli-test-run This PR needs CLI tests run against it. labels Sep 4, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review September 4, 2024 21:23

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

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 4, 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
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7fead52
  • 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 cd58b50 into aws:main Sep 4, 2024
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 4, 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).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 4, 2024

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 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-cdk: make "cdk notices" show only unacknowledged notices

4 participants