fix(toolkit-lib): remove deprecated DeployOptions.force in favor of more specific options#315
Merged
aws-cdk-automation merged 1 commit intomainfrom Apr 3, 2025
Merged
Conversation
mrgrain
commented
Apr 3, 2025
| * Remove the asset publishing and building from the work graph for assets that are already in place | ||
| */ | ||
| export async function removePublishedAssets(graph: WorkGraph, deployments: Deployments, options: DeployOptions) { | ||
| export async function removePublishedAssetsFromWorkGraph(graph: WorkGraph, deployments: Deployments, options: DeployOptions) { |
Contributor
Author
There was a problem hiding this comment.
This name just confused me. The function does not actually remove the assets, it just removes the upload job from the work graph.
… multiple more specific options - Rename `force` option to more descriptive `forceDeployment` for clarity - Add new `forceAssetPublishing` option to control asset publishing separately - Add `orphanFailedResourcesDuringRollback` option for better rollback control - Rename `removePublishedAssets` to `removePublishedAssetsFromWorkGraph` for clarity - Update tests and implementation to use the new parameter names - Improve documentation for deployment options BREAKING CHANGE: The deprecated `force` option on `DeployOptions` has been removed. The removed option originally caused multiple different "force" actions. Each action now has a more targeted alternative. To force a deployment even if the CDK Toolkit has not detected any changes, use `forceDeployment`. To force re-publishing of previously published assets, use `forceAssetPublishing`. To force failing resource being orphaned during a rollback, use `orphanFailedResourcesDuringRollback`. To implement interactive confirmation of rollbacks during a deployment, react to the message request with code `CDK_TOOLKIT_I5050` in your `IoHost`.
019afa8 to
c7d34a4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #315 +/- ##
==========================================
- Coverage 85.58% 85.57% -0.02%
==========================================
Files 223 223
Lines 37002 36989 -13
Branches 4493 4469 -24
==========================================
- Hits 31668 31652 -16
- Misses 5233 5239 +6
+ Partials 101 98 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
force in DeployOptions in favor of more specific alternativesDeployOptions.force in favor of more specific options
rix0rrr
approved these changes
Apr 3, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
forceoption to more descriptiveforceDeploymentfor clarityforceAssetPublishingoption to control asset publishing separatelyorphanFailedResourcesDuringRollbackoption for better rollback controlremovePublishedAssetstoremovePublishedAssetsFromWorkGraphfor clarityBREAKING CHANGE: The deprecated
forceoption onDeployOptionshas been removed. The removed option originally caused multiple different "force" actions. Each action now has a more targeted alternative. To force a deployment even if the CDK Toolkit has not detected any changes, useforceDeployment. To force re-publishing of previously published assets, useforceAssetPublishing. To force failing resource being orphaned during a rollback, useorphanFailedResourcesDuringRollback. To implement interactive confirmation of rollbacks during a deployment, react to the message request with codeCDK_TOOLKIT_I5050in yourIoHost.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license