Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2025-07-21 00:11:49 +00:00
parent cba6b80657
commit 91763dcb69
15 changed files with 38 additions and 23 deletions

View File

@ -9,5 +9,4 @@ description: Per month CI usage data at the runner and project level meant to st
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171336
milestone: '17.9'
gitlab_schema: gitlab_ci
exempt_from_sharding: true
notes: Exempted from sharding because Dedicated only.
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/553104

View File

@ -7,7 +7,7 @@ feature_categories:
description: Tracks progress when migrating to the GitLab agent from a certificate based cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/179324
milestone: '17.9'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because parent table is scheduled for removal
table_size: small

View File

@ -7,7 +7,7 @@ feature_categories:
description: "(Deprecated) Join table between 'clusters' and 'namespaces'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0e15eec86d83cbdfefe17966bf5c02e4d419a34d
milestone: '11.5'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because Table is scheduled for removal
table_size: small

View File

@ -7,7 +7,7 @@ feature_categories:
description: "(Deprecated) Join table between 'clusters' and 'projects'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because Table is scheduled for removal
table_size: small

View File

@ -7,7 +7,7 @@ feature_categories:
description: "(Deprecated) Join table between `deployments` and `clusters`"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24235
milestone: '12.8'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because Table is scheduled for removal
table_size: small

View File

@ -5,6 +5,5 @@ feature_categories:
description: Store MR ids for exclusion during migrations
introduced_by_url:
milestone: '17.10'
gitlab_schema: gitlab_main_cell
exempt_from_sharding: true
gitlab_schema: gitlab_main_cell_local
table_size: small

View File

@ -7,7 +7,7 @@ feature_categories:
description: https://docs.gitlab.com/ee/user/project/deploy_keys/
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30886
milestone: '13.1'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because Table is empty and will be removed - https://gitlab.com/gitlab-org/gitlab/-/issues/408933
table_size: small

View File

@ -7,7 +7,7 @@ feature_categories:
description: https://docs.gitlab.com/ee/user/project/deploy_keys/
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32901
milestone: '13.2'
gitlab_schema: gitlab_main_cell
gitlab_schema: gitlab_main
exempt_from_sharding: true
notes: Exempted because Table is empty and will be removed - https://gitlab.com/gitlab-org/gitlab/-/issues/408933
table_size: small

View File

@ -8,6 +8,6 @@ description: Bearer token used for authenticating SCIM requests. This is table
for Instance SCIM
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/e9b2253fe3538234d1c4d173c4549a955233d836
milestone: '11.10'
gitlab_schema: gitlab_main_cell
exempt_from_sharding: true
gitlab_schema: gitlab_main
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/553107
table_size: small

View File

@ -14,6 +14,6 @@ description: For tracking blob metadata. Single table inheritance is used to rel
this table to many other tables. Partitioned by model_type.
introduced_by_url:
milestone: '17.11'
table_size: small
gitlab_schema: gitlab_main_cell
exempt_from_sharding: true
sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/398199
table_size: small

View File

@ -116,10 +116,11 @@ To prepare the new server:
sudo gitlab-backup create
```
1. Disable the following GitLab services and prevent unintentional restarts by adding the following to the bottom of `/etc/gitlab/gitlab.rb`:
1. After the backup is complete, disable the following GitLab services and prevent unintentional restarts by adding the following to the bottom of `/etc/gitlab/gitlab.rb`:
```ruby
alertmanager['enable'] = false
gitaly['enable'] = false
gitlab_exporter['enable'] = false
gitlab_pages['enable'] = false
gitlab_workhorse['enable'] = false

View File

@ -37,7 +37,8 @@ Parameters:
| `filename` | string | yes | Filename |
```shell
curl --header "Authorization: Bearer <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/packages/ml_models/:model_version_id/files/(*path/):filename
curl --header "Authorization: Bearer <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/:id/packages/ml_models/:model_version_id/files/(*path/):filename"
```
The response contains the file contents.
@ -45,5 +46,6 @@ The response contains the file contents.
For example, the following command returns the file `foo.txt` for the model version with an ID of `2` and project with an ID of `1`.
```shell
curl --header "Authorization: Bearer <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/ml_models/2/files/foo.txt
curl --header "Authorization: Bearer <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/1/packages/ml_models/2/files/foo.txt"
```

View File

@ -9,6 +9,7 @@ RSpec.describe 'cross-database foreign keys', feature_category: :database do
# should be added as a comment along with the name of the column.
let!(:allowed_cross_database_foreign_keys) do
keys = [
'excluded_merge_requests.merge_request_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/517248
'zoekt_indices.zoekt_enabled_namespace_id',
'zoekt_repositories.project_id',
'zoekt_replicas.zoekt_enabled_namespace_id',

View File

@ -30,7 +30,8 @@ RSpec.describe 'new tables with gitlab_main schema', feature_category: :cell do
'instance_integrations', # gitlab_main_clusterwide now deprecated
'ldap_admin_role_links', # gitlab_main_clusterwide now deprecated
'user_audit_events', # gitlab_main_clusterwide now deprecated
'user_permission_export_upload_uploads' # gitlab_main_clusterwide now deprecated
'user_permission_export_upload_uploads', # gitlab_main_clusterwide now deprecated
'cluster_agent_migrations' # awaiting table removal
]
end

View File

@ -9,7 +9,9 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :organizatio
# the table name to remove this once a decision has been made.
let(:allowed_to_be_missing_sharding_key) do
[
'web_hook_logs_daily' # temporary copy of web_hook_logs
'web_hook_logs_daily', # temporary copy of web_hook_logs
'ci_gitlab_hosted_runner_monthly_usages', # Dedicated only table, to be sharded
'uploads_9ba88c4165' # https://gitlab.com/gitlab-org/gitlab/-/issues/398199
]
end
@ -381,6 +383,18 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :organizatio
end
end
it 'does not allow tables in sharded schemas to be permanently exempted', :aggregate_failures do
sharded_schemas = Gitlab::Database
.all_gitlab_schemas
.select { |s| Gitlab::Database::GitlabSchema.require_sharding_key?(s) }
tables_exempted_from_sharding.each do |entry|
expect(entry.gitlab_schema).not_to be_in(sharded_schemas),
"#{entry.table_name} is in a schema (#{entry.gitlab_schema}) " \
"that requires sharding so is not allowed to be exempted from sharding"
end
end
it 'does not allow tables with FK references to be permanently exempted', :aggregate_failures do
tables_exempted_from_sharding_table_names = tables_exempted_from_sharding.map(&:table_name)
@ -460,7 +474,6 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :organizatio
def tables_missing_sharding_key(starting_from_milestone:)
::Gitlab::Database::Dictionary.entries.filter_map do |entry|
entry.table_name if entry.sharding_key.blank? &&
!entry.exempt_from_sharding? &&
entry.milestone_greater_than_or_equal_to?(starting_from_milestone) &&
::Gitlab::Database::GitlabSchema.require_sharding_key?(entry.gitlab_schema)
end
@ -469,10 +482,9 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :organizatio
def tables_missing_sharding_key_or_sharding_in_progress
::Gitlab::Database::Dictionary.entries.filter_map do |entry|
entry.table_name if entry.sharding_key.blank? &&
!entry.exempt_from_sharding? &&
::Gitlab::Database::GitlabSchema.require_sharding_key?(entry.gitlab_schema) &&
entry.sharding_key_issue_url.blank? &&
entry.desired_sharding_key.blank?
entry.desired_sharding_key.blank? &&
::Gitlab::Database::GitlabSchema.require_sharding_key?(entry.gitlab_schema)
end
end