Skip to content

Commit 3e14ece

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 8b2e35f commit 3e14ece

File tree

254 files changed

+2118
-886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+2118
-886
lines changed

.gitlab/ci/vendored-gems.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ include:
5353
gem_path_prefix: "vendor/gems/"
5454
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
5555
inputs:
56-
gem_name: "sidekiq-7.1.6"
56+
gem_name: "sidekiq-7.2.4"
5757
gem_path_prefix: "vendor/gems/"

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ end
279279
gem 'state_machines-activerecord', '~> 0.8.0' # rubocop:todo Gemfile/MissingFeatureCategory
280280

281281
# Background jobs
282-
gem 'sidekiq', path: 'vendor/gems/sidekiq-7.1.6', require: 'sidekiq', feature_category: :scalability
282+
gem 'sidekiq', path: 'vendor/gems/sidekiq-7.2.4', require: 'sidekiq', feature_category: :scalability
283283
gem 'sidekiq-cron', '~> 1.12.0', feature_category: :scalability
284284
gem 'gitlab-sidekiq-fetcher',
285285
path: 'vendor/gems/sidekiq-reliable-fetch',

Gemfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ PATH
194194
omniauth (~> 2.0)
195195

196196
PATH
197-
remote: vendor/gems/sidekiq-7.1.6
197+
remote: vendor/gems/sidekiq-7.2.4
198198
specs:
199-
sidekiq (7.1.6)
199+
sidekiq (7.2.4)
200200
concurrent-ruby (< 2)
201201
connection_pool (>= 2.3.0)
202202
rack (>= 2.2.4)
203-
redis-client (>= 0.14.0)
203+
redis-client (>= 0.19.0)
204204

205205
PATH
206206
remote: vendor/gems/sidekiq-reliable-fetch

Gemfile.next.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ PATH
194194
omniauth (~> 2.0)
195195

196196
PATH
197-
remote: vendor/gems/sidekiq-7.1.6
197+
remote: vendor/gems/sidekiq-7.2.4
198198
specs:
199-
sidekiq (7.1.6)
199+
sidekiq (7.2.4)
200200
concurrent-ruby (< 2)
201201
connection_pool (>= 2.3.0)
202202
rack (>= 2.2.4)
203-
redis-client (>= 0.14.0)
203+
redis-client (>= 0.19.0)
204204

205205
PATH
206206
remote: vendor/gems/sidekiq-reliable-fetch

app/assets/javascripts/access_tokens/components/new_access_token_app.vue

+13
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ export default {
5252
label() {
5353
return sprintf(this.$options.i18n.label, { accessTokenType: this.accessTokenType });
5454
},
55+
isNameOrScopesSet() {
56+
const urlParams = new URLSearchParams(window.location.search);
57+
58+
return urlParams.has('name') || urlParams.has('scopes');
59+
},
5560
},
5661
mounted() {
5762
/** @type {HTMLFormElement} */
@@ -61,6 +66,14 @@ export default {
6166
this.submitButton = this.form.querySelector(
6267
'button[type=submit][data-testid=create-token-button]',
6368
);
69+
70+
// If param is set, open form on page load.
71+
if (this.isNameOrScopesSet) {
72+
document.querySelectorAll('.js-token-card').forEach((el) => {
73+
el.querySelector('.js-add-new-token-form').style.display = 'block';
74+
el.querySelector('.js-toggle-button').style.display = 'none';
75+
});
76+
}
6477
},
6578
methods: {
6679
beforeDisplayResults() {

app/assets/javascripts/ci/pipelines_page/components/failure_widget/failed_job_details.vue

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export default {
149149
:loading="isLoadingAction"
150150
:title="$options.i18n.retry"
151151
:aria-label="$options.i18n.retry"
152+
data-testid="retry-button"
152153
@click.stop="retryJob"
153154
/>
154155
</span>

app/assets/javascripts/deploy_keys/components/keys_panel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default {
4343
:project-id="projectId"
4444
/>
4545
</template>
46-
<div v-else class="gl-new-card-empty gl-bg-gray-10 gl-p-5 gl-text-center">
46+
<div v-else class="gl-text-subtle gl-bg-gray-10 gl-p-5" data-testid="empty-state">
4747
{{ s__('DeployKeys|No deploy keys found, start by adding a new one above.') }}
4848
</div>
4949
</div>

app/assets/stylesheets/framework/gfm.scss

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
.gfm-project_member,
1212
.md a.gfm-project_member {
1313
padding: 0 2px;
14-
background-color: $blue-100;
14+
@apply gl-text-blue-700;
15+
@apply gl-bg-blue-100;
1516
border-radius: $gl-border-radius-base;
16-
color: $blue-700;
1717

1818
&.current-user {
19-
background-color: $orange-100;
19+
@apply gl-text-orange-800;
20+
@apply gl-bg-orange-100;
2021
}
2122
}
2223

app/assets/stylesheets/page_bundles/notes/_system_notes_v2.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@apply gl-text-blue-700;
3737

3838
&.current-user {
39-
@apply gl-text-orange-700;
39+
@apply gl-text-orange-800;
4040
}
4141
}
4242
}

app/models/ci/runner.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class Runner < Ci::ApplicationRecord
7272

7373
AVAILABLE_TYPES_LEGACY = %w[specific shared].freeze
7474
AVAILABLE_TYPES = runner_types.keys.freeze
75-
AVAILABLE_STATUSES = %w[active paused online offline never_contacted stale].freeze # TODO: Remove in %16.0: active, paused. Relevant issue: https://gitlab.com/gitlab-org/gitlab/-/issues/344648
75+
DEPRECATED_STATUSES = %w[active paused].freeze # TODO: Remove in REST v5. Relevant issue: https://gitlab.com/gitlab-org/gitlab/-/issues/344648
76+
AVAILABLE_STATUSES = (DEPRECATED_STATUSES + %w[online offline never_contacted stale]).freeze
7677
AVAILABLE_SCOPES = (AVAILABLE_TYPES_LEGACY + AVAILABLE_TYPES + AVAILABLE_STATUSES).freeze
7778

7879
FORM_EDITABLE = %i[description tag_list active run_untagged locked access_level maximum_timeout_human_readable].freeze

app/models/concerns/partitioned_table.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def partitioned_by(partitioning_key, strategy:, **kwargs)
3131
def _returning_columns_for_insert
3232
auto_populated_columns = []
3333
auto_populated_columns = super if Gitlab.next_rails?
34-
auto_populated_columns.empty? ? Array(primary_key) : auto_populated_columns
34+
auto_populated_columns + Array(primary_key)
3535
end
3636
end
3737
end

app/models/integration.rb

+35-17
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,27 @@ class Integration < ApplicationRecord
2121
INTEGRATION_NAMES = %w[
2222
asana assembla bamboo bugzilla buildkite campfire clickup confluence custom_issue_tracker
2323
datadog diffblue_cover discord drone_ci emails_on_push ewm external_wiki
24-
gitlab_slack_application hangouts_chat harbor irker jira jira_cloud_app matrix
24+
gitlab_slack_application hangouts_chat harbor irker jira matrix
2525
mattermost mattermost_slash_commands microsoft_teams packagist phorge pipelines_email
2626
pivotaltracker prometheus pumble pushover redmine slack slack_slash_commands squash_tm teamcity telegram
2727
unify_circuit webex_teams youtrack zentao
2828
].freeze
2929

30-
INSTANCE_SPECIFIC_INTEGRATION_NAMES = %w[
30+
# Integrations that can only be enabled on the instance-level
31+
INSTANCE_LEVEL_ONLY_INTEGRATION_NAMES = %w[
3132
beyond_identity
3233
].freeze
3334

34-
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/345677
35-
PROJECT_SPECIFIC_INTEGRATION_NAMES = %w[
35+
# Integrations that can only be enabled on the project-level
36+
PROJECT_LEVEL_ONLY_INTEGRATION_NAMES = %w[
3637
apple_app_store google_play jenkins
3738
].freeze
3839

40+
# Integrations that cannot be enabled on the instance-level
41+
PROJECT_AND_GROUP_LEVEL_ONLY_INTEGRATION_NAMES = %w[
42+
jira_cloud_app
43+
].freeze
44+
3945
# Fake integrations to help with local development.
4046
DEV_INTEGRATION_NAMES = %w[
4147
mock_ci mock_monitoring
@@ -134,7 +140,7 @@ def properties=(props)
134140
}
135141

136142
scope :for_instance, -> {
137-
types = available_integration_types(include_project_specific: false, include_instance_specific: true)
143+
types = available_integration_types(include_project_specific: false, include_group_specific: false)
138144
where(instance: true, type: types)
139145
}
140146

@@ -285,14 +291,18 @@ def self.event_description(event)
285291
end
286292

287293
def self.find_or_initialize_non_project_specific_integration(name, instance: false, group_id: nil)
288-
return unless name.in?(available_integration_names(include_project_specific: false,
294+
return unless name.in?(available_integration_names(
295+
include_project_specific: false,
296+
include_group_specific: group_id.present?,
289297
include_instance_specific: instance))
290298

291299
integration_name_to_model(name).find_or_initialize_by(instance: instance, group_id: group_id)
292300
end
293301

294302
def self.find_or_initialize_all_non_project_specific(scope, include_instance_specific: false)
295-
scope + build_nonexistent_integrations_for(scope, include_instance_specific: include_instance_specific)
303+
scope + build_nonexistent_integrations_for(scope,
304+
include_group_specific: !include_instance_specific,
305+
include_instance_specific: include_instance_specific)
296306
end
297307

298308
def self.build_nonexistent_integrations_for(...)
@@ -304,11 +314,12 @@ def self.build_nonexistent_integrations_for(...)
304314

305315
# Returns a list of integration types that do not exist in the given scope.
306316
# Example: ["AsanaService", ...]
307-
def self.nonexistent_integration_types_for(scope, include_instance_specific: false)
317+
def self.nonexistent_integration_types_for(scope, include_group_specific: false, include_instance_specific: false)
308318
# Using #map instead of #pluck to save one query count. This is because
309319
# ActiveRecord loaded the object here, so we don't need to query again later.
310320
available_integration_types(
311321
include_project_specific: false,
322+
include_group_specific: include_group_specific,
312323
include_instance_specific: include_instance_specific
313324
) - scope.map(&:type)
314325
end
@@ -317,12 +328,14 @@ def self.nonexistent_integration_types_for(scope, include_instance_specific: fal
317328
# Returns a list of available integration names.
318329
# Example: ["asana", ...]
319330
def self.available_integration_names(
320-
include_project_specific: true, include_dev: true, include_instance_specific: true, include_disabled: false
331+
include_project_specific: true, include_group_specific: true, include_instance_specific: true, include_dev: true,
332+
include_disabled: false
321333
)
322-
names = integration_names
323-
names += project_specific_integration_names if include_project_specific
324-
names += dev_integration_names if include_dev
325-
names += instance_specific_integration_names if include_instance_specific
334+
names = integration_names.dup
335+
names.concat(project_specific_integration_names) if include_project_specific
336+
names.concat(dev_integration_names) if include_dev
337+
names.concat(instance_specific_integration_names) if include_instance_specific
338+
names.concat(project_and_group_specific_integration_names) if include_project_specific || include_group_specific
326339
names -= disabled_integration_names unless include_disabled
327340

328341
names.sort_by(&:downcase)
@@ -336,13 +349,11 @@ def self.integration_names
336349
names.delete('gitlab_slack_application')
337350
end
338351

339-
names.delete('jira_cloud_app') unless Feature.enabled?(:enable_jira_connect_configuration) # rubocop:disable Gitlab/FeatureFlagWithoutActor -- flag must be global
340-
341352
names
342353
end
343354

344355
def self.instance_specific_integration_names
345-
INSTANCE_SPECIFIC_INTEGRATION_NAMES
356+
INSTANCE_LEVEL_ONLY_INTEGRATION_NAMES
346357
end
347358

348359
def self.instance_specific_integration_types
@@ -356,7 +367,7 @@ def self.dev_integration_names
356367
end
357368

358369
def self.project_specific_integration_names
359-
names = PROJECT_SPECIFIC_INTEGRATION_NAMES.dup
370+
names = PROJECT_LEVEL_ONLY_INTEGRATION_NAMES.dup
360371

361372
if Feature.disabled?(:gitlab_for_slack_app_instance_and_group_level, type: :beta) &&
362373
(Gitlab::CurrentSettings.slack_app_enabled || Gitlab.dev_or_test_env?)
@@ -366,6 +377,13 @@ def self.project_specific_integration_names
366377
names
367378
end
368379

380+
def self.project_and_group_specific_integration_names
381+
names = PROJECT_AND_GROUP_LEVEL_ONLY_INTEGRATION_NAMES.dup
382+
names.delete('jira_cloud_app') unless Feature.enabled?(:enable_jira_connect_configuration) # rubocop:disable Gitlab/FeatureFlagWithoutActor -- flag must be global
383+
names
384+
end
385+
private_class_method :project_and_group_specific_integration_names
386+
369387
# Returns a list of available integration types.
370388
# Example: ["Integrations::Asana", ...]
371389
def self.available_integration_types(...)

app/models/namespace_setting.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class NamespaceSetting < ApplicationRecord
1818

1919
enum jobs_to_be_done: { basics: 0, move_repository: 1, code_storage: 2, exploring: 3, ci: 4, other: 5 }, _suffix: true
2020
enum enabled_git_access_protocol: { all: 0, ssh: 1, http: 2 }, _suffix: true
21-
enum seat_control: { off: 0, user_cap: 1 }, _prefix: true
21+
enum seat_control: { off: 0, user_cap: 1, block_overages: 2 }, _prefix: true
2222

2323
attribute :default_branch_protection_defaults, default: -> { {} }
2424

app/views/user_settings/personal_access_tokens/index.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.settings-sticky-header-inner
1010
%h4.gl-my-0
1111
= page_title
12-
%p.gl-text-secondary
12+
%p.gl-text-subtle
1313
= s_('AccessTokens|You can generate a personal access token for each application you use that needs access to the GitLab API.')
1414
= s_('AccessTokens|You can also use personal access tokens to authenticate against Git over HTTP.')
1515
= s_('AccessTokens|They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.')

config/application.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
module Gitlab
2121
class Application < Rails::Application
2222
config.load_defaults 7.0
23+
2324
# This section contains configuration from Rails upgrades to override the new defaults so that we
2425
# keep existing behavior.
2526
#
@@ -37,7 +38,6 @@ class Application < Rails::Application
3738
config.active_record.automatic_scope_inversing = nil # New default is true
3839
config.active_record.verify_foreign_keys_for_fixtures = nil # New default is true
3940
config.active_record.partial_inserts = true # New default is false
40-
config.active_support.cache_format_version = nil # New default is 7.0
4141
config.active_support.disable_to_s_conversion = false # New default is true
4242
config.active_support.executor_around_test_case = nil # New default is true
4343
config.active_support.isolation_level = nil # New default is thread
@@ -46,7 +46,6 @@ class Application < Rails::Application
4646

4747
# Rails 6.1
4848
config.action_dispatch.cookies_same_site_protection = nil # New default is :lax
49-
ActiveSupport.utc_to_local_returns_utc_offset_times = false
5049
config.action_view.preload_links_header = false
5150

5251
# Rails 5.2
@@ -90,6 +89,11 @@ class Application < Rails::Application
9089
require_dependency Rails.root.join('lib/gitlab/patch/old_redis_cache_store')
9190
require_dependency Rails.root.join('lib/gitlab/exceptions_app')
9291

92+
unless ::Gitlab.next_rails?
93+
config.active_support.cache_format_version = nil
94+
ActiveSupport.utc_to_local_returns_utc_offset_times = false
95+
end
96+
9397
config.exceptions_app = Gitlab::ExceptionsApp.new(Gitlab.jh? ? Rails.root.join('jh/public') : Rails.public_path)
9498

9599
# This preload is required to:

config/gitlab_loose_foreign_keys.yml

-4
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,6 @@ security_scans:
440440
- table: projects
441441
column: project_id
442442
on_delete: async_delete
443-
security_trainings:
444-
- table: projects
445-
column: project_id
446-
on_delete: async_delete
447443
snippets:
448444
- table: organizations
449445
column: organization_id

config/initializers/sidekiq.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def load_cron_jobs!
3838
Sidekiq.strict_args!(strict_args_mode)
3939

4040
# Perform version check before configuring server with the custome scheduled job enqueue class
41-
unless Gem::Version.new(Sidekiq::VERSION) == Gem::Version.new('7.1.6')
41+
unless Gem::Version.new(Sidekiq::VERSION) == Gem::Version.new('7.2.4')
4242
raise 'New version of Sidekiq detected, please either update the version for this check ' \
4343
'and update Gitlab::SidekiqSharding::ScheduledEnq is compatible.'
4444
end

db/docs/security_training_providers.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ feature_categories:
77
description: Stores information about the available security training providers
88
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78195
99
milestone: '14.7'
10-
gitlab_schema: gitlab_sec
11-
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/476672
10+
gitlab_schema: gitlab_main_clusterwide

db/docs/security_trainings.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ feature_categories:
77
description: Stores information about the primary security training provider for a given project
88
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78195
99
milestone: '14.7'
10-
gitlab_schema: gitlab_sec
10+
gitlab_schema: gitlab_main_cell
1111
allow_cross_foreign_keys:
1212
- gitlab_main_clusterwide
1313
sharding_key:

0 commit comments

Comments
 (0)