Commit 8f71fa99 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '213092-remove-customizable-vsa-ff' into 'master'

Remove VSA feature flags

Closes #213092

See merge request gitlab-org/gitlab!31189
parents aea92e76 8a16e6a7
...@@ -18,9 +18,6 @@ spent in each stage defined in the process. ...@@ -18,9 +18,6 @@ spent in each stage defined in the process.
For information on how to contribute to the development of Value Stream Analytics, see our [contributor documentation](../../development/value_stream_analytics.md). For information on how to contribute to the development of Value Stream Analytics, see our [contributor documentation](../../development/value_stream_analytics.md).
NOTE: **Note:**
Use the `cycle_analytics` feature flag to enable at the group level.
Value Stream Analytics is useful in order to quickly determine the velocity of a given Value Stream Analytics is useful in order to quickly determine the velocity of a given
project. It points to bottlenecks in the development process, enabling management project. It points to bottlenecks in the development process, enabling management
to uncover, triage, and identify the root cause of slowdowns in the software development life cycle. to uncover, triage, and identify the root cause of slowdowns in the software development life cycle.
...@@ -33,7 +30,7 @@ calculates a separate median for each stage. ...@@ -33,7 +30,7 @@ calculates a separate median for each stage.
Value Stream Analytics is available: Value Stream Analytics is available:
- From GitLab 12.9, at the group level via **Group > Analytics > Value Stream**. **(PREMIUM)** - From GitLab 12.9, at the group level via **Group > Analytics > Value Stream**. **(PREMIUM)**
- At the project level via **Project > Value Stream Analytics**. - At the project level via **Project > Analytics > Value Stream**.
There are seven stages that are tracked as part of the Value Stream Analytics calculations. There are seven stages that are tracked as part of the Value Stream Analytics calculations.
...@@ -300,15 +297,6 @@ toggled to show data for merge requests and further refined for specific group-l ...@@ -300,15 +297,6 @@ toggled to show data for merge requests and further refined for specific group-l
By default the top group-level labels (max. 10) are pre-selected, with the ability to By default the top group-level labels (max. 10) are pre-selected, with the ability to
select up to a total of 15 labels. select up to a total of 15 labels.
### Disabling chart
This chart is enabled by default. If you have a self-managed instance, an
administrator can open a Rails console and disable it with the following command:
```ruby
Feature.disable(:tasks_by_type_chart)
```
## Permissions ## Permissions
The current permissions on the Project Value Stream Analytics dashboard are: The current permissions on the Project Value Stream Analytics dashboard are:
...@@ -331,14 +319,6 @@ For Value Stream Analytics functionality introduced in GitLab 12.3 and later: ...@@ -331,14 +319,6 @@ For Value Stream Analytics functionality introduced in GitLab 12.3 and later:
- Features are available only on - Features are available only on
[Premium or Silver tiers](https://about.gitlab.com/pricing/) and above. [Premium or Silver tiers](https://about.gitlab.com/pricing/) and above.
## Troubleshooting
If you see an error as listed in the following table, try the noted solution:
| Error | Solution |
|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| There was an error fetching the top labels. | Manually enable tasks by type feature in the [rails console](../../administration/troubleshooting/navigating_gitlab_via_rails_console.md#starting-a-rails-console-session), specifically `Feature.enable(:tasks_by_type_chart)`. |
## More resources ## More resources
Learn more about Value Stream Analytics in the following resources: Learn more about Value Stream Analytics in the following resources:
......
...@@ -86,9 +86,6 @@ export default { ...@@ -86,9 +86,6 @@ export default {
shouldRenderEmptyState() { shouldRenderEmptyState() {
return !this.selectedGroup; return !this.selectedGroup;
}, },
hasCustomizableCycleAnalytics() {
return Boolean(this.glFeatures.customizableCycleAnalytics);
},
shouldDisplayFilters() { shouldDisplayFilters() {
return this.selectedGroup && !this.errorCode; return this.selectedGroup && !this.errorCode;
}, },
...@@ -96,7 +93,7 @@ export default { ...@@ -96,7 +93,7 @@ export default {
return this.featureFlags.hasDurationChart && !this.hasNoAccessError && !this.isLoading; return this.featureFlags.hasDurationChart && !this.hasNoAccessError && !this.isLoading;
}, },
shouldDisplayTypeOfWorkCharts() { shouldDisplayTypeOfWorkCharts() {
return this.featureFlags.hasTasksByTypeChart && !this.hasNoAccessError && !this.isLoading; return !this.hasNoAccessError && !this.isLoading;
}, },
isLoadingTypeOfWork() { isLoadingTypeOfWork() {
return this.isLoadingTasksByTypeChartTopLabels || this.isLoadingTasksByTypeChart; return this.isLoadingTasksByTypeChartTopLabels || this.isLoadingTasksByTypeChart;
...@@ -120,7 +117,6 @@ export default { ...@@ -120,7 +117,6 @@ export default {
this.setFeatureFlags({ this.setFeatureFlags({
hasDurationChart: this.glFeatures.cycleAnalyticsScatterplotEnabled, hasDurationChart: this.glFeatures.cycleAnalyticsScatterplotEnabled,
hasDurationChartMedian: this.glFeatures.cycleAnalyticsScatterplotMedianEnabled, hasDurationChartMedian: this.glFeatures.cycleAnalyticsScatterplotMedianEnabled,
hasTasksByTypeChart: this.glFeatures.tasksByTypeChart,
}); });
}, },
methods: { methods: {
...@@ -281,7 +277,7 @@ export default { ...@@ -281,7 +277,7 @@ export default {
:medians="medians" :medians="medians"
:is-creating-custom-stage="isCreatingCustomStage" :is-creating-custom-stage="isCreatingCustomStage"
:custom-stage-form-active="customStageFormActive" :custom-stage-form-active="customStageFormActive"
:can-edit-stages="hasCustomizableCycleAnalytics" :can-edit-stages="true"
:custom-ordering="enableCustomOrdering" :custom-ordering="enableCustomOrdering"
@reorderStage="onStageReorder" @reorderStage="onStageReorder"
@selectStage="onStageSelect" @selectStage="onStageSelect"
......
...@@ -7,10 +7,8 @@ class Analytics::CycleAnalyticsController < Analytics::ApplicationController ...@@ -7,10 +7,8 @@ class Analytics::CycleAnalyticsController < Analytics::ApplicationController
increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show
before_action do before_action do
push_frontend_feature_flag(:customizable_cycle_analytics, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true) push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true) push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true)
push_frontend_feature_flag(:tasks_by_type_chart, default_enabled: true)
end end
before_action :load_group, only: :show before_action :load_group, only: :show
......
...@@ -9,10 +9,8 @@ class Groups::Analytics::CycleAnalyticsController < Groups::Analytics::Applicati ...@@ -9,10 +9,8 @@ class Groups::Analytics::CycleAnalyticsController < Groups::Analytics::Applicati
increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show
before_action do before_action do
push_frontend_feature_flag(:customizable_cycle_analytics, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true) push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true) push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true)
push_frontend_feature_flag(:tasks_by_type_chart, default_enabled: true)
end end
before_action :load_group, only: :show before_action :load_group, only: :show
......
---
title: Remove customizable_cycle_analytics feature flag
merge_request: 31189
author:
type: changed
...@@ -935,21 +935,5 @@ describe 'Group Value Stream Analytics', :js do ...@@ -935,21 +935,5 @@ describe 'Group Value Stream Analytics', :js do
end end
end end
end end
context 'not enabled' do
before do
stub_feature_flags(customizable_cycle_analytics: false)
select_group
end
context 'Add a stage button' do
it 'is not visible' do
expect(page).to have_selector('.js-add-stage-button', visible: false)
end
end
it_behaves_like 'manual ordering disabled'
end
end end
end end
...@@ -48,8 +48,6 @@ function createComponent({ ...@@ -48,8 +48,6 @@ function createComponent({
shallow = true, shallow = true,
withStageSelected = false, withStageSelected = false,
scatterplotEnabled = true, scatterplotEnabled = true,
tasksByTypeChartEnabled = true,
customizableCycleAnalyticsEnabled = false,
props = {}, props = {},
} = {}) { } = {}) {
const func = shallow ? shallowMount : mount; const func = shallow ? shallowMount : mount;
...@@ -68,8 +66,6 @@ function createComponent({ ...@@ -68,8 +66,6 @@ function createComponent({
provide: { provide: {
glFeatures: { glFeatures: {
cycleAnalyticsScatterplotEnabled: scatterplotEnabled, cycleAnalyticsScatterplotEnabled: scatterplotEnabled,
tasksByTypeChart: tasksByTypeChartEnabled,
customizableCycleAnalytics: customizableCycleAnalyticsEnabled,
}, },
}, },
...opts, ...opts,
...@@ -187,6 +183,10 @@ describe('Cycle Analytics component', () => { ...@@ -187,6 +183,10 @@ describe('Cycle Analytics component', () => {
displaysDurationChart(false); displaysDurationChart(false);
}); });
it('does not display the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(false);
});
describe('hideGroupDropDown = true', () => { describe('hideGroupDropDown = true', () => {
beforeEach(() => { beforeEach(() => {
mock = new MockAdapter(axios); mock = new MockAdapter(axios);
...@@ -208,7 +208,6 @@ describe('Cycle Analytics component', () => { ...@@ -208,7 +208,6 @@ describe('Cycle Analytics component', () => {
beforeEach(() => { beforeEach(() => {
wrapper = createComponent({ wrapper = createComponent({
withStageSelected: true, withStageSelected: true,
tasksByTypeChartEnabled: false,
}); });
}); });
...@@ -240,29 +239,22 @@ describe('Cycle Analytics component', () => { ...@@ -240,29 +239,22 @@ describe('Cycle Analytics component', () => {
displaysStageTable(true); displaysStageTable(true);
}); });
it('does not display the add stage button', () => { it('displays the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(false); wrapper = createComponent({ shallow: false, withStageSelected: true });
}); return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(true);
describe('with no durationData', () => {
it('displays the duration chart', () => {
displaysDurationChart(true);
}); });
}); });
describe('with durationData', () => { it('displays the tasks by type chart', () => {
beforeEach(() => { wrapper = createComponent({ shallow: false, withStageSelected: true });
mock = new MockAdapter(axios); return wrapper.vm.$nextTick().then(() => {
wrapper.vm.$store.dispatch('setDateRange', { expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(true);
skipFetch: true,
startDate: mockData.startDate,
endDate: mockData.endDate,
});
}); });
});
it('displays the duration chart', () => { it('displays the duration chart', () => {
expect(wrapper.find(DurationChart).exists()).toBe(true); displaysDurationChart(true);
});
}); });
describe('StageTable', () => { describe('StageTable', () => {
...@@ -278,7 +270,6 @@ describe('Cycle Analytics component', () => { ...@@ -278,7 +270,6 @@ describe('Cycle Analytics component', () => {
}, },
shallow: false, shallow: false,
withStageSelected: true, withStageSelected: true,
tasksByTypeChartEnabled: false,
}); });
}); });
...@@ -348,67 +339,6 @@ describe('Cycle Analytics component', () => { ...@@ -348,67 +339,6 @@ describe('Cycle Analytics component', () => {
displaysDurationChart(false); displaysDurationChart(false);
}); });
}); });
describe('with customizableCycleAnalytics=true', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: true,
tasksByTypeChartEnabled: false,
});
});
afterEach(() => {
wrapper.destroy();
mock.restore();
});
it('will display the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(true);
});
});
describe('with tasksByTypeChart=true', () => {
beforeEach(() => {
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: false,
tasksByTypeChartEnabled: true,
});
});
afterEach(() => {
wrapper.destroy();
});
it('displays the tasks by type chart', () => {
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(true);
});
});
describe('with tasksByTypeChart=false', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: false,
tasksByTypeChartEnabled: false,
});
});
afterEach(() => {
wrapper.destroy();
mock.restore();
});
it('does not render the tasks by type chart', () => {
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(false);
});
});
}); });
}); });
...@@ -556,7 +486,6 @@ describe('Cycle Analytics component', () => { ...@@ -556,7 +486,6 @@ describe('Cycle Analytics component', () => {
wrapper = createComponent({ wrapper = createComponent({
shallow: false, shallow: false,
scatterplotEnabled: false, scatterplotEnabled: false,
tasksByTypeChartEnabled: false,
stubs: { stubs: {
...defaultStubs, ...defaultStubs,
}, },
...@@ -584,7 +513,6 @@ describe('Cycle Analytics component', () => { ...@@ -584,7 +513,6 @@ describe('Cycle Analytics component', () => {
wrapper = createComponent({ wrapper = createComponent({
shallow: false, shallow: false,
scatterplotEnabled: false, scatterplotEnabled: false,
tasksByTypeChartEnabled: false,
stubs: { stubs: {
...defaultStubs, ...defaultStubs,
}, },
......
...@@ -36,7 +36,6 @@ describe('Cycle analytics actions', () => { ...@@ -36,7 +36,6 @@ describe('Cycle analytics actions', () => {
stages: [], stages: [],
featureFlags: { featureFlags: {
hasDurationChart: true, hasDurationChart: true,
hasTasksByTypeChart: true,
hasDurationChartMedian: true, hasDurationChartMedian: true,
}, },
}; };
......
...@@ -28,7 +28,6 @@ const rootState = { ...@@ -28,7 +28,6 @@ const rootState = {
selectedGroup, selectedGroup,
featureFlags: { featureFlags: {
hasDurationChart: true, hasDurationChart: true,
hasTasksByTypeChart: true,
hasDurationChartMedian: true, hasDurationChartMedian: 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