Skip to content

Add FF for graphQL variables in settings

Frédéric Caplette requested to merge 364375-add-ff-for-graphql-variables into master

What does this MR do and why?

Adds the basic skeleton for the variables settings that we want to migrate to graphQL. The diff looks bigger than it is because we are duplicating files. Tests will be introduced when the GraphQL app can actually render things 😬 You'll note that most of this MR consists of:

  1. Add FF in the controller and in index.js
  2. In index.js, add a new mounting method for creating the component with apollo and provide static values instead of passing them to the VueX store
  3. Copy files that will need to be re-written for apollo
  4. Prefix file with legacy_ to make it clear that these will eventually be deleted
  5. Remove the components from the new apollo root component. They will be added once sub-components are working with apollo in a following MR

This is behind a ff, ci_variable_settings_graphql

Screenshots or screen recordings

With FF off With FF on
Screen_Shot_2022-06-06_at_2.31.14_PM Screen_Shot_2022-06-06_at_2.30.17_PM

How to set up and validate locally

  1. Navigate to Settings => CI/CD
  2. Expand the variables section
  3. Add variables
  4. Edit them
  5. Remove them
  6. Notice that all functionality still works as intended
  7. Open the rails console rails c
  8. enable the feature flag `Feature.enable(:variable_settings_graphql)
  9. Navigate to Settings => CI/CD
  10. Expand the variable section
  11. Notice the Add button is missing (yay!)

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 #364375 (closed)

Edited by Frédéric Caplette

Merge request reports