pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Piped starts running a queued deployment while another one of the same application is rolling back

Open nghialv opened this issue 2 years ago • 3 comments

What happened:

What you expected to happen:

How to reproduce it:

Environment:

  • piped version:
  • control-plane version:
  • Others:

nghialv avatar Jan 20 '22 08:01 nghialv

Instead of checking the planners and schedulers list to ensure that only one deployment of the sample application is executed at one time, the controller should have a list of executing deployments to check.

https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/controller/controller.go#L349 https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/controller/controller.go#L574

nghialv avatar Jan 20 '22 09:01 nghialv

/assign @Hosshii

Hosshii avatar Feb 18 '22 07:02 Hosshii

@nghialv Piped deployment is marked as completed when scheduler.Run() function is returned. Because scheduler error is ignored here, If piped failed to send deployment status to control plain, the consistency between control plain and piped is likely to be lost. To fix this, I think it should mark piped completed only when request to control plain succeeded, and retry request to control plain if it failed.

Hosshii avatar Feb 22 '22 02:02 Hosshii