Skip to content

Move job app to GraphQL

Briley Sandlin requested to merge bs-graphql-job-app into master

What does this MR do and why?

Ref #361237 (closed)

We are porting some of the job app over to GraphQL in anticipation of some manual job variable work.

This MR is just a prerequisite for the upcoming feature MR. Everything should function the same.

I've added comments to the code to note where additions have been made. Everything else in the diff is just due to the directory restructure.

Changes:

  • Restructures the job app to organize into directories
  • Abstracts the sidebar header into it's own component
  • Adds in the GraphQL feature flag (graphql_job_app)
  • Adds in 2 new components, duplicating previous components and prepending them with legacy_
  • Adds in support for GraphQL into index.js
  • Updates unit tests to match the restructure

Screenshots or screen recordings

The app should look the same at this time whether the feature flag is enabled or not

Manual Variables Form Sidebar Header
manual_variables_form sidebar_header

How to set up and validate locally

  • Visit a job page which uses a manual job
  • If you need to add a manual variable, you can add this to the script in your pipeline editor:
job_name:
  script: ls
  when: manual
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH`
  • Note the behavior of the sidebar header, and the empty state with the variable form
  • Enable the feature flag Feature.enable(:graphql_job_app)
  • Note that the behavior of both features should be the same.

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 Briley Sandlin

Merge request reports

Loading