Skip to content

Tweak drawing algo to support same stage needs

What does this MR do?

Allow the algorithm which draws the job relationship to draw lines when 2 jobs are in the same column, which means that they are same-stage needs jobs. For example:

stages:
  - prepare
  
prepare_1:
  script: "echo hello"
  stage: "prepare"
prepare_2:
  script: "echo hello"
  stage: "prepare"
  needs: ['prepare_1']
prepare_3:
  script: "echo hello"
  stage: "prepare"
  needs: ['prepare_2']

It's known that it can look a bit convoluted, but this shape for lines solved a lot of problems and this is temporary. We plan on making the visualization look more like the new pipeline graph.

If you test this locally, it will currently not work because it's an invalid Ci config, but when the BE MR is merged, we will need to support this. This can safely be merged before the BE MR is done because if there are no pills in the same column, then it will behave as it used to. But, this has to merge before the BE MR to ensure that once their work is done, they can safely merge without breaking the FE.

For example, this is the graph working with no same stage needs:

Screen_Recording_2021-06-01_at_1.29.33_PM

Screenshots (strongly suggested)

Take note that this change can't be seen right now on master. Right now if you try to have same stage needs, you get a linter error, so there is no visualization shown, just an error message. After this change, well, you still do 😄

But! rebasing this branch on !59668 (merged) would give you this before and after for this MR.

Before this change, same column lines would look like this:

lauraStage

After the change, you can see the lines are neatly aligned on the left:

Screen_Recording_2021-05-18_at_3.30.48_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #30632 (closed)

Edited by Frédéric Caplette

Merge request reports

Loading