Skip to content

Adds a global status to the pipeline editor section

Frédéric Caplette requested to merge pipeline-editor-global-state into master

What does this MR do?

Adds a global status into apollo cache to access it anywhere in the app. The idea is to tie it in the ciConfigStatus data which from the API side can either be VALID or INVALID. We add our own states based on certain client-side condition so we can handle generic use cases. It can only be one of the following value at any time:

  • EMPTY => The editor has nothing in it
  • ERROR => The lint query errored out and we can't allow any functionality
  • LOADING => We are trying to see what the status is
  • INVALID => We got the data back, but it's not a working Ci config
  • VALID => We got the data back and it works perfectly 🎉

This allow us to subscribe child components to this status and ensure that the entire app stays in sync.

Screenshots (strongly suggested)

No visual changes

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • 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
Edited by Frédéric Caplette

Merge request reports