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 {
<ci-lint v-else :is-valid="isValid" :ci-config="ciConfigData" />
</editor-tab>
<editor-tab
v-if="glFeatures.ciConfigMergedTab"
class="gl-mb-3"
:empty-message="$options.i18n.empty.merge"
:keep-component-mounted="false"
......
......@@ -3,7 +3,6 @@
class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate!
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_branch_switcher, @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.
## View expanded configuration
> - [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.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-expanded-configuration). **(FREE SELF)**
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/301103) in GitLab 13.12.
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
......@@ -85,25 +84,6 @@ where:
[extended configuration merged into the job](../yaml/README.md#merge-details).
- 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
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', () => {
const MockTextEditor = {
template: '<div />',
};
const mockProvide = {
glFeatures: {
ciConfigMergedTab: true,
},
};
const createComponent = ({
props = {},
......@@ -43,7 +38,7 @@ describe('Pipeline editor tabs component', () => {
appStatus,
};
},
provide: { ...mockProvide, ...provide },
provide: { ...provide },
stubs: {
TextEditor: MockTextEditor,
EditorTab,
......@@ -81,26 +76,24 @@ describe('Pipeline editor tabs component', () => {
});
describe('visualization tab', () => {
describe('with feature flag on', () => {
describe('while loading', () => {
beforeEach(() => {
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
});
it('displays a loading icon if the lint query is loading', () => {
expect(findLoadingIcon().exists()).toBe(true);
expect(findPipelineGraph().exists()).toBe(false);
});
});
describe('after loading', () => {
beforeEach(() => {
createComponent();
});
it('display the tab and visualization', () => {
expect(findVisualizationTab().exists()).toBe(true);
expect(findPipelineGraph().exists()).toBe(true);
});
describe('while loading', () => {
beforeEach(() => {
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
});
it('displays a loading icon if the lint query is loading', () => {
expect(findLoadingIcon().exists()).toBe(true);
expect(findPipelineGraph().exists()).toBe(false);
});
});
describe('after loading', () => {
beforeEach(() => {
createComponent();
});
it('display the tab and visualization', () => {
expect(findVisualizationTab().exists()).toBe(true);
expect(findPipelineGraph().exists()).toBe(true);
});
});
});
......@@ -132,51 +125,39 @@ describe('Pipeline editor tabs component', () => {
});
describe('merged tab', () => {
describe('with feature flag on', () => {
describe('while loading', () => {
beforeEach(() => {
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
});
it('displays a loading icon if the lint query is loading', () => {
expect(findLoadingIcon().exists()).toBe(true);
});
describe('while loading', () => {
beforeEach(() => {
createComponent({ appStatus: EDITOR_APP_STATUS_LOADING });
});
describe('when there is a fetch error', () => {
beforeEach(() => {
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('displays a loading icon if the lint query is loading', () => {
expect(findLoadingIcon().exists()).toBe(true);
});
});
it('does not render the `meged_preview` component', () => {
expect(findMergedPreview().exists()).toBe(false);
});
describe('when there is a fetch error', () => {
beforeEach(() => {
createComponent({ appStatus: EDITOR_APP_STATUS_ERROR });
});
describe('after loading', () => {
beforeEach(() => {
createComponent();
});
it('show an error message', () => {
expect(findAlert().exists()).toBe(true);
expect(findAlert().text()).toBe(wrapper.vm.$options.errorTexts.loadMergedYaml);
});
it('display the tab and the merged preview component', () => {
expect(findMergedTab().exists()).toBe(true);
expect(findMergedPreview().exists()).toBe(true);
});
it('does not render the `merged_preview` component', () => {
expect(findMergedPreview().exists()).toBe(false);
});
});
describe('with feature flag off', () => {
describe('after loading', () => {
beforeEach(() => {
createComponent({ provide: { glFeatures: { ciConfigMergedTab: false } } });
createComponent();
});
it('does not display the merged tab', () => {
expect(findMergedTab().exists()).toBe(false);
expect(findMergedPreview().exists()).toBe(false);
it('display the tab and the merged preview component', () => {
expect(findMergedTab().exists()).toBe(true);
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