Skip to content

Show loading in MR pipeline widget when no pipelines

What does this MR do?

When you create a MR and Pipelines must succeed is turned on, the pipeline takes time to get created. we show an error message because there is no pipeline for this commit yet. We have no way to determine (yet) if the pipeline is currently getting processed, if there is a problem with the pipeline creation OR if you have an external CI solution and are waiting after that response.

The original message that was shown when this issue appeared was: Could not retrieve the pipeline status. For troubleshooting steps, read the documentation.

But just like the previous issue, we added a state for when no CI config was found and Pipelines must succeed was turned on. Which means that we now see: No pipeline has been run for this commit on .com. Both of these messages had the error red icon which led to thinking there was a problem with the MR pipeline, when actually we are just waiting for it to be created.

This MR implements a generic message that appears if there are no pipelines. This covers all three cases and we replaced the error icon with a loading icon.

Additional technical notes: I did some refactoring of old test files to use a better pattern. I realized after the fact that I could have made a separate MR, but right now it's baked in. I removed old js- selectors and made them data-testid and I changed the old mount helper util with vue-test-utils.

Screenshots

Before:

Screen_Shot_2020-07-02_at_2.03.50_PM

After:

Screen_Shot_2020-07-07_at_9.19.53_AM

(Video format: Creating a new MR and seeing the widget loads) Screen_Recording_2020-07-10_at_8.59.58_AM

Does this MR meet the acceptance criteria?

Conformity

Edited by Frédéric Caplette

Merge request reports