Skip to content

Conversation

@ono-max
Copy link
Member

@ono-max ono-max commented Nov 18, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #2550

Does this PR introduce a user-facing change?:

Fix a bug that unspecified users can approve the WAIT_APPROVAL stage

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.88%. This pull request does not change code coverage.

@nghialv
Copy link
Member

nghialv commented Nov 18, 2021

I want to ask that why it worked before and do we need to update for other application kinds too?

@ono-max
Copy link
Member Author

ono-max commented Nov 18, 2021

Because MakeInitialStageMetadata function is not called when buildProgressivePipeline function is called.

First, I would like to confirm that approvers are retrieved from the metadata and approvers are stored in MakeInitialStageMetadata.

In my case, buildProgressivePipeline function is called as follows:
https://github.com/pipe-cd/pipe/blob/master/pkg/app/piped/planner/kubernetes/kubernetes.go#L205

I noticed that MakeInitialStageMetadata function is not called then and work it.

@ono-max
Copy link
Member Author

ono-max commented Nov 18, 2021

@nghialv

do we need to update for other application kinds too?

If you are convinced with this change and the reason, I think we need to update them.

@nghialv nghialv changed the title Fix a bug that not allowed users can approve the WAIT_APPROVAL stage Fix a bug that unspecified users can approve the WAIT_APPROVAL stage Nov 18, 2021
@nghialv
Copy link
Member

nghialv commented Nov 18, 2021

Ok. I think that was the problem so let's update other kinds too.

@ono-max
Copy link
Member Author

ono-max commented Nov 18, 2021

@nghialv

Updated 👍

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.88%. This pull request does not change code coverage.

@nghialv
Copy link
Member

nghialv commented Nov 18, 2021

Nice catch!
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nghialv.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure only users which mentioned in the WAIT_APPROVAL approvers are able to approve the stage

4 participants