Commit 95356c57 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo Committed by Brandon Labuschagne

Remove the multiple value streams feature flag

Removes the value_stream_analytics_create_multiple_value_streams
feature flag
parent f6f171cb
......@@ -316,15 +316,6 @@ To delete a custom value stream:
![Delete value stream](img/delete_value_stream_v13.4.png "Deleting a custom value stream")
### Disabling custom value streams
Custom value streams are enabled by default. If you have a self-managed instance, an
administrator can open a Rails console and disable them with the following command:
```ruby
Feature.disable(:value_stream_analytics_create_multiple_value_streams)
```
## Days to completion chart
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21631) in GitLab 12.6.
......
......@@ -96,9 +96,7 @@ export default {
return this.featureFlags.hasPathNavigation && !this.hasNoAccessError && this.selectedStage;
},
shouldDisplayCreateMultipleValueStreams() {
return Boolean(
this.featureFlags.hasCreateMultipleValueStreams && !this.isLoadingValueStreams,
);
return Boolean(!this.shouldRenderEmptyState && !this.isLoadingValueStreams);
},
hasDateRangeSet() {
return this.startDate && this.endDate;
......
......@@ -22,7 +22,6 @@ export default () => {
const {
cycleAnalyticsScatterplotEnabled: hasDurationChart = false,
valueStreamAnalyticsPathNavigation: hasPathNavigation = false,
valueStreamAnalyticsCreateMultipleValueStreams: hasCreateMultipleValueStreams = false,
valueStreamAnalyticsExtendedForm: hasExtendedFormFields = false,
} = gon?.features;
......@@ -42,7 +41,6 @@ export default () => {
featureFlags: {
hasDurationChart,
hasPathNavigation,
hasCreateMultipleValueStreams,
hasExtendedFormFields,
},
});
......
......@@ -154,6 +154,7 @@ export const receiveGroupStagesError = ({ commit }, error) => {
export const setDefaultSelectedStage = ({ dispatch, getters }) => {
const { activeStages = [] } = getters;
if (activeStages?.length) {
const [firstActiveStage] = activeStages;
return Promise.all([
......@@ -168,6 +169,7 @@ export const setDefaultSelectedStage = ({ dispatch, getters }) => {
export const receiveGroupStagesSuccess = ({ commit, dispatch }, stages) => {
commit(types.RECEIVE_GROUP_STAGES_SUCCESS, stages);
return dispatch('setDefaultSelectedStage');
};
......@@ -389,26 +391,20 @@ export const receiveValueStreamsSuccess = (
return dispatch(FETCH_VALUE_STREAM_DATA);
};
export const fetchValueStreams = ({ commit, dispatch, getters, state }) => {
const {
featureFlags: { hasCreateMultipleValueStreams = false },
} = state;
export const fetchValueStreams = ({ commit, dispatch, getters }) => {
const { currentGroupPath } = getters;
if (hasCreateMultipleValueStreams) {
commit(types.REQUEST_VALUE_STREAMS);
return Api.cycleAnalyticsValueStreams(currentGroupPath)
.then(({ data }) => dispatch('receiveValueStreamsSuccess', data))
.catch((error) => {
const {
response: { status },
} = error;
commit(types.RECEIVE_VALUE_STREAMS_ERROR, status);
throw error;
});
}
return dispatch(FETCH_VALUE_STREAM_DATA);
commit(types.REQUEST_VALUE_STREAMS);
return Api.cycleAnalyticsValueStreams(currentGroupPath)
.then(({ data }) => dispatch('receiveValueStreamsSuccess', data))
.catch((error) => {
const {
response: { status },
} = error;
commit(types.RECEIVE_VALUE_STREAMS_ERROR, status);
throw error;
});
};
export const setFilters = ({ dispatch }) => {
......
......@@ -15,7 +15,6 @@ class Groups::Analytics::CycleAnalyticsController < Groups::Analytics::Applicati
before_action do
push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true)
push_frontend_feature_flag(:value_stream_analytics_path_navigation, @group)
push_frontend_feature_flag(:value_stream_analytics_create_multiple_value_streams, default_enabled: true)
push_frontend_feature_flag(:value_stream_analytics_extended_form, @group)
render_403 unless can?(current_user, :read_group_cycle_analytics, @group)
end
......
---
name: value_stream_analytics_create_multiple_value_streams
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35822
rollout_issue_url:
milestone: '13.2'
type: development
group: group::analytics
default_enabled: true
......@@ -47,16 +47,4 @@ RSpec.describe 'Group value stream analytics' do
expect(page).to have_pushed_frontend_feature_flags(valueStreamAnalyticsExtendedForm: false)
end
end
context 'when `value_stream_analytics_create_multiple_value_streams` is disabled for a group' do
before do
stub_feature_flags(value_stream_analytics_create_multiple_value_streams: false, thing: group)
end
it 'pushes disabled feature flag to the frontend' do
visit group_analytics_cycle_analytics_path(group)
expect(page).to have_pushed_frontend_feature_flags(valueStreamAnalyticsCreateMultipleValueStreams: false)
end
end
end
......@@ -11,8 +11,6 @@ RSpec.describe 'Multiple value streams', :js do
end
end
stage_nav_selector = '.stage-nav'
duration_stage_selector = '.js-dropdown-stages'
value_stream_selector = '[data-testid="dropdown-value-streams"]'
let(:value_stream_dropdown) { page.find(value_stream_selector) }
......@@ -34,21 +32,6 @@ RSpec.describe 'Multiple value streams', :js do
sign_in(user)
end
# Adding this context as part of a fix for https://gitlab.com/gitlab-org/gitlab/-/issues/233439
# This can be removed when the feature flag is removed
context 'create multiple value streams disabled' do
before do
stub_feature_flags(value_stream_analytics_create_multiple_value_streams: false)
select_group
end
it 'displays the list of stages and duration chart' do
expect(page).to have_selector(stage_nav_selector, visible: true)
expect(page).to have_selector(duration_stage_selector, visible: true)
end
end
def toggle_value_stream_dropdown
value_stream_dropdown.click
end
......
......@@ -50,7 +50,6 @@ const defaultStubs = {
const defaultFeatureFlags = {
hasDurationChart: true,
hasPathNavigation: false,
hasCreateMultipleValueStreams: false,
};
const [selectedValueStream] = mockData.valueStreams;
......@@ -88,6 +87,9 @@ function mockRequiredRoutes(mockAdapter) {
.onGet(mockData.endpoints.durationData)
.reply(httpStatusCodes.OK, mockData.customizableStagesAndEvents.stages);
mockAdapter.onGet(mockData.endpoints.stageMedian).reply(httpStatusCodes.OK, { value: null });
mockAdapter
.onGet(mockData.endpoints.valueStreamData)
.reply(httpStatusCodes.OK, mockData.valueStreams);
}
async function shouldMergeUrlParams(wrapper, result) {
......@@ -110,7 +112,6 @@ describe('Value Stream Analytics component', () => {
},
shallow = true,
withStageSelected = false,
withValueStreamSelected = true,
featureFlags = {},
initialState = initialCycleAnalyticsState,
props = {},
......@@ -139,10 +140,6 @@ describe('Value Stream Analytics component', () => {
...opts,
});
if (withValueStreamSelected) {
await store.dispatch('receiveValueStreamsSuccess', mockData.valueStreams);
}
if (withStageSelected) {
await Promise.all([
store.dispatch('receiveGroupStagesSuccess', mockData.customizableStagesAndEvents.stages),
......@@ -316,7 +313,6 @@ describe('Value Stream Analytics component', () => {
describe('enabled', () => {
beforeEach(async () => {
wrapper = await createComponent({
withValueStreamSelected: false,
withStageSelected: true,
pathNavigationEnabled: true,
});
......@@ -372,25 +368,8 @@ describe('Value Stream Analytics component', () => {
);
});
describe('hasCreateMultipleValueStreams = true', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
mockRequiredRoutes(mock);
});
it('hides the value stream select component', () => {
displaysValueStreamSelect(false);
});
it('displays the value stream select component', async () => {
wrapper = await createComponent({
featureFlags: {
hasCreateMultipleValueStreams: true,
},
});
displaysValueStreamSelect(true);
});
it('displays the value stream select component', () => {
displaysValueStreamSelect(true);
});
it('displays the date range picker', () => {
......@@ -480,7 +459,6 @@ describe('Value Stream Analytics component', () => {
StageNavItem,
},
},
withValueStreamSelected: false,
withStageSelected: true,
});
});
......
......@@ -1020,7 +1020,6 @@ describe('Value Stream Analytics actions', () => {
currentGroup,
featureFlags: {
...state.featureFlags,
hasCreateMultipleValueStreams: true,
},
};
mock = new MockAdapter(axios);
......@@ -1102,21 +1101,6 @@ describe('Value Stream Analytics actions', () => {
);
});
});
describe('with hasCreateMultipleValueStreams disabled', () => {
beforeEach(() => {
state = {
...state,
featureFlags: {
...state.featureFlags,
hasCreateMultipleValueStreams: false,
},
};
});
it(`will dispatch the 'fetchGroupStagesAndEvents' request`, () =>
testAction(actions.fetchValueStreams, null, state, [], [{ type: 'fetchValueStreamData' }]));
});
});
describe('fetchValueStreamData', () => {
......@@ -1127,7 +1111,6 @@ describe('Value Stream Analytics actions', () => {
currentGroup,
featureFlags: {
...state.featureFlags,
hasCreateMultipleValueStreams: true,
},
};
mock = new MockAdapter(axios);
......
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