Skip to content
Snippets Groups Projects

Fix schema registration in the pipeline editor

Merged Mireya Andres requested to merge fix-missing-ci-schema into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Denys Mishunov approved this merge request

    approved this merge request

    • Resolved by Frédéric Caplette

      @mgandres thanks a lot for accepting my suggestion and updating the tests. I have only one non-blocking nitpick for your consideration. Otherwise I'm happy to approve. To make sure we do things transparently and effectively, I would like to ask @f_caplette to maintainerize this MR to make sure it doesn't overlook anything important. Fred, I see you're busy though, so please feel free to re-assign if you won't have time for this :thumbsup:

  • Denys Mishunov requested review from @f_caplette

    requested review from @f_caplette

  • :wave: @dmishunov, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Mireya Andres added 194 commits

    added 194 commits

    Compare with previous version

  • Frédéric Caplette
  • Frédéric Caplette approved this merge request

    approved this merge request

  • Frédéric Caplette resolved all threads

    resolved all threads

  • Frédéric Caplette enabled an automatic merge when the pipeline for 39e13cf1 succeeds

    enabled an automatic merge when the pipeline for 39e13cf1 succeeds

  • mentioned in commit 673cc37f

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • mentioned in issue #341419 (closed)

  • Please register or sign in to reply
    Loading