Fix schema registration in the pipeline editor
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 |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the
schema_linting
feature flag. (rails c
thenFeature.enable(:schema_linting)
) - Go to the Pipeline Editor (CI/CD > Editor)
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %14.7
added devopsverify frontend grouppipeline authoring sectionops typebug labels
assigned to @mgandres
1 Warning This merge request changed undocumented Vue components in
vue_shared/
. Please consider creating Stories for these components:app/assets/javascripts/vue_shared/components/source_editor.vue
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer frontend Robert Hunt ( @rob.hunt
) (UTC+0, 8 hours behind@mgandres
)Nicolò Maria Mezzopera ( @nmezzopera
) (UTC+1, 7 hours behind@mgandres
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermarked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
mentioned in issue #347101 (closed)
- Resolved by Frédéric Caplette
Hi @dmishunov!
I'm not well-versed in editor knowledge, but I've created a fix here to address the issue where the pipeline editor fails to register the CI schema and I'd like someone from ~"group::editor" to review this first to see if it's okay. Could you take a look at this MR?
requested review from @dmishunov
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 6c79b619 and 1d223d65
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.66 MB 3.66 MB - 0.0 % mainChunk 2.28 MB 2.28 MB - 0.0 % Significant Growth: 1Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.projects.security.dast_profiles 1.12 MB 1.16 MB +34.91 KB 3.0 %
Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.
Please consider pinging someone from the FE Foundations (
@dmishunov
,@justin_ho
,@mikegreiling
or@nmezzopera
) for review, if you are unsure about the size increase.Note: We do not have exact data for 6c79b619. So we have used data from: 082d4c27.
The intended commit has no webpack pipeline, so we chose the last commit with one before it.Please look at the full report for more details
Read more about how this report works.
Generated by
DangerAllure report
allure-report-publisher
generated test report for 1d223d65!review-qa-reliable:
test report
review-qa-smoke: test report- Resolved by Frédéric Caplette
Just a heads up, @mgandres: this takes a bit more time than anticipated. The reason is: I'm not convinced we should be introducing a new event here. I'm taking a closer look at the issue and possible solutions and will get back to you at beginning of the next week. Moreover, there might be an opportunity for a slight improvement of the pipeline editor's architecture that will fix the issue in a more consistent and holistic manner.
added 332 commits
-
292102f4...737ecf8b - 331 commits from branch
master
- 5b87f1d0 - Fix schema registration in the pipeline editor
-
292102f4...737ecf8b - 331 commits from branch
@nadia_sotnikova this should fix the bug with the autocomplete on the pipeline editor, if you want to take a look!
added 412 commits
-
5b87f1d0...84156e22 - 411 commits from branch
master
- 5cbb90ab - Fix schema registration in the pipeline editor
-
5b87f1d0...84156e22 - 411 commits from branch
- Resolved by Mireya Andres
- 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
requested review from @f_caplette
@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:
added 194 commits
-
5cbb90ab...39b7314a - 192 commits from branch
master
- 788ade7c - Fix schema registration in the pipeline editor
- 1d223d65 - Clarify mock for editor instance detail
-
5cbb90ab...39b7314a - 192 commits from branch
- Resolved by Frédéric Caplette
enabled an automatic merge when the pipeline for 39e13cf1 succeeds
mentioned in commit 673cc37f
added workflowstaging-canary label
added workflowstaging label and removed workflowstaging-canary label
added workflowcanary label and removed workflowstaging label
mentioned in issue gl-retrospectives/verify-stage/pipeline-authoring#17 (closed)
added workflowproduction label and removed workflowcanary label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!562 (merged)
mentioned in issue #341419 (closed)