Commit 08ff8879 authored by Frédéric Caplette's avatar Frédéric Caplette Committed by Savas Vedova

[Feature Flag] Remove merged YAML [RUN ALL RSPEC] [RUN AS-IF-FOSS]

parent 933bc278
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
<ci-lint v-else :is-valid="isValid" :ci-config="ciConfigData" /> <ci-lint v-else :is-valid="isValid" :ci-config="ciConfigData" />
</editor-tab> </editor-tab>
<editor-tab <editor-tab
v-if="glFeatures.ciConfigMergedTab"
class="gl-mb-3" class="gl-mb-3"
:empty-message="$options.i18n.empty.merge" :empty-message="$options.i18n.empty.merge"
:keep-component-mounted="false" :keep-component-mounted="false"
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
class Projects::Ci::PipelineEditorController < Projects::ApplicationController class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate! before_action :check_can_collaborate!
before_action do before_action do
push_frontend_feature_flag(:ci_config_merged_tab, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_empty_state_action, @project, default_enabled: :yaml) push_frontend_feature_flag(:pipeline_editor_empty_state_action, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_branch_switcher, @project, default_enabled: :yaml) push_frontend_feature_flag(:pipeline_editor_branch_switcher, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_drawer, @project, default_enabled: :yaml) push_frontend_feature_flag(:pipeline_editor_drawer, @project, default_enabled: :yaml)
......
---
title: Removed feature flag for Pipeline editor merged YAML tab
merge_request: 60659
author:
type: other
---
name: ci_config_merged_tab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53299
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/301103
milestone: '13.9'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -73,8 +73,7 @@ each job depends only on the previous stage being completed successfully. ...@@ -73,8 +73,7 @@ each job depends only on the previous stage being completed successfully.
## View expanded configuration ## View expanded configuration
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/246801) in GitLab 13.9. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/246801) in GitLab 13.9.
> - It is [deployed behind a feature flag](../../user/feature_flags.md), enabled by default. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/301103) in GitLab 13.12.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-expanded-configuration). **(FREE SELF)**
To view the fully expanded CI/CD configuration as one combined file, go to the To view the fully expanded CI/CD configuration as one combined file, go to the
pipeline editor's **View merged YAML** tab. This tab displays an expanded configuration pipeline editor's **View merged YAML** tab. This tab displays an expanded configuration
...@@ -85,25 +84,6 @@ where: ...@@ -85,25 +84,6 @@ where:
[extended configuration merged into the job](../yaml/README.md#merge-details). [extended configuration merged into the job](../yaml/README.md#merge-details).
- YAML anchors are [replaced with the linked configuration](../yaml/README.md#anchors). - YAML anchors are [replaced with the linked configuration](../yaml/README.md#anchors).
### Enable or disable expanded configuration **(FREE SELF)**
Expanded CI/CD configuration is under development and not ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can opt to enable it.
To disable it:
```ruby
Feature.disable(:ci_config_merged_tab)
```
To enable it:
```ruby
Feature.enable(:ci_config_merged_tab)
```
## Commit changes to CI configuration ## Commit changes to CI configuration
The commit form appears at the bottom of each tab in the editor so you can commit The commit form appears at the bottom of each tab in the editor so you can commit
......
...@@ -20,11 +20,6 @@ describe('Pipeline editor tabs component', () => { ...@@ -20,11 +20,6 @@ describe('Pipeline editor tabs component', () => {
const MockTextEditor = { const MockTextEditor = {
template: '<div />', template: '<div />',
}; };
const mockProvide = {
glFeatures: {
ciConfigMergedTab: true,
},
};
const createComponent = ({ const createComponent = ({
props = {}, props = {},
...@@ -43,7 +38,7 @@ describe('Pipeline editor tabs component', () => { ...@@ -43,7 +38,7 @@ describe('Pipeline editor tabs component', () => {
appStatus, appStatus,
}; };
}, },
provide: { ...mockProvide, ...provide }, provide: { ...provide },
stubs: { stubs: {
TextEditor: MockTextEditor, TextEditor: MockTextEditor,
EditorTab, EditorTab,
...@@ -81,26 +76,24 @@ describe('Pipeline editor tabs component', () => { ...@@ -81,26 +76,24 @@ describe('Pipeline editor tabs component', () => {
}); });
describe('visualization tab', () => { describe('visualization tab', () => {
describe('with feature flag on', () => { describe('while loading', () => {
describe('while loading', () => { beforeEach(() => {
beforeEach(() => { createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING }); });
});
it('displays a loading icon if the lint query is loading', () => {
it('displays a loading icon if the lint query is loading', () => { expect(findLoadingIcon().exists()).toBe(true);
expect(findLoadingIcon().exists()).toBe(true); expect(findPipelineGraph().exists()).toBe(false);
expect(findPipelineGraph().exists()).toBe(false); });
}); });
}); describe('after loading', () => {
describe('after loading', () => { beforeEach(() => {
beforeEach(() => { createComponent();
createComponent(); });
});
it('display the tab and visualization', () => {
it('display the tab and visualization', () => { expect(findVisualizationTab().exists()).toBe(true);
expect(findVisualizationTab().exists()).toBe(true); expect(findPipelineGraph().exists()).toBe(true);
expect(findPipelineGraph().exists()).toBe(true);
});
}); });
}); });
}); });
...@@ -132,51 +125,39 @@ describe('Pipeline editor tabs component', () => { ...@@ -132,51 +125,39 @@ describe('Pipeline editor tabs component', () => {
}); });
describe('merged tab', () => { describe('merged tab', () => {
describe('with feature flag on', () => { describe('while loading', () => {
describe('while loading', () => { beforeEach(() => {
beforeEach(() => { createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
});
it('displays a loading icon if the lint query is loading', () => {
expect(findLoadingIcon().exists()).toBe(true);
});
}); });
describe('when there is a fetch error', () => { it('displays a loading icon if the lint query is loading', () => {
beforeEach(() => { expect(findLoadingIcon().exists()).toBe(true);
createComponent({ appStatus: EDITOR_APP_STATUS_ERROR }); });
}); });
it('show an error message', () => {
expect(findAlert().exists()).toBe(true);
expect(findAlert().text()).toBe(wrapper.vm.$options.errorTexts.loadMergedYaml);
});
it('does not render the `meged_preview` component', () => { describe('when there is a fetch error', () => {
expect(findMergedPreview().exists()).toBe(false); beforeEach(() => {
}); createComponent({ appStatus: EDITOR_APP_STATUS_ERROR });
}); });
describe('after loading', () => { it('show an error message', () => {
beforeEach(() => { expect(findAlert().exists()).toBe(true);
createComponent(); expect(findAlert().text()).toBe(wrapper.vm.$options.errorTexts.loadMergedYaml);
}); });
it('display the tab and the merged preview component', () => { it('does not render the `merged_preview` component', () => {
expect(findMergedTab().exists()).toBe(true); expect(findMergedPreview().exists()).toBe(false);
expect(findMergedPreview().exists()).toBe(true);
});
}); });
}); });
describe('with feature flag off', () => {
describe('after loading', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ provide: { glFeatures: { ciConfigMergedTab: false } } }); createComponent();
}); });
it('does not display the merged tab', () => { it('display the tab and the merged preview component', () => {
expect(findMergedTab().exists()).toBe(false); expect(findMergedTab().exists()).toBe(true);
expect(findMergedPreview().exists()).toBe(false); expect(findMergedPreview().exists()).toBe(true);
}); });
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment