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 { ...@@ -63,7 +63,7 @@ export default {
computed: { computed: {
shouldEnableRealtime() { shouldEnableRealtime() {
// Note: Realtime is only available on issues right now, future support for MR wil be built later. // 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() { queryVariables() {
return { return {
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
computed: { computed: {
shouldEnableRealtime() { shouldEnableRealtime() {
// Note: Realtime is only available on issues right now, future support for MR wil be built later. // 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() { queryVariables() {
return { return {
......
...@@ -45,7 +45,6 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -45,7 +45,6 @@ class Projects::IssuesController < Projects::ApplicationController
end end
before_action only: :show do 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(:confidential_notes, project&.group, default_enabled: :yaml)
push_frontend_feature_flag(:issue_assignees_widget, project, 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) push_frontend_feature_flag(:paginated_issue_discussions, project, default_enabled: :yaml)
......
...@@ -79,9 +79,7 @@ module Issues ...@@ -79,9 +79,7 @@ module Issues
todo_service.reassigned_assignable(issue, current_user, old_assignees) todo_service.reassigned_assignable(issue, current_user, old_assignees)
track_incident_action(current_user, issue, :incident_assigned) track_incident_action(current_user, issue, :incident_assigned)
if Feature.enabled?(:broadcast_issue_updates, issue.project, default_enabled: :yaml) GraphqlTriggers.issuable_assignees_updated(issue)
GraphqlTriggers.issuable_assignees_updated(issue)
end
end end
def handle_task_changes(issuable) 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: ...@@ -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. > - [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 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. > - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/17589) in GitLab 14.5.
> - [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.
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.
Assignees in the sidebar are updated in real time. 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 ## Assignee
......
...@@ -12,20 +12,12 @@ module QA ...@@ -12,20 +12,12 @@ module QA
end end
before do before do
Runtime::Feature.enable('real_time_issue_sidebar', project: project)
Runtime::Feature.enable('broadcast_issue_updates', project: project)
Flow::Login.sign_in Flow::Login.sign_in
project.add_member(user1) project.add_member(user1)
project.add_member(user2) project.add_member(user2)
end 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 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 = Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
......
...@@ -1065,35 +1065,6 @@ RSpec.describe Projects::IssuesController do ...@@ -1065,35 +1065,6 @@ RSpec.describe Projects::IssuesController do
.not_to exceed_query_limit(control_count + 2 * labels.count) .not_to exceed_query_limit(control_count + 2 * labels.count)
end 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 it 'logs the view with Gitlab::Search::RecentIssues' do
sign_in(user) sign_in(user)
recent_issues_double = instance_double(::Gitlab::Search::RecentIssues, log_view: nil) recent_issues_double = instance_double(::Gitlab::Search::RecentIssues, log_view: nil)
......
...@@ -340,21 +340,9 @@ describe('Sidebar assignees widget', () => { ...@@ -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(); createComponent();
await waitForPromises(); 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); expect(findRealtimeAssignees().exists()).toBe(true);
}); });
......
...@@ -14,7 +14,7 @@ describe('sidebar assignees', () => { ...@@ -14,7 +14,7 @@ describe('sidebar assignees', () => {
let wrapper; let wrapper;
let mediator; let mediator;
let axiosMock; let axiosMock;
const createComponent = (realTimeIssueSidebar = false, props) => { const createComponent = (props) => {
wrapper = shallowMount(SidebarAssignees, { wrapper = shallowMount(SidebarAssignees, {
propsData: { propsData: {
issuableIid: '1', issuableIid: '1',
...@@ -25,11 +25,6 @@ describe('sidebar assignees', () => { ...@@ -25,11 +25,6 @@ describe('sidebar assignees', () => {
changing: false, changing: false,
...props, ...props,
}, },
provide: {
glFeatures: {
realTimeIssueSidebar,
},
},
// Attaching to document is required because this component emits something from the parent element :/ // Attaching to document is required because this component emits something from the parent element :/
attachTo: document.body, attachTo: document.body,
}); });
...@@ -86,27 +81,17 @@ describe('sidebar assignees', () => { ...@@ -86,27 +81,17 @@ describe('sidebar assignees', () => {
expect(wrapper.find(Assigness).exists()).toBe(true); expect(wrapper.find(Assigness).exists()).toBe(true);
}); });
describe('when realTimeIssueSidebar is turned on', () => { describe('when issuableType is issue', () => {
describe('when issuableType is issue', () => { it('finds AssigneesRealtime component', () => {
it('finds AssigneesRealtime componeont', () => { createComponent();
createComponent(true);
expect(wrapper.find(AssigneesRealtime).exists()).toBe(true);
});
});
describe('when issuableType is MR', () => {
it('does not find AssigneesRealtime componeont', () => {
createComponent(true, { issuableType: 'MR' });
expect(wrapper.find(AssigneesRealtime).exists()).toBe(false); expect(wrapper.find(AssigneesRealtime).exists()).toBe(true);
});
}); });
}); });
describe('when realTimeIssueSidebar is turned off', () => { describe('when issuableType is MR', () => {
it('does not find AssigneesRealtime', () => { it('does not find AssigneesRealtime component', () => {
createComponent(false, { issuableType: 'issue' }); createComponent({ issuableType: 'MR' });
expect(wrapper.find(AssigneesRealtime).exists()).toBe(false); expect(wrapper.find(AssigneesRealtime).exists()).toBe(false);
}); });
......
...@@ -1332,32 +1332,14 @@ RSpec.describe Issues::UpdateService, :mailer do ...@@ -1332,32 +1332,14 @@ RSpec.describe Issues::UpdateService, :mailer do
context 'broadcasting issue assignee updates' do context 'broadcasting issue assignee updates' do
let(:update_params) { { assignee_ids: [user2.id] } } let(:update_params) { { assignee_ids: [user2.id] } }
context 'when feature flag is enabled' do it 'triggers the GraphQL subscription' do
before do expect(GraphqlTriggers).to receive(:issuable_assignees_updated).with(issue)
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
context 'when assignee is not updated' do update_issue(update_params)
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
end end
context 'when feature flag is disabled' do context 'when assignee is not updated' do
before do let(:update_params) { { title: 'Some other title' } }
stub_feature_flags(broadcast_issue_updates: false)
end
it 'does not trigger the GraphQL subscription' do it 'does not trigger the GraphQL subscription' do
expect(GraphqlTriggers).not_to receive(:issuable_assignees_updated).with(issue) 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