-
Notifications
You must be signed in to change notification settings - Fork 35
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
134aaa8
wip remove require approval
kaizencc 98fa52a
wip
kaizencc 128ba21
Merge branch 'main' into conroy/removerequireapproval
kaizencc 0a6c2af
small changes, buidl failes
kaizencc 6d0eaa4
Merge branch 'main' into conroy/removerequireapproval
kaizencc 7dc21ca
refactor(toolkit-lib): formatSecurityDiff no longer governs requireAp…
kaizencc ddd3dee
Merge branch 'main' into conroy/removerequireapproval
kaizencc 7bbbb2a
remove test
kaizencc fbc9e43
Update packages/@aws-cdk/toolkit-lib/test/actions/diff.test.ts
kaizencc 7f2f86a
Update packages/@aws-cdk/toolkit-lib/docs/message-registry.md
kaizencc 826cf4f
imports
kaizencc af22e75
Merge branch 'main' into conroy/removerequireapproval
kaizencc 6ec5372
Merge branch 'main' into conroy/removerequireapproval
mrgrain 33ae7cd
Merge branch 'main' into conroy/removerequireapproval
mrgrain d40bc19
update integ test
kaizencc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import type { DescribeChangeSetOutput } from '@aws-cdk/cloudformation-diff'; | ||
import { fullDiff } from '@aws-cdk/cloudformation-diff'; | ||
import type * as cxapi from '@aws-cdk/cx-api'; | ||
import * as fs from 'fs-extra'; | ||
import * as uuid from 'uuid'; | ||
import type { ChangeSetDiffOptions, DiffOptions, LocalFileDiffOptions } from '..'; | ||
import { DiffMethod } from '..'; | ||
import type { Deployments, ResourcesToImport, IoHelper, SdkProvider, StackCollection, TemplateInfo } from '../../../api/shared-private'; | ||
import { ResourceMigrator, IO, removeNonImportResources, cfnApi } from '../../../api/shared-private'; | ||
import { PermissionChangeType, ToolkitError } from '../../../api/shared-public'; | ||
import { ToolkitError } from '../../../api/shared-public'; | ||
import { deserializeStructure, formatErrorMessage } from '../../../private/util'; | ||
|
||
export function makeTemplateInfos( | ||
export function prepareDiff( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixing an oversight from before |
||
ioHelper: IoHelper, | ||
stacks: StackCollection, | ||
deployments: Deployments, | ||
|
@@ -147,26 +145,6 @@ async function changeSetDiff( | |
} | ||
} | ||
|
||
/** | ||
* Return whether the diff has security-impacting changes that need confirmation. | ||
*/ | ||
export function determinePermissionType( | ||
oldTemplate: any, | ||
newTemplate: cxapi.CloudFormationStackArtifact, | ||
changeSet?: DescribeChangeSetOutput, | ||
): PermissionChangeType { | ||
// @todo return a printable version of the full diff. | ||
const diff = fullDiff(oldTemplate, newTemplate.template, changeSet); | ||
|
||
if (diff.permissionsBroadened) { | ||
return PermissionChangeType.BROADENING; | ||
} else if (diff.permissionsAnyChanges) { | ||
return PermissionChangeType.NON_BROADENING; | ||
} else { | ||
return PermissionChangeType.NONE; | ||
} | ||
} | ||
|
||
/** | ||
* Appends all properties from obj2 to obj1. | ||
* obj2 values take priority in the case of collisions. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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