Skip to content

refactor(toolkit-lib): remove requireApproval option from diff #372

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

Merged
merged 15 commits into from
Apr 24, 2025

Conversation

kaizencc
Copy link
Contributor

@kaizencc kaizencc commented Apr 15, 2025

requireApproval is deprecated and has been moved to the CliIoHost. this PR removes the last place where requireApproval was necessary in tmp-toolkit-helpers, in formatSecurityDiff. formatSecurityDiff now makes no decisions on what to print; it returns the diff and a permissionChangeType for the IoHost to interpret. this is a slight behavior change, so all consumers of formatSecurityDiff have been updated accordingly (deployanddiffintoolkit-lib` and in the CLI).

requireApproval is now a vestigial structure only in use in the CLI.


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 the p2 label Apr 15, 2025
@kaizencc kaizencc changed the title refactor: remove requireapproval option from diff refactor(toolkit-lib): remove requireapproval option from diff Apr 15, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team April 15, 2025 20:50
@kaizencc kaizencc changed the title refactor(toolkit-lib): remove requireapproval option from diff refactor(toolkit-lib): remove requireApproval option from diff Apr 15, 2025
@kaizencc kaizencc self-assigned this Apr 15, 2025
@kaizencc kaizencc marked this pull request as ready for review April 21, 2025 19:27
@@ -265,59 +260,4 @@ describe('formatSecurityDiff', () => {
'(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)',
);
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these tests don't make sense now that tmp-toolkit-helpers does not deal with approval levels at all

import { deserializeStructure, formatErrorMessage } from '../../../private/util';

export function makeTemplateInfos(
export function prepareDiff(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixing an oversight from before

@kaizencc kaizencc added this pull request to the merge queue Apr 24, 2025
Merged via the queue into main with commit 86997d8 Apr 24, 2025
20 checks passed
@kaizencc kaizencc deleted the conroy/removerequireapproval branch April 24, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants