diff options
Diffstat (limited to 'app/controllers/projects')
71 files changed, 194 insertions, 226 deletions
diff --git a/app/controllers/projects/alert_management_controller.rb b/app/controllers/projects/alert_management_controller.rb index ebe867d915d..ef0c47b0eed 100644 --- a/app/controllers/projects/alert_management_controller.rb +++ b/app/controllers/projects/alert_management_controller.rb @@ -4,6 +4,7 @@ class Projects::AlertManagementController < Projects::ApplicationController before_action :authorize_read_alert_management_alert! feature_category :incident_management + urgency :low def index end diff --git a/app/controllers/projects/alerting/notifications_controller.rb b/app/controllers/projects/alerting/notifications_controller.rb index ae8498ce65f..82fff287c4a 100644 --- a/app/controllers/projects/alerting/notifications_controller.rb +++ b/app/controllers/projects/alerting/notifications_controller.rb @@ -13,6 +13,9 @@ module Projects prepend_before_action :repository, :project_without_auth feature_category :incident_management + # Goal is to increase the urgency to medium. + # See https://gitlab.com/gitlab-org/gitlab/-/issues/361310. + urgency :low, [:create] def create token = extract_alert_manager_token(request) diff --git a/app/controllers/projects/analytics/cycle_analytics/value_streams_controller.rb b/app/controllers/projects/analytics/cycle_analytics/value_streams_controller.rb index 03dcb164d94..60bcd1d7238 100644 --- a/app/controllers/projects/analytics/cycle_analytics/value_streams_controller.rb +++ b/app/controllers/projects/analytics/cycle_analytics/value_streams_controller.rb @@ -4,6 +4,7 @@ class Projects::Analytics::CycleAnalytics::ValueStreamsController < Projects::Ap respond_to :json feature_category :planning_analytics + urgency :low before_action :authorize_read_cycle_analytics! diff --git a/app/controllers/projects/autocomplete_sources_controller.rb b/app/controllers/projects/autocomplete_sources_controller.rb index f678e19d05d..9dbf989ca3f 100644 --- a/app/controllers/projects/autocomplete_sources_controller.rb +++ b/app/controllers/projects/autocomplete_sources_controller.rb @@ -9,7 +9,8 @@ class Projects::AutocompleteSourcesController < Projects::ApplicationController feature_category :users, [:members] feature_category :snippets, [:snippets] - urgency :low, [:merge_requests] + urgency :low, [:merge_requests, :members] + urgency :low, [:issues, :labels, :milestones, :commands, :contacts] def members render json: ::Projects::ParticipantsService.new(@project, current_user).execute(target) diff --git a/app/controllers/projects/avatars_controller.rb b/app/controllers/projects/avatars_controller.rb index fb113df137f..70d9b524e4d 100644 --- a/app/controllers/projects/avatars_controller.rb +++ b/app/controllers/projects/avatars_controller.rb @@ -9,6 +9,8 @@ class Projects::AvatarsController < Projects::ApplicationController feature_category :projects + urgency :low, [:show] + def show @blob = @repository.blob_at_branch(@repository.root_ref, @project.avatar_in_git) diff --git a/app/controllers/projects/blame_controller.rb b/app/controllers/projects/blame_controller.rb index 57a06f26f8c..64ced43311a 100644 --- a/app/controllers/projects/blame_controller.rb +++ b/app/controllers/projects/blame_controller.rb @@ -23,8 +23,11 @@ class Projects::BlameController < Projects::ApplicationController environment_params[:find_latest] = true @environment = ::Environments::EnvironmentsByDeploymentsFinder.new(@project, current_user, environment_params).execute.last - @blame = Gitlab::Blame.new(@blob, @commit) - @blame = Gitlab::View::Presenter::Factory.new(@blame, project: @project, path: @path).fabricate! + blame_service = Projects::BlameService.new(@blob, @commit, params.permit(:page)) + + @blame = Gitlab::View::Presenter::Factory.new(blame_service.blame, project: @project, path: @path).fabricate! + + render locals: { blame_pagination: blame_service.pagination } end end diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 26a7b5662be..a9561fb9312 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -42,8 +42,8 @@ class Projects::BlobController < Projects::ApplicationController urgency :low, [:create, :show, :edit, :update, :diff] before_action do - push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml) - push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml) + push_frontend_feature_flag(:refactor_blob_viewer, @project) + push_frontend_feature_flag(:highlight_js, @project) push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks) end diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb index 7a30e68d9a2..36986a714fb 100644 --- a/app/controllers/projects/boards_controller.rb +++ b/app/controllers/projects/boards_controller.rb @@ -7,8 +7,8 @@ class Projects::BoardsController < Projects::ApplicationController before_action :check_issues_available! before_action :assign_endpoint_vars before_action do - push_frontend_feature_flag(:board_multi_select, project, default_enabled: :yaml) - push_frontend_feature_flag(:realtime_labels, project&.group, default_enabled: :yaml) + push_frontend_feature_flag(:board_multi_select, project) + push_frontend_feature_flag(:realtime_labels, project&.group) experiment(:prominent_create_board_btn, subject: current_user) do |e| e.control { } e.candidate { } @@ -16,6 +16,7 @@ class Projects::BoardsController < Projects::ApplicationController end feature_category :team_planning + urgency :low private diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index 6264f10ce2d..27969cb1a75 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -111,7 +111,7 @@ class Projects::BranchesController < Projects::ApplicationController flash_type = result.error? ? :alert : :notice flash[flash_type] = result.message - redirect_to project_branches_path(@project), status: :see_other + redirect_back_or_default(default: project_branches_path(@project), options: { status: :see_other }) end format.js { head result.http_status } diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index 61e8e5b015a..4168612d50f 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -5,8 +5,7 @@ class Projects::BuildsController < Projects::ApplicationController feature_category :continuous_integration - urgency :high, [:index, :show] - urgency :low, [:raw] + urgency :low, [:raw, :index, :show] def index redirect_to project_jobs_path(project) diff --git a/app/controllers/projects/ci/pipeline_editor_controller.rb b/app/controllers/projects/ci/pipeline_editor_controller.rb index 8c6e8f0e126..dbf3b2051fb 100644 --- a/app/controllers/projects/ci/pipeline_editor_controller.rb +++ b/app/controllers/projects/ci/pipeline_editor_controller.rb @@ -3,7 +3,8 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController before_action :check_can_collaborate! before_action do - push_frontend_feature_flag(:schema_linting, @project, default_enabled: :yaml) + push_frontend_feature_flag(:schema_linting, @project) + push_frontend_feature_flag(:pipeline_editor_file_tree, @project) end feature_category :pipeline_authoring diff --git a/app/controllers/projects/ci/secure_files_controller.rb b/app/controllers/projects/ci/secure_files_controller.rb index 5141d0188b0..59ddca19081 100644 --- a/app/controllers/projects/ci/secure_files_controller.rb +++ b/app/controllers/projects/ci/secure_files_controller.rb @@ -6,5 +6,6 @@ class Projects::Ci::SecureFilesController < Projects::ApplicationController feature_category :pipeline_authoring def show + render_404 unless Feature.enabled?(:ci_secure_files, project) end end diff --git a/app/controllers/projects/cluster_agents_controller.rb b/app/controllers/projects/cluster_agents_controller.rb index 282b9ef1fb7..3f759e5c18c 100644 --- a/app/controllers/projects/cluster_agents_controller.rb +++ b/app/controllers/projects/cluster_agents_controller.rb @@ -4,6 +4,7 @@ class Projects::ClusterAgentsController < Projects::ApplicationController before_action :authorize_can_read_cluster_agent! feature_category :kubernetes_management + urgency :low def show @agent_name = params[:name] diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 440375bf3c9..30d001d0ac5 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -6,7 +6,7 @@ class Projects::ClustersController < Clusters::ClustersController before_action do push_frontend_feature_flag(:prometheus_computed_alerts) - push_frontend_feature_flag(:show_gitlab_agent_feedback, type: :ops, default_enabled: :yaml) + push_frontend_feature_flag(:show_gitlab_agent_feedback, type: :ops) end layout 'project' diff --git a/app/controllers/projects/cycle_analytics/events_controller.rb b/app/controllers/projects/cycle_analytics/events_controller.rb index a1da8d4e91f..43b4cdbe9a8 100644 --- a/app/controllers/projects/cycle_analytics/events_controller.rb +++ b/app/controllers/projects/cycle_analytics/events_controller.rb @@ -12,6 +12,7 @@ module Projects before_action :authorize_read_merge_request!, only: [:code, :review] feature_category :planning_analytics + urgency :low def issue render_events(cycle_analytics[:issue].events) diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb index dc6a9a73d9e..6160dafb177 100644 --- a/app/controllers/projects/cycle_analytics_controller.rb +++ b/app/controllers/projects/cycle_analytics_controller.rb @@ -14,6 +14,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController track_redis_hll_event :show, name: 'p_analytics_valuestream' feature_category :planning_analytics + urgency :low before_action do push_licensed_feature(:cycle_analytics_for_groups) if project.licensed_feature_available?(:cycle_analytics_for_groups) diff --git a/app/controllers/projects/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb index ce25f86d692..96afe9dbb9f 100644 --- a/app/controllers/projects/deploy_keys_controller.rb +++ b/app/controllers/projects/deploy_keys_controller.rb @@ -11,6 +11,7 @@ class Projects::DeployKeysController < Projects::ApplicationController layout 'project_settings' feature_category :continuous_delivery + urgency :low def index respond_to do |format| diff --git a/app/controllers/projects/deploy_tokens_controller.rb b/app/controllers/projects/deploy_tokens_controller.rb index 42c2d8b17f1..ed77fa2fee6 100644 --- a/app/controllers/projects/deploy_tokens_controller.rb +++ b/app/controllers/projects/deploy_tokens_controller.rb @@ -4,6 +4,7 @@ class Projects::DeployTokensController < Projects::ApplicationController before_action :authorize_admin_project! feature_category :continuous_delivery + urgency :low def revoke @token = @project.deploy_tokens.find(params[:id]) diff --git a/app/controllers/projects/deployments_controller.rb b/app/controllers/projects/deployments_controller.rb index 231684427fb..bebade1b21b 100644 --- a/app/controllers/projects/deployments_controller.rb +++ b/app/controllers/projects/deployments_controller.rb @@ -4,6 +4,7 @@ class Projects::DeploymentsController < Projects::ApplicationController before_action :authorize_read_deployment! feature_category :continuous_delivery + urgency :low # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb index 9f7d47b95f3..a61930d4b99 100644 --- a/app/controllers/projects/discussions_controller.rb +++ b/app/controllers/projects/discussions_controller.rb @@ -10,6 +10,7 @@ class Projects::DiscussionsController < Projects::ApplicationController before_action :authorize_resolve_discussion!, only: [:resolve, :unresolve] feature_category :team_planning + urgency :low def resolve Discussions::ResolveService.new(project, current_user, one_or_more_discussions: discussion).execute diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index 8e81e75ad13..1a2c0d64d19 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -24,9 +24,13 @@ class Projects::EnvironmentsController < Projects::ApplicationController before_action :environment, only: [:show, :edit, :update, :stop, :terminal, :terminal_websocket_authorize, :metrics, :cancel_auto_stop] before_action :verify_api_request!, only: :terminal_websocket_authorize before_action :expire_etag_cache, only: [:index], unless: -> { request.format.json? } + before_action do + push_frontend_feature_flag(:monitor_logging, project) + end after_action :expire_etag_cache, only: [:cancel_auto_stop] feature_category :continuous_delivery + urgency :low def index @project = ProjectPresenter.new(project, current_user: current_user) @@ -73,7 +77,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController # rubocop: enable CodeReuse/ActiveRecord def show - @deployments = environment.deployments.ordered.page(params[:page]) + @deployments = deployments end def new @@ -202,6 +206,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController private + def deployments + environment.deployments.ordered.page(params[:page]) + end + def verify_api_request! Gitlab::Workhorse.verify_api_request!(request.headers) end diff --git a/app/controllers/projects/feature_flags_clients_controller.rb b/app/controllers/projects/feature_flags_clients_controller.rb index 9a1f8932a27..2652345fc5a 100644 --- a/app/controllers/projects/feature_flags_clients_controller.rb +++ b/app/controllers/projects/feature_flags_clients_controller.rb @@ -5,6 +5,7 @@ class Projects::FeatureFlagsClientsController < Projects::ApplicationController before_action :feature_flags_client feature_category :feature_flags + urgency :low def reset_token feature_flags_client.reset_token! diff --git a/app/controllers/projects/feature_flags_controller.rb b/app/controllers/projects/feature_flags_controller.rb index 7c0da8f8a24..1d1fe91ad70 100644 --- a/app/controllers/projects/feature_flags_controller.rb +++ b/app/controllers/projects/feature_flags_controller.rb @@ -11,6 +11,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController before_action :feature_flag, only: [:edit, :update, :destroy] feature_category :feature_flags + urgency :low def index @feature_flags = FeatureFlagsFinder diff --git a/app/controllers/projects/feature_flags_user_lists_controller.rb b/app/controllers/projects/feature_flags_user_lists_controller.rb index fd81321924a..023eb51cc94 100644 --- a/app/controllers/projects/feature_flags_user_lists_controller.rb +++ b/app/controllers/projects/feature_flags_user_lists_controller.rb @@ -5,6 +5,7 @@ class Projects::FeatureFlagsUserListsController < Projects::ApplicationControlle before_action :user_list, only: [:edit, :show] feature_category :feature_flags + urgency :low def index end diff --git a/app/controllers/projects/graphs_controller.rb b/app/controllers/projects/graphs_controller.rb index 606f6ac7941..63309cce1e5 100644 --- a/app/controllers/projects/graphs_controller.rb +++ b/app/controllers/projects/graphs_controller.rb @@ -15,6 +15,7 @@ class Projects::GraphsController < Projects::ApplicationController urgency :low, [:show] feature_category :continuous_integration, [:ci] + urgency :low, [:ci] def show respond_to do |format| diff --git a/app/controllers/projects/imports_controller.rb b/app/controllers/projects/imports_controller.rb index 3b3f9bdcf6b..41daeddcf7f 100644 --- a/app/controllers/projects/imports_controller.rb +++ b/app/controllers/projects/imports_controller.rb @@ -12,6 +12,7 @@ class Projects::ImportsController < Projects::ApplicationController before_action :redirect_if_no_import, only: :show feature_category :importers + urgency :low def new end diff --git a/app/controllers/projects/incident_management/pager_duty_incidents_controller.rb b/app/controllers/projects/incident_management/pager_duty_incidents_controller.rb index 408652b4b9e..f1e518abf48 100644 --- a/app/controllers/projects/incident_management/pager_duty_incidents_controller.rb +++ b/app/controllers/projects/incident_management/pager_duty_incidents_controller.rb @@ -11,6 +11,7 @@ module Projects prepend_before_action :project_without_auth feature_category :incident_management + urgency :low def create result = webhook_processor.execute(params[:token]) diff --git a/app/controllers/projects/incidents_controller.rb b/app/controllers/projects/incidents_controller.rb index dd1e51bb9bd..fd7ba7b5460 100644 --- a/app/controllers/projects/incidents_controller.rb +++ b/app/controllers/projects/incidents_controller.rb @@ -7,11 +7,12 @@ class Projects::IncidentsController < Projects::ApplicationController before_action :authorize_read_issue! before_action :load_incident, only: [:show] before_action do - push_frontend_feature_flag(:incident_escalations, @project, default_enabled: :yaml) - push_frontend_feature_flag(:incident_timeline, @project, default_enabled: :yaml) + push_frontend_feature_flag(:incident_escalations, @project) + push_frontend_feature_flag(:incident_timeline, @project) end feature_category :incident_management + urgency :low def index end diff --git a/app/controllers/projects/issue_links_controller.rb b/app/controllers/projects/issue_links_controller.rb index e8c3110574f..956557457fa 100644 --- a/app/controllers/projects/issue_links_controller.rb +++ b/app/controllers/projects/issue_links_controller.rb @@ -8,6 +8,7 @@ module Projects before_action :authorize_issue_link_association!, only: :destroy feature_category :team_planning + urgency :low private diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 46943e7214a..b65616fdb3c 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -39,16 +39,16 @@ class Projects::IssuesController < Projects::ApplicationController before_action :authorize_download_code!, only: [:related_branches] before_action do - push_frontend_feature_flag(:vue_issues_list, project&.group, default_enabled: :yaml) - push_frontend_feature_flag(:contacts_autocomplete, project&.group, default_enabled: :yaml) - push_frontend_feature_flag(:incident_timeline, project, default_enabled: :yaml) + push_frontend_feature_flag(:vue_issues_list, project&.group) + push_frontend_feature_flag(:contacts_autocomplete, project&.group) + push_frontend_feature_flag(:incident_timeline, project) end before_action only: :show do - 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) - push_frontend_feature_flag(:realtime_labels, project, default_enabled: :yaml) + push_frontend_feature_flag(:confidential_notes, project&.group) + push_frontend_feature_flag(:issue_assignees_widget, project) + push_frontend_feature_flag(:paginated_issue_discussions, project) + push_frontend_feature_flag(:realtime_labels, project) push_force_frontend_feature_flag(:work_items, project&.work_items_feature_flag_enabled?) end @@ -65,10 +65,18 @@ class Projects::IssuesController < Projects::ApplicationController :toggle_award_emoji, :mark_as_spam, :related_branches, :can_create_branch, :create_merge_request ] + urgency :low, [ + :index, :calendar, :show, :new, :create, :edit, :update, + :destroy, :move, :reorder, :designs, :toggle_subscription, + :discussions, :bulk_update, :realtime_changes, + :toggle_award_emoji, :mark_as_spam, :related_branches, + :can_create_branch, :create_merge_request + ] feature_category :service_desk, [:service_desk] urgency :low, [:service_desk] feature_category :importers, [:import_csv, :export_csv] + urgency :low, [:import_csv, :export_csv] attr_accessor :vulnerability_id @@ -252,7 +260,7 @@ class Projects::IssuesController < Projects::ApplicationController def vue_issues_list? action_name.to_sym == :index && html_request? && - Feature.enabled?(:vue_issues_list, project&.group, default_enabled: :yaml) + Feature.enabled?(:vue_issues_list, project&.group) end def sorting_field diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index 0f6cf97d69d..8c9f82b9dc1 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -21,13 +21,14 @@ class Projects::JobsController < Projects::ApplicationController before_action :push_jobs_table_vue_search, only: [:index] before_action do - push_frontend_feature_flag(:infinitely_collapsible_sections, @project, default_enabled: :yaml) - push_frontend_feature_flag(:trigger_job_retry_action, @project, default_enabled: :yaml) + push_frontend_feature_flag(:infinitely_collapsible_sections, @project) + push_frontend_feature_flag(:trigger_job_retry_action, @project) end layout 'project' feature_category :continuous_integration + urgency :low def index # We need all builds for tabs counters @@ -140,7 +141,7 @@ class Projects::JobsController < Projects::ApplicationController end def raw - if @build.trace.archived_trace_exist? + if @build.trace.archived? workhorse_set_content_type! send_upload(@build.job_artifacts_trace.file, send_params: raw_send_params, @@ -261,10 +262,10 @@ class Projects::JobsController < Projects::ApplicationController end def push_jobs_table_vue - push_frontend_feature_flag(:jobs_table_vue, @project, default_enabled: :yaml) + push_frontend_feature_flag(:jobs_table_vue, @project) end def push_jobs_table_vue_search - push_frontend_feature_flag(:jobs_table_vue_search, @project, default_enabled: :yaml) + push_frontend_feature_flag(:jobs_table_vue_search, @project) end end diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 814081194d6..8ec2cbb41e9 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -15,6 +15,7 @@ class Projects::LabelsController < Projects::ApplicationController respond_to :js, :html feature_category :team_planning + urgency :low def index respond_to do |format| diff --git a/app/controllers/projects/learn_gitlab_controller.rb b/app/controllers/projects/learn_gitlab_controller.rb index b9f9a1810b7..61e4a1812ba 100644 --- a/app/controllers/projects/learn_gitlab_controller.rb +++ b/app/controllers/projects/learn_gitlab_controller.rb @@ -7,6 +7,7 @@ class Projects::LearnGitlabController < Projects::ApplicationController before_action :enable_video_tutorials_continuous_onboarding_experiment feature_category :users + urgency :low, [:index] def index end diff --git a/app/controllers/projects/logs_controller.rb b/app/controllers/projects/logs_controller.rb index a4bdbc827e0..63d8981ef38 100644 --- a/app/controllers/projects/logs_controller.rb +++ b/app/controllers/projects/logs_controller.rb @@ -10,6 +10,8 @@ module Projects feature_category :logging def index + return render_404 unless Feature.enabled?(:monitor_logging, project) + if environment || cluster render :index else @@ -28,7 +30,6 @@ module Projects private def render_logs(service, permitted_params) - ::Gitlab::UsageCounters::PodLogs.increment(project.id) ::Gitlab::PollingInterval.set_header(response, interval: 3_000) result = service.new(cluster, namespace, params: permitted_params).execute diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 03bb132fe47..458df40ece1 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -33,20 +33,25 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo before_action only: [:show] do push_frontend_feature_flag(:file_identifier_hash) - push_frontend_feature_flag(:merge_request_widget_graphql, project, default_enabled: :yaml) + push_frontend_feature_flag(:merge_request_widget_graphql, project) push_frontend_feature_flag(:core_security_mr_widget_counts, project) - push_frontend_feature_flag(:paginated_notes, project, default_enabled: :yaml) - push_frontend_feature_flag(:confidential_notes, project, default_enabled: :yaml) - push_frontend_feature_flag(:restructured_mr_widget, project, default_enabled: :yaml) - push_frontend_feature_flag(:refactor_mr_widgets_extensions, project, default_enabled: :yaml) - push_frontend_feature_flag(:rebase_without_ci_ui, project, default_enabled: :yaml) - push_frontend_feature_flag(:secure_vulnerability_training, project, default_enabled: :yaml) - push_frontend_feature_flag(:issue_assignees_widget, @project, default_enabled: :yaml) - push_frontend_feature_flag(:realtime_labels, project, default_enabled: :yaml) + push_frontend_feature_flag(:paginated_notes, project) + push_frontend_feature_flag(:confidential_notes, project) + push_frontend_feature_flag(:restructured_mr_widget, project) + push_frontend_feature_flag(:refactor_mr_widgets_extensions, project) + push_frontend_feature_flag(:refactor_mr_widget_test_summary, project) + push_frontend_feature_flag(:rebase_without_ci_ui, project) + push_frontend_feature_flag(:issue_assignees_widget, @project) + push_frontend_feature_flag(:realtime_labels, project) + push_frontend_feature_flag(:updated_diff_expansion_buttons, project) + push_frontend_feature_flag(:mr_attention_requests, current_user) + push_frontend_feature_flag(:updated_mr_header, project) + push_frontend_feature_flag(:remove_diff_header_icons, project) + push_frontend_feature_flag(:moved_mr_sidebar, project) end before_action do - push_frontend_feature_flag(:permit_all_shared_groups_for_approval, @project, default_enabled: :yaml) + push_frontend_feature_flag(:permit_all_shared_groups_for_approval, @project) end around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions] @@ -81,12 +86,12 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo :rebase, :discussions, :pipelines, - :test_reports - ] - urgency :low, [ + :test_reports, :codequality_mr_diff_reports, - :codequality_reports + :codequality_reports, + :terraform_reports ] + urgency :low, [:pipeline_status, :pipelines, :exposed_artifacts] def index @merge_requests = @issuables diff --git a/app/controllers/projects/metrics_dashboard_controller.rb b/app/controllers/projects/metrics_dashboard_controller.rb index 3f10749602e..e305b018293 100644 --- a/app/controllers/projects/metrics_dashboard_controller.rb +++ b/app/controllers/projects/metrics_dashboard_controller.rb @@ -12,6 +12,7 @@ module Projects before_action do push_frontend_feature_flag(:prometheus_computed_alerts) push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate) + push_frontend_feature_flag(:monitor_logging, project) end feature_category :metrics diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb index b896e2543ff..744e45a0f9c 100644 --- a/app/controllers/projects/milestones_controller.rb +++ b/app/controllers/projects/milestones_controller.rb @@ -19,6 +19,7 @@ class Projects::MilestonesController < Projects::ApplicationController respond_to :html feature_category :team_planning + urgency :low def index @sort = params[:sort] || 'due_date_asc' diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 7322e08e62e..d24b232293b 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -12,6 +12,7 @@ class Projects::NotesController < Projects::ApplicationController before_action :authorize_resolve_note!, only: [:resolve, :unresolve] feature_category :team_planning + urgency :low def delete_attachment note.remove_attachment! diff --git a/app/controllers/projects/packages/infrastructure_registry_controller.rb b/app/controllers/projects/packages/infrastructure_registry_controller.rb index 99d75afc63a..f1410bf6043 100644 --- a/app/controllers/projects/packages/infrastructure_registry_controller.rb +++ b/app/controllers/projects/packages/infrastructure_registry_controller.rb @@ -6,6 +6,7 @@ module Projects include PackagesAccess feature_category :infrastructure_as_code + urgency :low def show @package = project.packages.find(params[:id]) diff --git a/app/controllers/projects/packages/packages_controller.rb b/app/controllers/projects/packages/packages_controller.rb index 969922266fa..f045bae5c96 100644 --- a/app/controllers/projects/packages/packages_controller.rb +++ b/app/controllers/projects/packages/packages_controller.rb @@ -6,6 +6,7 @@ module Projects include PackagesAccess feature_category :package_registry + urgency :low # The show action renders index to allow frontend routing to work on page refresh def show diff --git a/app/controllers/projects/pipeline_schedules_controller.rb b/app/controllers/projects/pipeline_schedules_controller.rb index f6171403667..fa38fb209f0 100644 --- a/app/controllers/projects/pipeline_schedules_controller.rb +++ b/app/controllers/projects/pipeline_schedules_controller.rb @@ -12,6 +12,7 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController before_action :authorize_admin_pipeline_schedule!, only: [:destroy] feature_category :continuous_integration + urgency :low # rubocop: disable CodeReuse/ActiveRecord def index diff --git a/app/controllers/projects/pipelines/application_controller.rb b/app/controllers/projects/pipelines/application_controller.rb index c147d697888..e9dc71a0f4a 100644 --- a/app/controllers/projects/pipelines/application_controller.rb +++ b/app/controllers/projects/pipelines/application_controller.rb @@ -11,6 +11,7 @@ module Projects before_action :authorize_read_pipeline! feature_category :continuous_integration + urgency :low private diff --git a/app/controllers/projects/pipelines/tests_controller.rb b/app/controllers/projects/pipelines/tests_controller.rb index 4daf700a8bd..8f0e20290fe 100644 --- a/app/controllers/projects/pipelines/tests_controller.rb +++ b/app/controllers/projects/pipelines/tests_controller.rb @@ -23,7 +23,7 @@ module Projects def show respond_to do |format| format.json do - if Feature.enabled?(:ci_test_report_artifacts_expired, project, default_enabled: :yaml) && pipeline.has_expired_test_reports? + if Feature.enabled?(:ci_test_report_artifacts_expired, project) && pipeline.has_expired_test_reports? render json: { errors: 'Test report artifacts have expired' }, status: :not_found else render json: TestSuiteSerializer diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 02f041637ba..94865024688 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -4,8 +4,11 @@ class Projects::PipelinesController < Projects::ApplicationController include ::Gitlab::Utils::StrongMemoize include RedisTracking - urgency :default, [:status] - urgency :low, [:index, :new, :builds, :show, :failures, :create, :stage, :retry, :dag, :cancel, :test_report] + urgency :low, [ + :index, :new, :builds, :show, :failures, :create, + :stage, :retry, :dag, :cancel, :test_report, + :charts, :config_variables, :destroy, :status + ] before_action :disable_query_limiting, only: [:create, :retry] before_action :pipeline, except: [:index, :new, :create, :charts, :config_variables] @@ -18,7 +21,9 @@ class Projects::PipelinesController < Projects::ApplicationController before_action :ensure_pipeline, only: [:show, :downloadable_artifacts] before_action do - push_frontend_feature_flag(:pipeline_tabs_vue, @project, default_enabled: :yaml) + push_frontend_feature_flag(:pipeline_tabs_vue, @project) + push_frontend_feature_flag(:downstream_retry_action, @project) + push_frontend_feature_flag(:failed_jobs_tab_vue, @project) end # Will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/225596 @@ -37,6 +42,23 @@ class Projects::PipelinesController < Projects::ApplicationController POLLING_INTERVAL = 10_000 + content_security_policy do |policy| + next if policy.directives.blank? + + default_script_src = policy.directives['script-src'] || policy.directives['default-src'] + script_src_values = Array.wrap(default_script_src) | ["'self'", "'unsafe-eval'", 'https://*.zuora.com'] + + default_frame_src = policy.directives['frame-src'] || policy.directives['default-src'] + frame_src_values = Array.wrap(default_frame_src) | ["'self'", 'https://*.zuora.com'] + + default_child_src = policy.directives['child-src'] || policy.directives['default-src'] + child_src_values = Array.wrap(default_child_src) | ["'self'", 'https://*.zuora.com'] + + policy.script_src(*script_src_values) + policy.frame_src(*frame_src_values) + policy.child_src(*child_src_values) + end + feature_category :continuous_integration, [ :charts, :show, :config_variables, :stage, :cancel, :retry, :builds, :dag, :failures, :status, @@ -127,12 +149,22 @@ class Projects::PipelinesController < Projects::ApplicationController end def builds - render_show + if Feature.enabled?(:pipeline_tabs_vue, project) + redirect_to pipeline_path(@pipeline, tab: 'builds') + else + render_show + end end def dag respond_to do |format| - format.html { render_show } + format.html do + if Feature.enabled?(:pipeline_tabs_vue, project) + redirect_to pipeline_path(@pipeline, tab: 'dag') + else + render_show + end + end format.json do render json: Ci::DagPipelineSerializer .new(project: @project, current_user: @current_user) @@ -142,7 +174,9 @@ class Projects::PipelinesController < Projects::ApplicationController end def failures - if @pipeline.failed_builds.present? + if Feature.enabled?(:pipeline_tabs_vue, project) + redirect_to pipeline_path(@pipeline, tab: 'failures') + elsif @pipeline.failed_builds.present? render_show else redirect_to pipeline_path(@pipeline) @@ -196,7 +230,13 @@ class Projects::PipelinesController < Projects::ApplicationController def test_report respond_to do |format| - format.html { render_show } + format.html do + if Feature.enabled?(:pipeline_tabs_vue, project) + redirect_to pipeline_path(@pipeline, tab: 'test_report') + else + render_show + end + end format.json do render json: TestReportSerializer .new(current_user: @current_user) diff --git a/app/controllers/projects/pipelines_settings_controller.rb b/app/controllers/projects/pipelines_settings_controller.rb index 6e08a889520..9adec4dcf00 100644 --- a/app/controllers/projects/pipelines_settings_controller.rb +++ b/app/controllers/projects/pipelines_settings_controller.rb @@ -4,6 +4,7 @@ class Projects::PipelinesSettingsController < Projects::ApplicationController before_action :authorize_admin_pipeline! feature_category :continuous_integration + urgency :low def show redirect_to project_settings_ci_cd_path(@project, params: params.to_unsafe_h) diff --git a/app/controllers/projects/product_analytics_controller.rb b/app/controllers/projects/product_analytics_controller.rb index 5db7585d8e0..c89cd52530a 100644 --- a/app/controllers/projects/product_analytics_controller.rb +++ b/app/controllers/projects/product_analytics_controller.rb @@ -54,6 +54,6 @@ class Projects::ProductAnalyticsController < Projects::ApplicationController end def feature_enabled! - render_404 unless Feature.enabled?(:product_analytics, @project, default_enabled: false) + render_404 unless Feature.enabled?(:product_analytics, @project) end end diff --git a/app/controllers/projects/project_members_controller.rb b/app/controllers/projects/project_members_controller.rb index 49618c89672..168e703c87d 100644 --- a/app/controllers/projects/project_members_controller.rb +++ b/app/controllers/projects/project_members_controller.rb @@ -9,6 +9,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access] feature_category :projects + urgency :low def index @sort = params[:sort].presence || sort_value_name diff --git a/app/controllers/projects/prometheus/alerts_controller.rb b/app/controllers/projects/prometheus/alerts_controller.rb index 7aebff13278..5e1b9570fa0 100644 --- a/app/controllers/projects/prometheus/alerts_controller.rb +++ b/app/controllers/projects/prometheus/alerts_controller.rb @@ -14,9 +14,10 @@ module Projects prepend_before_action :repository, :project_without_auth, only: [:notify] before_action :authorize_read_prometheus_alerts!, except: [:notify] - before_action :alert, only: [:update, :show, :destroy, :metrics_dashboard] + before_action :alert, only: [:show, :metrics_dashboard] feature_category :incident_management + urgency :low def index render json: serialize_as_json(alerts) @@ -37,68 +38,13 @@ module Projects end end - def create - @alert = create_service.execute - - if @alert.persisted? - schedule_prometheus_update! - - render json: serialize_as_json(@alert) - else - head :bad_request - end - end - - def update - if update_service.execute(alert) - schedule_prometheus_update! - - render json: serialize_as_json(alert) - else - head :bad_request - end - end - - def destroy - if destroy_service.execute(alert) - schedule_prometheus_update! - - head :ok - else - head :bad_request - end - end - private - def alerts_params - params.permit(:operator, :threshold, :environment_id, :prometheus_metric_id, :runbook_url) - end - def notify_service Projects::Prometheus::Alerts::NotifyService .new(project, params.permit!) end - def create_service - Projects::Prometheus::Alerts::CreateService - .new(project: project, current_user: current_user, params: alerts_params) - end - - def update_service - Projects::Prometheus::Alerts::UpdateService - .new(project: project, current_user: current_user, params: alerts_params) - end - - def destroy_service - Projects::Prometheus::Alerts::DestroyService - .new(project: project, current_user: current_user, params: nil) - end - - def schedule_prometheus_update! - ::Clusters::Applications::ScheduleUpdateService.new(application, project).execute - end - def serialize_as_json(alert_obj) serializer.represent(alert_obj) end @@ -123,10 +69,6 @@ module Projects }.reverse_merge(opts)) end - def application - @application ||= alert.environment.cluster_prometheus_adapter - end - def extract_alert_manager_token(request) Doorkeeper::OAuth::Token.from_bearer_authorization(request) end @@ -136,10 +78,6 @@ module Projects .find_by_full_path("#{params[:namespace_id]}/#{params[:project_id]}") end - def prometheus_alerts - project.prometheus_alerts.for_environment(params[:environment_id]) - end - def metrics_dashboard_params { embedded: true, diff --git a/app/controllers/projects/prometheus/metrics_controller.rb b/app/controllers/projects/prometheus/metrics_controller.rb index e61d357ce4e..c5778ba15f2 100644 --- a/app/controllers/projects/prometheus/metrics_controller.rb +++ b/app/controllers/projects/prometheus/metrics_controller.rb @@ -74,9 +74,9 @@ module Projects end def update - @metric = update_metrics_service(prometheus_metric).execute + @metric = prometheus_metric - if @metric.persisted? + if @metric.update(metrics_params) redirect_to edit_project_integration_path(project, ::Integrations::Prometheus), notice: _('Metric was successfully updated.') else diff --git a/app/controllers/projects/registry/application_controller.rb b/app/controllers/projects/registry/application_controller.rb index e7bf8c8e757..9a94de3859a 100644 --- a/app/controllers/projects/registry/application_controller.rb +++ b/app/controllers/projects/registry/application_controller.rb @@ -9,6 +9,7 @@ module Projects before_action :authorize_read_container_image! feature_category :container_registry + urgency :low private diff --git a/app/controllers/projects/releases/evidences_controller.rb b/app/controllers/projects/releases/evidences_controller.rb index 41e2ce81eb8..9f59898878c 100644 --- a/app/controllers/projects/releases/evidences_controller.rb +++ b/app/controllers/projects/releases/evidences_controller.rb @@ -8,6 +8,7 @@ module Projects before_action :authorize_read_release_evidence! feature_category :release_evidence + urgency :low def show respond_to do |format| diff --git a/app/controllers/projects/releases_controller.rb b/app/controllers/projects/releases_controller.rb index 19413d97d9d..1dfb71842bd 100644 --- a/app/controllers/projects/releases_controller.rb +++ b/app/controllers/projects/releases_controller.rb @@ -10,13 +10,20 @@ class Projects::ReleasesController < Projects::ApplicationController before_action :validate_suffix_path, :fetch_latest_tag, only: :latest_permalink feature_category :release_orchestration + urgency :low def index respond_to do |format| format.html do require_non_empty_project end - format.json { render json: releases } + format.json do + if Feature.enabled?(:remove_sha_from_releases_json, project) + render json: ReleaseSerializer.new.represent(releases) + else + render json: releases + end + end end end diff --git a/app/controllers/projects/runner_projects_controller.rb b/app/controllers/projects/runner_projects_controller.rb index b77ce070492..34ce8df202b 100644 --- a/app/controllers/projects/runner_projects_controller.rb +++ b/app/controllers/projects/runner_projects_controller.rb @@ -6,6 +6,7 @@ class Projects::RunnerProjectsController < Projects::ApplicationController layout 'project_settings' feature_category :runner + urgency :low def create @runner = Ci::Runner.find(params[:runner_project][:runner_id]) diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb index 0eda8e3352d..ba9576795ec 100644 --- a/app/controllers/projects/runners_controller.rb +++ b/app/controllers/projects/runners_controller.rb @@ -5,6 +5,7 @@ class Projects::RunnersController < Projects::ApplicationController before_action :runner, only: [:edit, :update, :destroy, :pause, :resume, :show] feature_category :runner + urgency :low def index redirect_to project_settings_ci_cd_path(@project, anchor: 'js-runners-settings') diff --git a/app/controllers/projects/security/configuration_controller.rb b/app/controllers/projects/security/configuration_controller.rb index cdb02047215..00a2a5d1193 100644 --- a/app/controllers/projects/security/configuration_controller.rb +++ b/app/controllers/projects/security/configuration_controller.rb @@ -42,7 +42,7 @@ module Projects end def unify_configuration_enabled? - Feature.enabled?(:unify_security_configuration, project, default_enabled: :yaml) + Feature.enabled?(:unify_security_configuration, project) end end end diff --git a/app/controllers/projects/serverless/functions_controller.rb b/app/controllers/projects/serverless/functions_controller.rb deleted file mode 100644 index 7352edaaab2..00000000000 --- a/app/controllers/projects/serverless/functions_controller.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -module Projects - module Serverless - class FunctionsController < Projects::ApplicationController - before_action :ensure_feature_enabled! - before_action :authorize_read_cluster! - - feature_category :not_owned # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned - - def index - respond_to do |format| - format.json do - functions = finder.execute.select do |function| - can?(@current_user, :read_cluster, function.cluster) - end - - serialized_functions = serialize_function(functions) - - render json: { - knative_installed: finder.knative_installed, - functions: serialized_functions - }.to_json - end - - format.html do - render - end - end - end - - def show - function = finder.service(params[:environment_id], params[:id]) - return not_found unless function && can?(@current_user, :read_cluster, function.cluster) - - @service = serialize_function(function) - return not_found if @service.nil? - - @prometheus = finder.has_prometheus?(params[:environment_id]) - - respond_to do |format| - format.json do - render json: @service - end - - format.html - end - end - - def metrics - respond_to do |format| - format.json do - metrics = finder.invocation_metrics(params[:environment_id], params[:id]) - - if metrics.nil? - head :no_content - else - render json: metrics - end - end - end - end - - private - - def finder - Projects::Serverless::FunctionsFinder.new(project) - end - - def serialize_function(function) - Projects::Serverless::ServiceSerializer.new(current_user: @current_user, project: project).represent(function) - end - - def ensure_feature_enabled! - render_404 unless Feature.enabled?(:deprecated_serverless, project, default_enabled: :yaml, type: :ops) - end - end - end -end diff --git a/app/controllers/projects/service_ping_controller.rb b/app/controllers/projects/service_ping_controller.rb index 368da8d1ef2..d8f1785d95e 100644 --- a/app/controllers/projects/service_ping_controller.rb +++ b/app/controllers/projects/service_ping_controller.rb @@ -3,7 +3,7 @@ class Projects::ServicePingController < Projects::ApplicationController before_action :authenticate_user! - feature_category :service_ping + feature_category :web_ide def web_ide_clientside_preview return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? @@ -17,6 +17,7 @@ class Projects::ServicePingController < Projects::ApplicationController return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? Gitlab::UsageDataCounters::WebIdeCounter.increment_previews_success_count + Gitlab::UsageDataCounters::EditorUniqueCounter.track_live_preview_edit_action(author: current_user) head(200) end diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 1321111faaf..8f83e34411b 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -10,8 +10,6 @@ class Projects::ServicesController < Projects::ApplicationController before_action :integration before_action :default_integration, only: [:edit, :update] before_action :web_hook_logs, only: [:edit, :update] - before_action :set_deprecation_notice_for_prometheus_integration, only: [:edit, :update] - before_action :redirect_deprecated_prometheus_integration, only: [:update] respond_to :html @@ -118,18 +116,6 @@ class Projects::ServicesController < Projects::ApplicationController .merge(errors: integration.errors.as_json) end - def redirect_deprecated_prometheus_integration - redirect_to edit_project_integration_path(project, integration) if integration.is_a?(::Integrations::Prometheus) && Feature.enabled?(:settings_operations_prometheus_service, project) - end - - def set_deprecation_notice_for_prometheus_integration - return if !integration.is_a?(::Integrations::Prometheus) || !Feature.enabled?(:settings_operations_prometheus_service, project) - - operations_link_start = "<a href=\"#{project_settings_operations_path(project)}\">" - message = s_('PrometheusService|You can now manage your Prometheus settings on the %{operations_link_start}Operations%{operations_link_end} page. Fields on this page have been deprecated.') % { operations_link_start: operations_link_start, operations_link_end: "</a>" } - flash.now[:alert] = message.html_safe - end - def use_inherited_settings?(attributes) default_integration && attributes[:inherit_from_id] == default_integration.id.to_s end diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb index 3f4d26bb6ec..ee50327be8f 100644 --- a/app/controllers/projects/settings/ci_cd_controller.rb +++ b/app/controllers/projects/settings/ci_cd_controller.rb @@ -18,6 +18,7 @@ module Projects helper_method :highlight_badge feature_category :continuous_integration + urgency :low def show if Feature.enabled?(:ci_pipeline_triggers_settings_vue_ui, @project) @@ -87,7 +88,7 @@ module Projects def permitted_project_params [ :runners_token, :builds_enabled, :build_allow_git_fetch, - :build_timeout_human_readable, :build_coverage_regex, :public_builds, + :build_timeout_human_readable, :public_builds, :ci_separated_caches, :auto_cancel_pending_pipelines, :ci_config_path, :auto_rollback_enabled, auto_devops_attributes: [:id, :domain, :enabled, :deploy_strategy], ci_cd_settings_attributes: [:default_git_depth, :forward_deployment_enabled] diff --git a/app/controllers/projects/settings/operations_controller.rb b/app/controllers/projects/settings/operations_controller.rb index 43c72b358db..d4126cbd708 100644 --- a/app/controllers/projects/settings/operations_controller.rb +++ b/app/controllers/projects/settings/operations_controller.rb @@ -17,6 +17,7 @@ module Projects helper_method :tracing_setting feature_category :incident_management + urgency :low def update result = ::Projects::Operations::UpdateService.new(project, current_user, update_params).execute @@ -133,7 +134,7 @@ module Projects # overridden in EE def permitted_project_params - project_params = { + { incident_management_setting_attributes: ::Gitlab::Tracking::IncidentManagement.tracking_keys.keys, metrics_setting_attributes: [:external_dashboard_url, :dashboard_timezone], @@ -149,12 +150,6 @@ module Projects grafana_integration_attributes: [:token, :grafana_url, :enabled], tracing_setting_attributes: [:external_url] } - - if Feature.enabled?(:settings_operations_prometheus_service, project) - project_params[:prometheus_integration_attributes] = [:manual_configuration, :api_url] - end - - project_params end end end diff --git a/app/controllers/projects/settings/packages_and_registries_controller.rb b/app/controllers/projects/settings/packages_and_registries_controller.rb index 8f0a19cfac5..0cd2bfa9695 100644 --- a/app/controllers/projects/settings/packages_and_registries_controller.rb +++ b/app/controllers/projects/settings/packages_and_registries_controller.rb @@ -9,6 +9,7 @@ module Projects before_action :packages_and_registries_settings_enabled! feature_category :package_registry + urgency :low def show end diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index a28c08e87cb..0fd2d56229a 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -12,7 +12,7 @@ module Projects feature_category :source_code_management, [:show, :cleanup] feature_category :continuous_delivery, [:create_deploy_token] - urgency :low, [:show] + urgency :low, [:show, :create_deploy_token] def show render_show diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb index 91f49fc4d66..bc857648a06 100644 --- a/app/controllers/projects/starrers_controller.rb +++ b/app/controllers/projects/starrers_controller.rb @@ -5,6 +5,8 @@ class Projects::StarrersController < Projects::ApplicationController feature_category :projects + urgency :low, [:index] + def index @starrers = UsersStarProjectsFinder.new(@project, params, current_user: @current_user).execute @sort = params[:sort].presence || sort_value_name diff --git a/app/controllers/projects/tags/releases_controller.rb b/app/controllers/projects/tags/releases_controller.rb index 8e5539f546b..b852673d82a 100644 --- a/app/controllers/projects/tags/releases_controller.rb +++ b/app/controllers/projects/tags/releases_controller.rb @@ -9,6 +9,7 @@ class Projects::Tags::ReleasesController < Projects::ApplicationController before_action :release feature_category :release_evidence + urgency :low def edit end diff --git a/app/controllers/projects/terraform_controller.rb b/app/controllers/projects/terraform_controller.rb index aef163c98c5..ed1783bb43d 100644 --- a/app/controllers/projects/terraform_controller.rb +++ b/app/controllers/projects/terraform_controller.rb @@ -4,6 +4,7 @@ class Projects::TerraformController < Projects::ApplicationController before_action :authorize_can_read_terraform_state! feature_category :infrastructure_as_code + urgency :low def index end diff --git a/app/controllers/projects/todos_controller.rb b/app/controllers/projects/todos_controller.rb index dafdeb4c9ef..bba1949a084 100644 --- a/app/controllers/projects/todos_controller.rb +++ b/app/controllers/projects/todos_controller.rb @@ -7,6 +7,7 @@ class Projects::TodosController < Projects::ApplicationController before_action :authenticate_user!, only: [:create] feature_category :team_planning + urgency :low private diff --git a/app/controllers/projects/tracings_controller.rb b/app/controllers/projects/tracings_controller.rb index 2bc0c590e8d..a4aac6aaa32 100644 --- a/app/controllers/projects/tracings_controller.rb +++ b/app/controllers/projects/tracings_controller.rb @@ -15,6 +15,7 @@ module Projects feature_category :tracing def show + render_404 unless Feature.enabled?(:monitor_tracing, @project) end private diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb index a70795f2065..ed14f66847c 100644 --- a/app/controllers/projects/tree_controller.rb +++ b/app/controllers/projects/tree_controller.rb @@ -17,9 +17,9 @@ class Projects::TreeController < Projects::ApplicationController before_action :authorize_edit_tree!, only: [:create_dir] before_action do - push_frontend_feature_flag(:lazy_load_commits, @project, default_enabled: :yaml) - push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml) - push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml) + push_frontend_feature_flag(:lazy_load_commits, @project) + push_frontend_feature_flag(:refactor_blob_viewer, @project) + push_frontend_feature_flag(:highlight_js, @project) push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks) end diff --git a/app/controllers/projects/triggers_controller.rb b/app/controllers/projects/triggers_controller.rb index eec35fcec8d..f43c7e75fee 100644 --- a/app/controllers/projects/triggers_controller.rb +++ b/app/controllers/projects/triggers_controller.rb @@ -9,6 +9,7 @@ class Projects::TriggersController < Projects::ApplicationController layout 'project_settings' feature_category :continuous_integration + urgency :low def index redirect_to project_settings_ci_cd_path(@project, anchor: 'js-pipeline-triggers') diff --git a/app/controllers/projects/uploads_controller.rb b/app/controllers/projects/uploads_controller.rb index e6e91231ba2..a364668ea5f 100644 --- a/app/controllers/projects/uploads_controller.rb +++ b/app/controllers/projects/uploads_controller.rb @@ -23,6 +23,10 @@ class Projects::UploadsController < Projects::ApplicationController FileUploader end + def target_project + model + end + def find_model return @project if @project diff --git a/app/controllers/projects/work_items_controller.rb b/app/controllers/projects/work_items_controller.rb index d39664e1deb..27857dac2b7 100644 --- a/app/controllers/projects/work_items_controller.rb +++ b/app/controllers/projects/work_items_controller.rb @@ -6,6 +6,7 @@ class Projects::WorkItemsController < Projects::ApplicationController end feature_category :team_planning + urgency :low def index render_404 unless project&.work_items_feature_flag_enabled? |