Commit 0ba77670 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '342745-remove-feature-flag' into 'master'

Remove Apollo error suppression feature flag

See merge request gitlab-org/gitlab!74291
parents c35f040a 65dd9c13
...@@ -9,10 +9,6 @@ import { isNavigatingAway } from '~/lib/utils/is_navigating_away'; ...@@ -9,10 +9,6 @@ import { isNavigatingAway } from '~/lib/utils/is_navigating_away';
* @returns {ApolloLink|null} * @returns {ApolloLink|null}
*/ */
export const getSuppressNetworkErrorsDuringNavigationLink = () => { export const getSuppressNetworkErrorsDuringNavigationLink = () => {
if (!gon.features?.suppressApolloErrorsDuringNavigation) {
return null;
}
return onError(({ networkError }) => { return onError(({ networkError }) => {
if (networkError && isNavigatingAway()) { if (networkError && isNavigatingAway()) {
// Return an observable that will never notify any subscribers with any // Return an observable that will never notify any subscribers with any
......
---
name: suppress_apollo_errors_during_navigation
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72031
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/342745
milestone: '14.4'
type: development
group: group::foundations
default_enabled: false
...@@ -56,7 +56,6 @@ module Gitlab ...@@ -56,7 +56,6 @@ module Gitlab
push_frontend_feature_flag(:security_auto_fix, default_enabled: false) push_frontend_feature_flag(:security_auto_fix, default_enabled: false)
push_frontend_feature_flag(:improved_emoji_picker, default_enabled: :yaml) push_frontend_feature_flag(:improved_emoji_picker, default_enabled: :yaml)
push_frontend_feature_flag(:new_header_search, default_enabled: :yaml) push_frontend_feature_flag(:new_header_search, default_enabled: :yaml)
push_frontend_feature_flag(:suppress_apollo_errors_during_navigation, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:configure_iac_scanning_via_mr, current_user, default_enabled: :yaml) push_frontend_feature_flag(:configure_iac_scanning_via_mr, current_user, default_enabled: :yaml)
push_frontend_feature_flag(:bootstrap_confirmation_modals, default_enabled: :yaml) push_frontend_feature_flag(:bootstrap_confirmation_modals, default_enabled: :yaml)
end end
......
...@@ -47,17 +47,6 @@ describe('getSuppressNetworkErrorsDuringNavigationLink', () => { ...@@ -47,17 +47,6 @@ describe('getSuppressNetworkErrorsDuringNavigationLink', () => {
subscription = link.request(mockOperation).subscribe(observer); subscription = link.request(mockOperation).subscribe(observer);
}; };
describe('when disabled', () => {
it('returns null', () => {
expect(getSuppressNetworkErrorsDuringNavigationLink()).toBe(null);
});
});
describe('when enabled', () => {
beforeEach(() => {
window.gon = { features: { suppressApolloErrorsDuringNavigation: true } };
});
it('returns an ApolloLink', () => { it('returns an ApolloLink', () => {
expect(getSuppressNetworkErrorsDuringNavigationLink()).toEqual(expect.any(ApolloLink)); expect(getSuppressNetworkErrorsDuringNavigationLink()).toEqual(expect.any(ApolloLink));
}); });
...@@ -151,5 +140,4 @@ describe('getSuppressNetworkErrorsDuringNavigationLink', () => { ...@@ -151,5 +140,4 @@ describe('getSuppressNetworkErrorsDuringNavigationLink', () => {
}); });
}); });
}); });
});
}); });
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