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

feat(cdk): cdk diff --quiet suppresses progress messages #26652

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

MatasNed
Copy link
Contributor

@MatasNed MatasNed commented Aug 7, 2023

Hello maintainers

This is my first PR, so all feedback is welcome. This change adds support for the --quiet flag within cdk diff command, for users that would not like the following messages 'Stack ' and 'There were no differences' to be silenced for stacks which do not have any identified differences. The request was made by @nomike in the #26526, I simply followed the very well detailed description.

The change follows similar structure to existing command and how they are passed, I have also added to the README as per the contributing guidelines.

Before submitting I have.

  • Built the packages & linted them
  • Ran unit tests for the entire module
  • Ran all integration tests in the suite from @aws-cdk-testing/cli-integ/bin/run-suite -a cli-integ-tests
  • E2E tested by launching my small stack in account and executing diffs on it from my build.

Closes #26526


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

@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. p1 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Aug 7, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 7, 2023 08:54
@MatasNed MatasNed changed the title feat(aws-cdk): adding quiet mode to cdk diff command (#26526) feat(aws-cdk): adding quiet mode to cdk diff command Aug 7, 2023
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.

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 7, 2023
@MatasNed MatasNed changed the title feat(aws-cdk): adding quiet mode to cdk diff command feat(cdk): adding quiet mode to cdk diff command Aug 7, 2023
@MatasNed
Copy link
Contributor Author

MatasNed commented Aug 7, 2023

Clarification Request the aws-cdk CLI does not seem to mention or run snapshot tests as the configuration of the tests are different for the CLI. Reference to README

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Aug 7, 2023
Adds support for the --quiet flag within cdk diff command, for users that would not like the following messages 'Stack <name>' and 'There were no differences' to be silenced for stacks which have identified differences
@MatasNed MatasNed marked this pull request as draft August 7, 2023 09:22
@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. and removed pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels Aug 8, 2023
@MatasNed MatasNed marked this pull request as ready for review August 8, 2023 19:19
@rix0rrr rix0rrr added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Aug 10, 2023
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Thanks for this! Looks well-done!

@rix0rrr rix0rrr changed the title feat(cdk): adding quiet mode to cdk diff command feat(cdk): cdk diff --quiet only prints differences Aug 10, 2023
@rix0rrr rix0rrr changed the title feat(cdk): cdk diff --quiet only prints differences feat(cdk): cdk diff --quiet prints nothing on no difference Aug 10, 2023
@rix0rrr rix0rrr changed the title feat(cdk): cdk diff --quiet prints nothing on no difference feat(cdk): cdk diff --quiet suppresses diff fluff Aug 10, 2023
@rix0rrr rix0rrr added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Aug 10, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review August 10, 2023 12:39

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

@aws-cdk-automation aws-cdk-automation removed the pr/needs-cli-test-run This PR needs CLI tests run against it. label Aug 10, 2023
@rix0rrr rix0rrr changed the title feat(cdk): cdk diff --quiet suppresses diff fluff feat(cdk): cdk diff --quiet suppresses progress messages Aug 10, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2023

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: df75727
  • 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 5777c88 into aws:main Aug 10, 2023
1 of 2 checks passed
@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested 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.

CLI: Add an option for not showing diffs for stacks with no changes
3 participants