-
Notifications
You must be signed in to change notification settings - Fork 4k
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(pipelines): room for extra sequential intermediary actions in CdkStage addApplication() #11376
feat(pipelines): room for extra sequential intermediary actions in CdkStage addApplication() #11376
Conversation
…kStage addApplication() Currently there is no way of reordering stages/actions once they are created. Getting to the Prepare and Execute change set actions while adding an application stage, we identified a use case within our company that needs one or more intermediary sequential actions before actually executing the change set. To resolve the problem, I suggest extending the AddStageOptions interface with an optional property representing the number of intermediary actions you need room for. Closes aws#11333
Can you provide a sample code on how you would use this in reality? I am struggling with the name a little bit. |
@hoegertn sure, please find it below const cdkStage: cdkpipelines.CdkStage = this.cdkPipelineInstance().addStage(appStage.stageName);
cdkStage.addApplication(appStage, {
manualApprovals: true,
roomForIntermediaryActions: 1,
});
cdkStage.addActions(this.createOpenSNowChangeRequestAction(runOrder: 3); The main idea is the need for the following actions in a sequential order:
|
* | ||
* @default 0 | ||
*/ | ||
readonly roomForIntermediaryActions?: number; |
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.
I'm also not too happy with the name, but I'm struggling to come up with a better one.
How about:
prepareExecuteDistance
runOrderSpace
runOrderDistance
extraRunOrderSpace
// leaning most towards thisrunOrderIncrement
(default: 1, cannot be <1)
Also, can add to the comment block why you might want to use this? Something like: You can use this to make extra room in the runOrder sequence between the changeset 'prepare' and 'execute' actions and insert your own actions there
.
Heads up: this API is going to change in the somewhat near future, because I'm very unhappy that users are being forced to deal with runOrders
at all. We don't know what the final form will be though.
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.
Happy to change it and I agree extraRunOrderSpace
better illustrates the intention of this work
…kStage addApplication() naming changes as per reviewer recommendation Closes aws#11333
Pull request has been modified.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Currently there is no way of reordering stages/actions once they are created. Getting to the Prepare and Execute change set actions while adding an application stage, we identified a use case within our company that needs one or more intermediary sequential actions before actually executing the change set. Moreover, I can imagine there can be plenty of use cases with similar requirements of having certain actions to fulfil between the Prepare and actual Execution of the Change Sets.
To resolve the problem, I suggest extending the AddStageOptions interface with an optional property representing the number of intermediary actions you need room for.
Closes #11333
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license