Skip to content

Fix schema registration in the pipeline editor

Mireya Andres requested to merge fix-missing-ci-schema into master

What does this MR do and why?

For #347101 (closed)

There is a bug where the pipeline editor fails to register the CI schema. This results in syntax highlighting and auto-complete functionality disappearing completely from the page.

The solution in this MR is to make sure that the pipeline editor is getting the editor instance correctly so it can register the schema. Denys gives a great breakdown of what's happening in this comment: !77743 (comment 805723780).

Screenshots or screen recordings

Before After
Screen_Shot_2022-01-07_at_16.21.55 Screen_Shot_2022-01-07_at_16.12.05

How to set up and validate locally

  1. Enable the schema_linting feature flag. (rails c then Feature.enable(:schema_linting))
  2. Go to the Pipeline Editor (CI/CD > Editor)
  3. Verify that syntax highlighting and autocomplete functionality is back. You should be able to hover over keywords and see annotations, like the one shown in the screenshot.

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 Mireya Andres

Merge request reports