Commit ea7853ac authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by Simon Knox

Remove real-time feature flags

These have been enabled by default for a couple of releases now.

Changelog: other
parent 8d2c34da
......@@ -63,7 +63,7 @@ export default {
computed: {
shouldEnableRealtime() {
// Note: Realtime is only available on issues right now, future support for MR wil be built later.
return this.glFeatures.realTimeIssueSidebar && this.issuableType === 'issue';
return this.issuableType === 'issue';
},
queryVariables() {
return {
......
......@@ -112,7 +112,7 @@ export default {
computed: {
shouldEnableRealtime() {
// Note: Realtime is only available on issues right now, future support for MR wil be built later.
return this.glFeatures.realTimeIssueSidebar && this.issuableType === IssuableType.Issue;
return this.issuableType === IssuableType.Issue;
},
queryVariables() {
return {
......
......@@ -45,7 +45,6 @@ class Projects::IssuesController < Projects::ApplicationController
end
before_action only: :show do
push_frontend_feature_flag(:real_time_issue_sidebar, project, default_enabled: :yaml)
push_frontend_feature_flag(:confidential_notes, project&.group, default_enabled: :yaml)
push_frontend_feature_flag(:issue_assignees_widget, project, default_enabled: :yaml)
push_frontend_feature_flag(:paginated_issue_discussions, project, default_enabled: :yaml)
......
......@@ -79,9 +79,7 @@ module Issues
todo_service.reassigned_assignable(issue, current_user, old_assignees)
track_incident_action(current_user, issue, :incident_assigned)
if Feature.enabled?(:broadcast_issue_updates, issue.project, default_enabled: :yaml)
GraphqlTriggers.issuable_assignees_updated(issue)
end
GraphqlTriggers.issuable_assignees_updated(issue)
end
def handle_task_changes(issuable)
......
---
name: broadcast_issue_updates
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30732
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/3413
milestone: '13.0'
type: development
group: group::project management
default_enabled: true
---
name: real_time_issue_sidebar
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30239
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1210
milestone: '13.0'
type: development
group: group::project management
default_enabled: true
......@@ -578,13 +578,11 @@ To copy the issue's email address:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/17589) in GitLab 13.3. Disabled by default.
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-com/gl-infra/production/-/issues/3413) in GitLab 13.9.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/17589) in GitLab 14.5.
FLAG:
On self-managed GitLab, by default this feature is available. To hide the feature per project or for your entire instance, ask an administrator to
[disable the feature flags](../../../administration/feature_flags.md) named `real_time_issue_sidebar` and `broadcast_issue_updates`.
On GitLab.com, this feature is available.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/17589) in GitLab 14.9. Feature flags `real_time_issue_sidebar` and `broadcast_issue_updates` removed.
Assignees in the sidebar are updated in real time.
When you're viewing an issue and somebody changes its assignee,
you can see the change without having to refresh the page.
## Assignee
......
......@@ -12,20 +12,12 @@ module QA
end
before do
Runtime::Feature.enable('real_time_issue_sidebar', project: project)
Runtime::Feature.enable('broadcast_issue_updates', project: project)
Flow::Login.sign_in
project.add_member(user1)
project.add_member(user2)
end
after do
Runtime::Feature.disable('real_time_issue_sidebar', project: project)
Runtime::Feature.disable('broadcast_issue_updates', project: project)
end
it 'update without refresh', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347941' do
issue = Resource::Issue.fabricate_via_api! do |issue|
issue.project = project
......
......@@ -1065,35 +1065,6 @@ RSpec.describe Projects::IssuesController do
.not_to exceed_query_limit(control_count + 2 * labels.count)
end
context 'real-time sidebar feature flag' do
let_it_be(:project) { create(:project, :public) }
let_it_be(:issue) { create(:issue, project: project) }
context 'when enabled' do
before do
stub_feature_flags(real_time_issue_sidebar: true)
end
it 'pushes the correct value to the frontend' do
go(id: issue.to_param)
expect(Gon.features).to include('realTimeIssueSidebar' => true)
end
end
context 'when disabled' do
before do
stub_feature_flags(real_time_issue_sidebar: false)
end
it 'pushes the correct value to the frontend' do
go(id: issue.to_param)
expect(Gon.features).to include('realTimeIssueSidebar' => false)
end
end
end
it 'logs the view with Gitlab::Search::RecentIssues' do
sign_in(user)
recent_issues_double = instance_double(::Gitlab::Search::RecentIssues, log_view: nil)
......
......@@ -340,21 +340,9 @@ describe('Sidebar assignees widget', () => {
});
});
it('when realtime feature flag is disabled', async () => {
it('includes the real-time assignees component', async () => {
createComponent();
await waitForPromises();
expect(findRealtimeAssignees().exists()).toBe(false);
});
it('when realtime feature flag is enabled', async () => {
createComponent({
provide: {
glFeatures: {
realTimeIssueSidebar: true,
},
},
});
await waitForPromises();
expect(findRealtimeAssignees().exists()).toBe(true);
});
......
......@@ -14,7 +14,7 @@ describe('sidebar assignees', () => {
let wrapper;
let mediator;
let axiosMock;
const createComponent = (realTimeIssueSidebar = false, props) => {
const createComponent = (props) => {
wrapper = shallowMount(SidebarAssignees, {
propsData: {
issuableIid: '1',
......@@ -25,11 +25,6 @@ describe('sidebar assignees', () => {
changing: false,
...props,
},
provide: {
glFeatures: {
realTimeIssueSidebar,
},
},
// Attaching to document is required because this component emits something from the parent element :/
attachTo: document.body,
});
......@@ -86,27 +81,17 @@ describe('sidebar assignees', () => {
expect(wrapper.find(Assigness).exists()).toBe(true);
});
describe('when realTimeIssueSidebar is turned on', () => {
describe('when issuableType is issue', () => {
it('finds AssigneesRealtime componeont', () => {
createComponent(true);
expect(wrapper.find(AssigneesRealtime).exists()).toBe(true);
});
});
describe('when issuableType is MR', () => {
it('does not find AssigneesRealtime componeont', () => {
createComponent(true, { issuableType: 'MR' });
describe('when issuableType is issue', () => {
it('finds AssigneesRealtime component', () => {
createComponent();
expect(wrapper.find(AssigneesRealtime).exists()).toBe(false);
});
expect(wrapper.find(AssigneesRealtime).exists()).toBe(true);
});
});
describe('when realTimeIssueSidebar is turned off', () => {
it('does not find AssigneesRealtime', () => {
createComponent(false, { issuableType: 'issue' });
describe('when issuableType is MR', () => {
it('does not find AssigneesRealtime component', () => {
createComponent({ issuableType: 'MR' });
expect(wrapper.find(AssigneesRealtime).exists()).toBe(false);
});
......
......@@ -1332,32 +1332,14 @@ RSpec.describe Issues::UpdateService, :mailer do
context 'broadcasting issue assignee updates' do
let(:update_params) { { assignee_ids: [user2.id] } }
context 'when feature flag is enabled' do
before do
stub_feature_flags(broadcast_issue_updates: true)
end
it 'triggers the GraphQL subscription' do
expect(GraphqlTriggers).to receive(:issuable_assignees_updated).with(issue)
update_issue(update_params)
end
it 'triggers the GraphQL subscription' do
expect(GraphqlTriggers).to receive(:issuable_assignees_updated).with(issue)
context 'when assignee is not updated' do
let(:update_params) { { title: 'Some other title' } }
it 'does not trigger the GraphQL subscription' do
expect(GraphqlTriggers).not_to receive(:issuable_assignees_updated).with(issue)
update_issue(update_params)
end
end
update_issue(update_params)
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(broadcast_issue_updates: false)
end
context 'when assignee is not updated' do
let(:update_params) { { title: 'Some other title' } }
it 'does not trigger the GraphQL subscription' do
expect(GraphqlTriggers).not_to receive(:issuable_assignees_updated).with(issue)
......
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