From 5c2eaa7f25e181213cf250f6141e4f825715bce6 Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Wed, 16 Jul 2025 15:27:25 +0200 Subject: [PATCH 1/2] Embedded views GA Add the ability to embed a table/list of issues, epics or merge requests in Markdown. Now generally available. Changelog: added --- .../behaviors/markdown/render_gfm.js | 3 +-- app/controllers/concerns/wiki_actions.rb | 1 - app/controllers/groups/boards_controller.rb | 1 - .../groups/work_items_controller.rb | 1 - app/controllers/projects/boards_controller.rb | 1 - app/controllers/projects/issues_controller.rb | 1 - .../merge_requests/application_controller.rb | 1 - .../projects/work_items_controller.rb | 1 - app/models/group.rb | 4 ---- app/models/project.rb | 4 ---- .../development/glql_integration.yml | 9 ------- doc/user/glql/_index.md | 10 +------- doc/user/glql/fields.md | 11 ++------- doc/user/glql/functions.md | 11 ++------- ee/app/controllers/groups/epics_controller.rb | 1 - .../behaviors/markdown/render_gfm_spec.js | 24 +++---------------- spec/models/project_spec.rb | 10 -------- 17 files changed, 9 insertions(+), 85 deletions(-) delete mode 100644 config/feature_flags/development/glql_integration.yml diff --git a/app/assets/javascripts/behaviors/markdown/render_gfm.js b/app/assets/javascripts/behaviors/markdown/render_gfm.js index 811fd30af918d6..fbc4fcdcd394a0 100644 --- a/app/assets/javascripts/behaviors/markdown/render_gfm.js +++ b/app/assets/javascripts/behaviors/markdown/render_gfm.js @@ -55,6 +55,5 @@ export function renderGFM(element) { highlightCurrentUser(userEls); initPopovers(popoverEls); addAriaLabels(taskListCheckboxEls); - - if (gon?.features?.glqlIntegration) renderGlql(glqlEls.map((e) => e.parentNode)); + renderGlql(glqlEls.map((e) => e.parentNode)); } diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb index bb0da68a6b3501..f0b2f0a52bde77 100644 --- a/app/controllers/concerns/wiki_actions.rb +++ b/app/controllers/concerns/wiki_actions.rb @@ -39,7 +39,6 @@ module WikiActions push_force_frontend_feature_flag(:glql_work_items, true) end - push_force_frontend_feature_flag(:glql_integration, !!container&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!container&.glql_load_on_click_feature_flag_enabled?) end diff --git a/app/controllers/groups/boards_controller.rb b/app/controllers/groups/boards_controller.rb index 72b2647c94892b..e10e086d5544ed 100644 --- a/app/controllers/groups/boards_controller.rb +++ b/app/controllers/groups/boards_controller.rb @@ -10,7 +10,6 @@ class Groups::BoardsController < Groups::ApplicationController push_frontend_feature_flag(:issues_list_drawer, group) push_force_frontend_feature_flag(:work_items_beta, !!group&.work_items_beta_feature_flag_enabled?) push_frontend_feature_flag(:notifications_todos_buttons, current_user) - push_force_frontend_feature_flag(:glql_integration, !!group&.glql_integration_feature_flag_enabled?) push_frontend_feature_flag(:work_item_status_feature_flag, group&.root_ancestor) end diff --git a/app/controllers/groups/work_items_controller.rb b/app/controllers/groups/work_items_controller.rb index 9d002e46a618db..f247a26c518f70 100644 --- a/app/controllers/groups/work_items_controller.rb +++ b/app/controllers/groups/work_items_controller.rb @@ -11,7 +11,6 @@ class WorkItemsController < Groups::ApplicationController push_force_frontend_feature_flag(:work_items_alpha, !!group&.work_items_alpha_feature_flag_enabled?) push_force_frontend_feature_flag(:create_group_level_work_items, !!group&.create_group_level_work_items_feature_flag_enabled?) - push_force_frontend_feature_flag(:glql_integration, !!group&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!group&.glql_load_on_click_feature_flag_enabled?) push_frontend_feature_flag(:issues_list_drawer, group) push_frontend_feature_flag(:work_item_status_feature_flag, group&.root_ancestor) diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb index 3e56acd18ce6b4..25971531ad6650 100644 --- a/app/controllers/projects/boards_controller.rb +++ b/app/controllers/projects/boards_controller.rb @@ -10,7 +10,6 @@ class Projects::BoardsController < Projects::ApplicationController push_frontend_feature_flag(:issues_list_drawer, project) push_force_frontend_feature_flag(:work_items_beta, !!project&.work_items_beta_feature_flag_enabled?) push_frontend_feature_flag(:notifications_todos_buttons, current_user) - push_force_frontend_feature_flag(:glql_integration, !!project&.glql_integration_feature_flag_enabled?) push_frontend_feature_flag(:work_item_status_feature_flag, project&.root_ancestor) end diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index df7daf9e1ea211..cf316116f5bd50 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -54,7 +54,6 @@ class Projects::IssuesController < Projects::ApplicationController push_frontend_feature_flag(:issues_list_drawer, project) push_frontend_feature_flag(:notifications_todos_buttons, current_user) push_frontend_feature_flag(:work_item_planning_view, project&.group) - push_force_frontend_feature_flag(:glql_integration, !!project&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!project&.glql_load_on_click_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, !!project&.work_items_beta_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_alpha, !!project&.work_items_alpha_feature_flag_enabled?) diff --git a/app/controllers/projects/merge_requests/application_controller.rb b/app/controllers/projects/merge_requests/application_controller.rb index 921a5f68bb7fe6..98189b5b35eee3 100644 --- a/app/controllers/projects/merge_requests/application_controller.rb +++ b/app/controllers/projects/merge_requests/application_controller.rb @@ -8,7 +8,6 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont feature_category :code_review_workflow before_action do - push_force_frontend_feature_flag(:glql_integration, !!project&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!project&.glql_load_on_click_feature_flag_enabled?) end diff --git a/app/controllers/projects/work_items_controller.rb b/app/controllers/projects/work_items_controller.rb index 732d4384de1d4d..a71a074489e4b7 100644 --- a/app/controllers/projects/work_items_controller.rb +++ b/app/controllers/projects/work_items_controller.rb @@ -12,7 +12,6 @@ class Projects::WorkItemsController < Projects::ApplicationController push_force_frontend_feature_flag(:work_items, !!project&.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, !!project&.work_items_beta_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_alpha, !!project&.work_items_alpha_feature_flag_enabled?) - push_force_frontend_feature_flag(:glql_integration, !!project&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!project&.glql_load_on_click_feature_flag_enabled?) push_frontend_feature_flag(:work_item_status_feature_flag, project&.root_ancestor) push_frontend_feature_flag(:work_item_planning_view, project&.group) diff --git a/app/models/group.rb b/app/models/group.rb index eb3faef5ceae0a..1f75d9855ca149 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -1112,10 +1112,6 @@ def markdown_placeholders_feature_flag_enabled? feature_flag_enabled_for_self_or_ancestor?(:markdown_placeholders, type: :gitlab_com_derisk) end - def glql_integration_feature_flag_enabled? - feature_flag_enabled_for_self_or_ancestor?(:glql_integration) - end - def glql_load_on_click_feature_flag_enabled? feature_flag_enabled_for_self_or_ancestor?(:glql_load_on_click) end diff --git a/app/models/project.rb b/app/models/project.rb index 91f503e868ec3a..ba31e1cc9b7e79 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -3457,10 +3457,6 @@ def work_item_status_feature_available? licensed_feature_available?(:work_item_status) end - def glql_integration_feature_flag_enabled? - group&.glql_integration_feature_flag_enabled? || Feature.enabled?(:glql_integration, self) - end - def glql_load_on_click_feature_flag_enabled? group&.glql_load_on_click_feature_flag_enabled? || Feature.enabled?(:glql_load_on_click, self) end diff --git a/config/feature_flags/development/glql_integration.yml b/config/feature_flags/development/glql_integration.yml deleted file mode 100644 index 8d041b20ace4d9..00000000000000 --- a/config/feature_flags/development/glql_integration.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: glql_integration -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/161942 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/476990 -feature_issue_url: https://gitlab.com/groups/gitlab-org/-/epics/14767 -milestone: '17.3' -type: development -group: group::knowledge -default_enabled: true diff --git a/doc/user/glql/_index.md b/doc/user/glql/_index.md index 54e1f6a6a87112..70e2231224fa49 100644 --- a/doc/user/glql/_index.md +++ b/doc/user/glql/_index.md @@ -9,7 +9,6 @@ title: GitLab Query Language (GLQL) - Tier: Free, Premium, Ultimate - Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated -- Status: Beta {{< /details >}} @@ -19,17 +18,10 @@ title: GitLab Query Language (GLQL) - Enabled on GitLab.com in GitLab 17.4 for a subset of groups and projects. - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/476990) from experiment to beta in GitLab 17.10. - Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 17.10. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/554870) in GitLab 18.3. Feature flag `glql_integration` removed. {{< /history >}} -{{< alert type="flag" >}} - -The availability of this feature is controlled by a feature flag. -For more information, see the history. -This feature is available for testing, but not ready for production use. - -{{< /alert >}} - GitLab Query Language (GLQL) is an attempt to create a single query language for all of GitLab. Use it to filter and embed content from anywhere in the platform, using familiar syntax. diff --git a/doc/user/glql/fields.md b/doc/user/glql/fields.md index 390497ff56b9b7..9e8ab4db6bf1cc 100644 --- a/doc/user/glql/fields.md +++ b/doc/user/glql/fields.md @@ -9,7 +9,6 @@ title: GLQL fields - Tier: Free, Premium, Ultimate - Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated -- Status: Beta {{< /details >}} @@ -20,15 +19,9 @@ title: GLQL fields - Promoted to [beta](../../policy/development_stages_support.md#beta) status in GitLab 17.10. - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/476990) from experiment to beta in GitLab 17.10. - Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 17.10. -{{< /history >}} - -{{< alert type="flag" >}} +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/554870) in GitLab 18.3. Feature flag `glql_integration` removed. -The availability of this feature is controlled by a feature flag. -For more information, see the history. -This feature is available for testing, but not ready for production use. - -{{< /alert >}} +{{< /history >}} With GitLab Query Language (GLQL), fields are used to: diff --git a/doc/user/glql/functions.md b/doc/user/glql/functions.md index 488e182bf1070f..a58e29d041924d 100644 --- a/doc/user/glql/functions.md +++ b/doc/user/glql/functions.md @@ -9,7 +9,6 @@ title: GLQL functions - Tier: Free, Premium, Ultimate - Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated -- Status: Beta {{< /details >}} @@ -20,15 +19,9 @@ title: GLQL functions - Promoted to [beta](../../policy/development_stages_support.md#beta) status in GitLab 17.10. - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/476990) from experiment to beta in GitLab 17.10. - Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 17.10. -{{< /history >}} - -{{< alert type="flag" >}} +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/554870) in GitLab 18.3. Feature flag `glql_integration` removed. -The availability of this feature is controlled by a feature flag. -For more information, see the history. -This feature is available for testing, but not ready for production use. - -{{< /alert >}} +{{< /history >}} Use functions with [GitLab Query Language (GLQL)](_index.md) to create dynamic queries. diff --git a/ee/app/controllers/groups/epics_controller.rb b/ee/app/controllers/groups/epics_controller.rb index f182a49c81e8de..da8a925ebfcd3c 100644 --- a/ee/app/controllers/groups/epics_controller.rb +++ b/ee/app/controllers/groups/epics_controller.rb @@ -21,7 +21,6 @@ class Groups::EpicsController < Groups::ApplicationController push_frontend_feature_flag(:preserve_markdown, @group) push_frontend_feature_flag(:notifications_todos_buttons, current_user) - push_force_frontend_feature_flag(:glql_integration, !!@group&.glql_integration_feature_flag_enabled?) push_force_frontend_feature_flag(:glql_load_on_click, !!@group&.glql_load_on_click_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_alpha, !!group.work_items_alpha_feature_flag_enabled?) push_frontend_feature_flag(:epics_list_drawer, @group) diff --git a/spec/frontend/behaviors/markdown/render_gfm_spec.js b/spec/frontend/behaviors/markdown/render_gfm_spec.js index 67d3db70e6bebd..410246d26dbcec 100644 --- a/spec/frontend/behaviors/markdown/render_gfm_spec.js +++ b/spec/frontend/behaviors/markdown/render_gfm_spec.js @@ -27,28 +27,10 @@ describe('renderGFM', () => { '
labels = any
'; }); - describe('when glqlIntegration is enabled', () => { - beforeEach(() => { - gon.features = { glqlIntegration: true }; - }); - - it('calls renderGlql', () => { - renderGFM(element); - - expect(renderGlql).toHaveBeenCalledWith([element.firstElementChild]); - }); - }); + it('calls renderGlql', () => { + renderGFM(element); - describe('when glqlIntegration is disabled', () => { - beforeEach(() => { - gon.features = { glqlIntegration: false }; - }); - - it('does not call renderGlql', () => { - renderGFM(element); - - expect(renderGlql).not.toHaveBeenCalled(); - }); + expect(renderGlql).toHaveBeenCalledWith([element.firstElementChild]); }); }); diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index a27dfef7cfd8b4..06802e900cd990 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -9493,16 +9493,6 @@ def create_project_statistics_with_size(project, size) end end - describe '#glql_integration_feature_flag_enabled?' do - let_it_be(:group_project) { create(:project, :in_subgroup) } - - it_behaves_like 'checks parent group and self feature flag' do - let(:feature_flag_method) { :glql_integration_feature_flag_enabled? } - let(:feature_flag) { :glql_integration } - let(:subject_project) { group_project } - end - end - describe '#glql_load_on_click_feature_flag_enabled?' do let_it_be(:group_project) { create(:project, :in_subgroup) } -- GitLab From 7eb65a1493c17b1d2037da3865aa020f1b891466 Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Thu, 17 Jul 2025 12:39:59 +0200 Subject: [PATCH 2/2] Remove unused test --- spec/models/group_spec.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 92d9559863a8ef..3ccd073889a388 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -4355,13 +4355,6 @@ def define_cache_expectations(cache_key) it { is_expected.to be false } end - describe '#glql_integration_feature_flag_enabled?' do - it_behaves_like 'checks self and root ancestor feature flag' do - let(:feature_flag) { :glql_integration } - let(:feature_flag_method) { :glql_integration_feature_flag_enabled? } - end - end - describe '#glql_load_on_click_feature_flag_enabled?' do it_behaves_like 'checks self and root ancestor feature flag' do let(:feature_flag) { :glql_load_on_click } -- GitLab