forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latest changes from gitlab-org/gitlab@master
- Loading branch information
GitLab Bot
committed
Jun 12, 2024
1 parent
c8eaa54
commit d2ce6b4
Showing
41 changed files
with
901 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...derisk/respawn_assign_resource_worker.yml → ...m_derisk/graphql_minimal_auth_methods.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
name: respawn_assign_resource_worker | ||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/436988 | ||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147313 | ||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/450793 | ||
milestone: '16.11' | ||
group: group::environments | ||
name: graphql_minimal_auth_methods | ||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/438462 | ||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150407 | ||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/444929 | ||
milestone: '17.0' | ||
group: group::authentication | ||
type: gitlab_com_derisk | ||
default_enabled: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
db/post_migrate/20240611102931_set_missing_traversal_ids_for_vulnerability_reads.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# frozen_string_literal: true | ||
|
||
class SetMissingTraversalIdsForVulnerabilityReads < Gitlab::Database::Migration[2.2] | ||
disable_ddl_transaction! | ||
milestone '17.1' | ||
|
||
restrict_gitlab_migration gitlab_schema: :gitlab_main | ||
|
||
class VulnerabilityRead < MigrationRecord | ||
include EachBatch | ||
|
||
self.table_name = 'vulnerability_reads' | ||
end | ||
|
||
def up | ||
return unless Gitlab.com? | ||
|
||
VulnerabilityRead.where(traversal_ids: [], archived: false).each_batch(of: 50) do |batch| | ||
vulnerability_ids = batch.pluck(:vulnerability_id) | ||
|
||
update_records(vulnerability_ids) | ||
end | ||
end | ||
|
||
def down | ||
# no-op | ||
end | ||
|
||
private | ||
|
||
def update_records(vulnerability_ids) | ||
execute(<<~SQL) | ||
UPDATE | ||
vulnerability_reads | ||
SET | ||
traversal_ids = namespaces.traversal_ids | ||
FROM | ||
namespaces | ||
WHERE | ||
vulnerability_reads.vulnerability_id IN (#{vulnerability_ids.join(', ')}) AND | ||
namespaces.id = vulnerability_reads.namespace_id | ||
SQL | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
84fd9d37f90dc9d6d76e537ad67451f721d5c1e52de0366111efc173678743c8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.