Pipelines table does not always update after canceling a pipeline

Sometimes the visual feedback after canceling a pipeline is not immediately the correct one, sometimes it takes 2 requests to the server to bring the correct one.

Steps:

  • Pipeline is running
  • I cancel it
  • request is received successfully

2 scenarios happen:

1:

the next polling request returns the pipeline still running but not cancelable anymore. (the cancelable flag is false, but the status is running)

2:

the first request we receive is still not up-to-date, so it takes a while to update visually - 2 requests are needed. I think the reason for this is the request started before or on the same time the user clicked cancel (because of the pooling)

For scenario 2 the Frontend could try to prevent it:

Currently, after the user clicks cancel, FE verifies if a polling request is still being made, ie, response was not yet received. If it is we do not request another. If it isn't we fetch the endpoint to show new data.

We could always request the endpoint. Problem is we will have 2 endpoints fetching the same data and no guarantee the 2nd one made will arrive after. (Not a fan of this solution)

ccing @brycepj as I think you have a MR open to try to fix this from the FE side.

I do think this is a gitlab-ce24926493 problem, not a gitlab-ce3412464 one.

cc @grzesiek @ayufan

Assignee Loading
Time tracking Loading