Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Jun 12, 2024
1 parent 18eaf3f commit c74e66d
Show file tree
Hide file tree
Showing 35 changed files with 1,361 additions and 26 deletions.
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1198,3 +1198,10 @@ Gitlab/TokenWithoutPrefix:
- 'lib/**/*'
- 'ee/app/**/*'
- 'ee/lib/**/*'

Rails/StrongParams:
Enabled: true
SafeAutoCorrect: false
Include:
- 'app/controllers/**/*'
- 'ee/app/controllers/**/*'
384 changes: 384 additions & 0 deletions .rubocop_todo/rails/strong_params.yml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .rubocop_todo/rspec/feature_category.yml
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,6 @@ RSpec/FeatureCategory:
- 'ee/spec/models/boards/epic_list_user_preference_spec.rb'
- 'ee/spec/models/boards/epic_user_preference_spec.rb'
- 'ee/spec/models/ci/daily_build_group_report_result_spec.rb'
- 'ee/spec/models/ci/sources/project_spec.rb'
- 'ee/spec/models/ci/subscriptions/project_spec.rb'
- 'ee/spec/models/commit_spec.rb'
- 'ee/spec/models/compliance_management/compliance_framework/project_settings_spec.rb'
Expand Down
2 changes: 1 addition & 1 deletion GITALY_SERVER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
676cff8cddb9bf142cf00a712db75dbb69563b7e
61c24a998b4844376e589f5e5a5c328754875101
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export default {
GlModal: GlModalDirective,
GlTooltip: GlTooltipDirective,
},
inject: ['wikiPath', 'cloneSshUrl', 'cloneHttpUrl'],
inject: {
wikiPath: { default: null },
cloneSshUrl: { default: null },
cloneHttpUrl: { default: null },
},
props: {
showAsDropdownItem: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export default {
directives: {
GlTooltip: GlTooltipDirective,
},
inject: ['newUrl', 'historyUrl', 'templatesUrl', 'pagePersisted'],
inject: {
newUrl: { default: null },
historyUrl: { default: null },
templatesUrl: { default: null },
pagePersisted: { default: null },
},
i18n: {
wikiActions: s__('Wiki|Wiki actions'),
},
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/projects/issue_links_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ class IssueLinksController < Projects::ApplicationController

before_action :authorize_admin_issue_link!, only: [:create, :destroy]
before_action :authorize_issue_link_association!, only: :destroy
before_action :disable_query_limit!, only: :create

feature_category :team_planning
urgency :low

private

def disable_query_limit!
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/467087')
end

def authorize_admin_issue_link!
render_403 unless can?(current_user, :admin_issue_link, issue)
end
Expand Down
1 change: 1 addition & 0 deletions app/models/concerns/ci/partitionable/testing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Testing
Ci::PipelineMetadata
Ci::PipelineVariable
Ci::Sources::Pipeline
Ci::Sources::Project
Ci::Stage
Ci::UnitTestFailure
].freeze
Expand Down
16 changes: 16 additions & 0 deletions config/events/fail_arkose_challenge_during_registration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
description: Tracks when user fails arkose labs challenge during registration
internal_events: true
action: fail_arkose_challenge_during_registration
identifiers:
- user
product_group: acquisition
milestone: '17.1'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154803
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
key_path: redis_hll_counters.count_distinct_user_id_from_fail_arkose_challenge_during_registration_monthly
description: Monthly count of unique users who fail arkose challenge during registration
product_group: acquisition
performance_indicator_type: []
value_type: number
status: active
milestone: '17.1'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154803
time_frame: 28d
data_source: internal_events
data_category: optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
events:
- name: fail_arkose_challenge_during_registration
unique: user.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
key_path: redis_hll_counters.count_distinct_user_id_from_fail_arkose_challenge_during_registration_weekly
description: Weekly count of unique users who fail arkose challenge during registration
product_group: acquisition
performance_indicator_type: []
value_type: number
status: active
milestone: '17.1'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154803
time_frame: 7d
data_source: internal_events
data_category: optional
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
events:
- name: fail_arkose_challenge_during_registration
unique: user.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

class AddPartitionIdToSourcesProjects < Gitlab::Database::Migration[2.2]
milestone '17.1'

def change
add_column(:ci_sources_projects, :partition_id, :bigint, default: 100, null: false)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

class BackfillPartitionIdCiSourcesProjects < Gitlab::Database::Migration[2.2]
restrict_gitlab_migration gitlab_schema: :gitlab_ci
milestone '17.1'

BATCH_SIZE = 100

class CiSourcesProject < MigrationRecord
self.table_name = 'ci_sources_projects'

include EachBatch
end

def up
CiSourcesProject.each_batch(of: BATCH_SIZE) do |batch|
batch
.where('ci_sources_projects.pipeline_id = ci_pipelines.id')
.update_all('partition_id = ci_pipelines.partition_id FROM ci_pipelines')
end
end

def down
# no-op
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

class DropIndexBoardsEpicUserPreferencesOnBoardId < Gitlab::Database::Migration[2.2]
milestone '17.1'

disable_ddl_transaction!

TABLE_NAME = :boards_epic_user_preferences
INDEX_NAME = :index_boards_epic_user_preferences_on_board_id
COLUMN_NAMES = [:board_id]

def up
remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
end

def down
add_concurrent_index(TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME)
end
end
1 change: 1 addition & 0 deletions db/schema_migrations/20240522014201
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63c31d4a52ee1a2186d05424c33faab76e4286d2bd58bcf6920d124c3ac031a8
1 change: 1 addition & 0 deletions db/schema_migrations/20240522014240
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e7ec4ddce32fbbb9ada1d61312bf39b27c1b3190b0a41ed8621ad3351b398290
1 change: 1 addition & 0 deletions db/schema_migrations/20240605232756
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12f08c8529cd29fea12a4f39138c1df9349ab46d0e646a5c8ead9b60a569f9ef
5 changes: 2 additions & 3 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7831,7 +7831,8 @@ ALTER SEQUENCE ci_sources_pipelines_id_seq OWNED BY ci_sources_pipelines.id;
CREATE TABLE ci_sources_projects (
id bigint NOT NULL,
pipeline_id bigint NOT NULL,
source_project_id bigint NOT NULL
source_project_id bigint NOT NULL,
partition_id bigint DEFAULT 100 NOT NULL
);

CREATE SEQUENCE ci_sources_projects_id_seq
Expand Down Expand Up @@ -25471,8 +25472,6 @@ CREATE INDEX index_boards_epic_lists_on_group_id ON boards_epic_lists USING btre

CREATE INDEX index_boards_epic_lists_on_label_id ON boards_epic_lists USING btree (label_id);

CREATE INDEX index_boards_epic_user_preferences_on_board_id ON boards_epic_user_preferences USING btree (board_id);

CREATE UNIQUE INDEX index_boards_epic_user_preferences_on_board_user_epic_unique ON boards_epic_user_preferences USING btree (board_id, user_id, epic_id);

CREATE INDEX index_boards_epic_user_preferences_on_epic_id ON boards_epic_user_preferences USING btree (epic_id);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c74e66d

Please sign in to comment.