Commit 47268e78 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'sh-remove-code-quality-usage-feature-flag' into 'master'

Remove code quality usage feature flag

See merge request gitlab-org/gitlab!67792
parents a380aacb dc2466ef
---
name: usage_data_i_testing_full_code_quality_report_total
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49079
rollout_issue_url:
milestone: '13.8'
type: development
group: group::testing
default_enabled: true
...@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils'; ...@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { parseCodeclimateMetrics } from '~/reports/codequality_report/store/utils/codequality_parser'; import { parseCodeclimateMetrics } from '~/reports/codequality_report/store/utils/codequality_parser';
import { VIEW_EVENT_FEATURE_FLAG, VIEW_EVENT_NAME } from './constants'; import { VIEW_EVENT_NAME } from './constants';
import * as types from './mutation_types'; import * as types from './mutation_types';
export const setPage = ({ commit }, page) => commit(types.SET_PAGE, page); export const setPage = ({ commit }, page) => commit(types.SET_PAGE, page);
...@@ -12,9 +12,7 @@ export const setPage = ({ commit }, page) => commit(types.SET_PAGE, page); ...@@ -12,9 +12,7 @@ export const setPage = ({ commit }, page) => commit(types.SET_PAGE, page);
export const requestReport = ({ commit }) => { export const requestReport = ({ commit }) => {
commit(types.REQUEST_REPORT); commit(types.REQUEST_REPORT);
if (gon.features[VIEW_EVENT_FEATURE_FLAG]) { Api.trackRedisHllUserEvent(VIEW_EVENT_NAME);
Api.trackRedisHllUserEvent(VIEW_EVENT_NAME);
}
}; };
export const receiveReportSuccess = ({ state, commit }, data) => { export const receiveReportSuccess = ({ state, commit }, data) => {
const parsedIssues = parseCodeclimateMetrics(data, state.blobPath); const parsedIssues = parseCodeclimateMetrics(data, state.blobPath);
......
export const VIEW_EVENT_FEATURE_FLAG = 'usageDataITestingFullCodeQualityReportTotal';
export const VIEW_EVENT_NAME = 'i_testing_full_code_quality_report_total'; export const VIEW_EVENT_NAME = 'i_testing_full_code_quality_report_total';
export const SEVERITY_SORT_ORDER = { export const SEVERITY_SORT_ORDER = {
......
...@@ -9,7 +9,6 @@ module EE ...@@ -9,7 +9,6 @@ module EE
prepended do prepended do
before_action :authorize_read_licenses!, only: [:licenses] before_action :authorize_read_licenses!, only: [:licenses]
before_action do before_action do
push_frontend_feature_flag(:usage_data_i_testing_full_code_quality_report_total, project, default_enabled: true)
push_frontend_feature_flag(:pipeline_security_dashboard_graphql, project, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:pipeline_security_dashboard_graphql, project, type: :development, default_enabled: :yaml)
end end
......
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import * as actions from 'ee/codequality_report/store/actions'; import * as actions from 'ee/codequality_report/store/actions';
import { VIEW_EVENT_NAME, VIEW_EVENT_FEATURE_FLAG } from 'ee/codequality_report/store/constants'; import { VIEW_EVENT_NAME } from 'ee/codequality_report/store/constants';
import * as types from 'ee/codequality_report/store/mutation_types'; import * as types from 'ee/codequality_report/store/mutation_types';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import testAction from 'helpers/vuex_action_helper'; import testAction from 'helpers/vuex_action_helper';
...@@ -38,26 +38,14 @@ describe('Codequality report actions', () => { ...@@ -38,26 +38,14 @@ describe('Codequality report actions', () => {
describe('requestReport', () => { describe('requestReport', () => {
it('sets the loading flag', (done) => { it('sets the loading flag', (done) => {
window.gon = { features: { [VIEW_EVENT_FEATURE_FLAG]: true } };
testAction(actions.requestReport, null, state, [{ type: types.REQUEST_REPORT }], [], done); testAction(actions.requestReport, null, state, [{ type: types.REQUEST_REPORT }], [], done);
}); });
it('tracks a service ping event when the feature flag is enabled', () => { it('tracks a service ping event', () => {
window.gon = { features: { [VIEW_EVENT_FEATURE_FLAG]: true } };
actions.requestReport({ commit: jest.fn() }); actions.requestReport({ commit: jest.fn() });
expect(Api.trackRedisHllUserEvent).toHaveBeenCalledWith(VIEW_EVENT_NAME); expect(Api.trackRedisHllUserEvent).toHaveBeenCalledWith(VIEW_EVENT_NAME);
}); });
it('does not track a service ping event when the feature flag is disabled', () => {
window.gon = { features: { [VIEW_EVENT_FEATURE_FLAG]: false } };
actions.requestReport({ commit: jest.fn() });
expect(Api.trackRedisHllUserEvent).not.toHaveBeenCalled();
});
}); });
describe('receiveReportSuccess', () => { describe('receiveReportSuccess', () => {
......
...@@ -170,7 +170,6 @@ ...@@ -170,7 +170,6 @@
category: testing category: testing
redis_slot: testing redis_slot: testing
aggregation: weekly aggregation: weekly
feature_flag: usage_data_i_testing_full_code_quality_report_total
- name: i_testing_web_performance_widget_total - name: i_testing_web_performance_widget_total
category: testing category: testing
redis_slot: testing redis_slot: testing
......
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