Skip to content

Remove misleading configuration error message in Pipeline Editor

What does this MR do and why?

Some code was added for when response.data.project.pipeline is undefined, where we would show the message: No pipeline was triggered for the latest changes due to the current CI/CD configuration.

However, this is optimistic information because there could be a lot of reason for us not getting that data yet. Probably, the pipeline is getting created and so we aren't getting it back from the commit mutation. Then we poll but while we do, the message is not accurate because we cannot guarantee that the pipeline missing is a result of the configuration or because it's still loading.

I saw that this MR introduced the new message. I think there was some confusion in this discussion because the infinite loop was not caused by invalid configuration (at least not all the time). In the code, we just assume that if there is no pipeline, it must mean there is an invalid configuration but as explained above, that is not the case.

There is a high chance that what actually fixed the polling is the refactor of the etag cache update. We weren't updating the apollo cache with correct etag value after a commit, so we would never retrieve the status of a pipeline (which makes total sense!). I tried to remove the fix locally, and we get an infinite loading like we used to, which mean that indeed, the bug was fixed by the refactor and not the MR that introduced the message.

This MR therefore removes the error message for configuration because it doesn't actually reflect the state of the pipeline. In a follow-up issue, we'll add that capability by adding some kind of information on the API that would tell us that the configuration did not trigger a pipeline. #347373

Screenshots or screen recordings

Before After
Screen_Recording_2021-12-07_at_3.34.54_PM Screen_Recording_2021-12-07_at_3.33.58_PM

How to set up and validate locally

  1. Make sure to have local runners available
  2. Go to CI/CD editor
  3. Commit new changes
  4. Notice that the pipeline status loads and then shows the newly created pipeline

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346354 (closed)

Edited by Frédéric Caplette

Merge request reports