Skip to content

Replace writeQuery calls in pipeline_editor app with client mutations

What does this MR do and why?

This is the first part of #333626 (closed) to remove all instances of using writeQuery from the PA section. This MR removes all of the instances in pipeline_editor_app. To do so 2 changes were made:

  1. isNewCiConfigFile property is now no longer written to cache at all! Why? Because we only want to read from mit all the way down the component tree. The source of truth is always pipeline_editor_app and so having this in cache is largely overkill. We instead pass it down as props to the commit form. We already had 2 instances where we passed it down as props instead of reading from cache, so the transition made sense.
  2. appStatus is now written to cache with a local mutation 🎉

On top of these, some specs needed to change to accommodate the changes. It also revealed a weird issue with the template spec which is now resolved.

Screenshots or screen recordings

No visual changes

How to set up and validate locally

  1. Go to the Pipeline Editor (CI/CD => Editor)
  2. Use the section
  3. Everything still works

MR acceptance checklist

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

Edited by Frédéric Caplette

Merge request reports