Commit 106317b9 authored by Mark Florian's avatar Mark Florian

Merge branch '276949-add-user-actor-ff' into 'master'

Add user-actor feature flag for pipelines

See merge request gitlab-org/gitlab!52092
parents becf081f 5992b607
...@@ -136,10 +136,13 @@ export default async function () { ...@@ -136,10 +136,13 @@ export default async function () {
createTestDetails(); createTestDetails();
createDagApp(); createDagApp();
const canShowNewPipelineDetails =
gon.features.graphqlPipelineDetails || gon.features.graphqlPipelineDetailsUsers;
const { dataset } = document.querySelector(SELECTORS.PIPELINE_DETAILS); const { dataset } = document.querySelector(SELECTORS.PIPELINE_DETAILS);
let mediator; let mediator;
if (!gon.features.graphqlPipelineHeader || !gon.features.graphqlPipelineDetails) { if (!gon.features.graphqlPipelineHeader || !canShowNewPipelineDetails) {
try { try {
const { default: PipelinesMediator } = await import( const { default: PipelinesMediator } = await import(
/* webpackChunkName: 'PipelinesMediator' */ './pipeline_details_mediator' /* webpackChunkName: 'PipelinesMediator' */ './pipeline_details_mediator'
...@@ -151,7 +154,7 @@ export default async function () { ...@@ -151,7 +154,7 @@ export default async function () {
} }
} }
if (gon.features.graphqlPipelineDetails) { if (canShowNewPipelineDetails) {
try { try {
const { createPipelinesDetailApp } = await import( const { createPipelinesDetailApp } = await import(
/* webpackChunkName: 'createPipelinesDetailApp' */ './pipeline_details_graph' /* webpackChunkName: 'createPipelinesDetailApp' */ './pipeline_details_graph'
......
...@@ -16,7 +16,8 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -16,7 +16,8 @@ class Projects::PipelinesController < Projects::ApplicationController
push_frontend_feature_flag(:pipelines_security_report_summary, project) push_frontend_feature_flag(:pipelines_security_report_summary, project)
push_frontend_feature_flag(:new_pipeline_form, project, default_enabled: true) push_frontend_feature_flag(:new_pipeline_form, project, default_enabled: true)
push_frontend_feature_flag(:graphql_pipeline_header, project, type: :development, default_enabled: false) push_frontend_feature_flag(:graphql_pipeline_header, project, type: :development, default_enabled: false)
push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: false) push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:graphql_pipeline_details_users, current_user, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipeline_form_prefilled_vars, project, type: :development, default_enabled: true) push_frontend_feature_flag(:new_pipeline_form_prefilled_vars, project, type: :development, default_enabled: true)
end end
before_action :ensure_pipeline, only: [:show] before_action :ensure_pipeline, only: [:show]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- add_page_specific_style 'page_bundles/reports' - add_page_specific_style 'page_bundles/reports'
- add_page_specific_style 'page_bundles/ci_status' - add_page_specific_style 'page_bundles/ci_status'
- if Feature.enabled?(:graphql_pipeline_details, @project) - if Feature.enabled?(:graphql_pipeline_details, @project, default_enabled: :yaml) || Feature.enabled?(:graphql_pipeline_details_users, @current_user, default_enabled: :yaml)
- add_page_startup_graphql_call('pipelines/get_pipeline_details', { projectPath: @project.full_path, iid: @pipeline.iid }) - add_page_startup_graphql_call('pipelines/get_pipeline_details', { projectPath: @project.full_path, iid: @pipeline.iid })
.js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } } .js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } }
......
---
name: graphql_pipeline_details_users
introduced_by_url:
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299112
milestone: '13.9'
type: development
group: group::pipeline authoring
default_enabled: false
...@@ -8,6 +8,7 @@ RSpec.describe 'Pipeline', :js do ...@@ -8,6 +8,7 @@ RSpec.describe 'Pipeline', :js do
before do before do
stub_feature_flags(graphql_pipeline_details: false) stub_feature_flags(graphql_pipeline_details: false)
stub_feature_flags(graphql_pipeline_details_users: false)
sign_in(user) sign_in(user)
project.add_developer(user) project.add_developer(user)
......
...@@ -15,6 +15,7 @@ RSpec.describe 'Pipeline', :js do ...@@ -15,6 +15,7 @@ RSpec.describe 'Pipeline', :js do
sign_in(user) sign_in(user)
project.add_role(user, role) project.add_role(user, role)
stub_feature_flags(graphql_pipeline_details: false) stub_feature_flags(graphql_pipeline_details: false)
stub_feature_flags(graphql_pipeline_details_users: false)
end end
shared_context 'pipeline builds' do shared_context 'pipeline builds' do
......
...@@ -13,6 +13,7 @@ RSpec.describe 'Pipelines', :js do ...@@ -13,6 +13,7 @@ RSpec.describe 'Pipelines', :js do
before do before do
sign_in(user) sign_in(user)
stub_feature_flags(graphql_pipeline_details: false) stub_feature_flags(graphql_pipeline_details: false)
stub_feature_flags(graphql_pipeline_details_users: false)
project.add_developer(user) project.add_developer(user)
project.update!(auto_devops_attributes: { enabled: false }) project.update!(auto_devops_attributes: { enabled: false })
end end
......
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