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

[pipelines] wrong position for ManualApproval action in cdkStage addApplication() #11510

Closed
adriantaut opened this issue Nov 17, 2020 · 2 comments · Fixed by #11511
Closed

[pipelines] wrong position for ManualApproval action in cdkStage addApplication() #11510

adriantaut opened this issue Nov 17, 2020 · 2 comments · Fixed by #11511
Assignees
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@adriantaut
Copy link
Contributor

adriantaut commented Nov 17, 2020

This is a quick bugfix for #11376. The desired actions order described in #11333 is not achieved when used with manualApprovals: true.

Desired order: Prepare ChangeSet -> Manual Approval -> ExtraAction -> Execute ChangeSet

However, the runOrder of the Manual Approval is 3 instead of 2, not being placed right after the Prepare action.

This is happening because the RunOrder of the Manual Approval action is decided by the executeRunOrder, which is already increased by the number of extra actions needed in that stage, instead of being decided by the runOrder of the Prepare ChangeSet action. (https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/pipelines/lib/stage.ts#L99)

Reproduction Steps

    cdkStage.addApplication(appStage, {
      manualApprovals: isProduction || requiresManualApproval,
      extraRunOrderSpace: isProduction ? 1 : 0,
    });

What did you expect to happen?

Having a stage with the following:

  • Prepare ChangeSet action (runOrder: 1)
  • Manual Approval (runOrder: 2)
  • Empty Place for extra Action (runOrder: 3)
  • Execute ChangeSet action (runOrder: 4)

What actually happened?

  • Prepare ChangeSet action (runOrder: 1)
  • Empty Place for extra Action (runOrder: 2)
  • Manual Approval (runOrder: 3)
  • Execute ChangeSet action (runOrder: 4)

Environment

  • CDK CLI Version : 1.73.0
  • Framework Version:
  • Node.js Version: v14.12.0
  • OS : MacOS
  • Language (Version): 3.7.3

Other

I will implement the bugfix since the original PR was missing this functionality.


This is 🐛 Bug Report

@adriantaut adriantaut added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2020
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Nov 17, 2020
adriantaut added a commit to adriantaut/aws-cdk that referenced this issue Nov 17, 2020
…cation()

the manual approval action should be right after the Prepare ChangeSet

Fixes aws#11510
@adriantaut
Copy link
Contributor Author

fix implemented in #11511

adriantaut added a commit to adriantaut/aws-cdk that referenced this issue Nov 17, 2020
…cation()

the manual approval action should be right after the Prepare ChangeSet

Fixes aws#11510
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 17, 2020
@mergify mergify bot closed this as completed in #11511 Nov 19, 2020
mergify bot pushed a commit that referenced this issue Nov 19, 2020
…unOrderSpace` (#11511)

The manual approval action should be right after the Prepare ChangeSet. Fixes #11510


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/pipelines CDK Pipelines library bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants