Adds a global status to the pipeline editor section
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
-
📋 Does this MR need a changelog?- [-] I have included a changelog entry.
-
I have not included a changelog entry because this is not a user facing change.
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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