From 65d7736ff13e1f5c393f6723b7da0d1b2ddb94f5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 22 Jan 2024 03:08:39 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- db/docs/requirements.yml | 13 +++++++++++-- db/docs/users_ops_dashboard_projects.yml | 10 +++++++++- ...40119102950_remove_index_user_callouts_on_user_id.rb | 17 +++++++++++++++++ db/schema_migrations/20240119102950 | 1 + db/structure.sql | 2 -- doc/api/graphql/index.md | 14 ++++++++------ spec/support/helpers/database/duplicate_indexes.yml | 3 --- 7 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 db/post_migrate/20240119102950_remove_index_user_callouts_on_user_id.rb create mode 100644 db/schema_migrations/20240119102950 diff --git a/db/docs/requirements.yml b/db/docs/requirements.yml index 9fad8b634cf..2abe7d472d1 100644 --- a/db/docs/requirements.yml +++ b/db/docs/requirements.yml @@ -4,7 +4,16 @@ classes: - RequirementsManagement::Requirement feature_categories: - requirements_management -description: Information relating to Requirements as implemented by the Requirements Management tool +description: Information relating to Requirements as implemented by the Requirements + Management tool introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26097 milestone: '12.9' -gitlab_schema: gitlab_main +gitlab_schema: gitlab_main_cell +allow_cross_joins: +- gitlab_main_clusterwide +allow_cross_transactions: +- gitlab_main_clusterwide +allow_cross_foreign_keys: +- gitlab_main_clusterwide +sharding_key: + project_id: projects diff --git a/db/docs/users_ops_dashboard_projects.yml b/db/docs/users_ops_dashboard_projects.yml index d09d3196e19..2017ac4f420 100644 --- a/db/docs/users_ops_dashboard_projects.yml +++ b/db/docs/users_ops_dashboard_projects.yml @@ -7,4 +7,12 @@ feature_categories: description: https://docs.gitlab.com/ee/user/operations_dashboard/ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7341 milestone: '11.5' -gitlab_schema: gitlab_main +gitlab_schema: gitlab_main_cell +allow_cross_joins: +- gitlab_main_clusterwide +allow_cross_transactions: +- gitlab_main_clusterwide +allow_cross_foreign_keys: +- gitlab_main_clusterwide +sharding_key: + project_id: projects diff --git a/db/post_migrate/20240119102950_remove_index_user_callouts_on_user_id.rb b/db/post_migrate/20240119102950_remove_index_user_callouts_on_user_id.rb new file mode 100644 index 00000000000..cdfb5d4614f --- /dev/null +++ b/db/post_migrate/20240119102950_remove_index_user_callouts_on_user_id.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RemoveIndexUserCalloutsOnUserId < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.9' + + INDEX_NAME = 'index_user_callouts_on_user_id' + + def up + remove_concurrent_index_by_name(:user_callouts, INDEX_NAME) + end + + def down + add_concurrent_index(:user_callouts, :user_id, name: INDEX_NAME) + end +end diff --git a/db/schema_migrations/20240119102950 b/db/schema_migrations/20240119102950 new file mode 100644 index 00000000000..af906de86e8 --- /dev/null +++ b/db/schema_migrations/20240119102950 @@ -0,0 +1 @@ +740f0d76619decc211dd950a75091c1b6766774483e42c92fd48f0d22c389a5d \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 7ce29e40688..182e150704e 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -35654,8 +35654,6 @@ CREATE INDEX index_user_achievements_on_user_id_revoked_by_is_null ON user_achie CREATE INDEX index_user_agent_details_on_subject_id_and_subject_type ON user_agent_details USING btree (subject_id, subject_type); -CREATE INDEX index_user_callouts_on_user_id ON user_callouts USING btree (user_id); - CREATE UNIQUE INDEX index_user_callouts_on_user_id_and_feature_name ON user_callouts USING btree (user_id, feature_name); CREATE INDEX index_user_canonical_emails_on_canonical_email ON user_canonical_emails USING btree (canonical_email); diff --git a/doc/api/graphql/index.md b/doc/api/graphql/index.md index 349b667f595..4f0811924aa 100644 --- a/doc/api/graphql/index.md +++ b/doc/api/graphql/index.md @@ -46,17 +46,19 @@ The [get started](getting_started.md) page includes different methods to customi ### Authentication -Some queries can be accessed anonymously without the request needing to be authenticated, -but others require it. Mutations always require authentication. +You can access some queries without authentication, but others require authentication. Mutations always require +authentication. -Authentication can happen by: +You can authenticate by using either a: - [Token](#token-authentication) - [Session cookie](#session-cookie-authentication) -If the authentication information is not valid, GitLab returns an error message with a status code of 401: +If the authentication information is not valid, GitLab returns an error message with a status code of `401`: +```json {"errors":[{"message":"Invalid token"}]} +``` #### Token authentication @@ -83,7 +85,7 @@ curl "https://gitlab.com/api/graphql" --header "Authorization: Bearer " \ ##### Parameter authentication -Alternatively, OAuth 2.0 tokens can be passed in using the `access_token` parameter: +Example of using an OAuth 2.0 token in the `access_token` parameter: ```shell curl "https://gitlab.com/api/graphql?access_token=" \ @@ -91,7 +93,7 @@ curl "https://gitlab.com/api/graphql?access_token=" \ --data "{\"query\": \"query {currentUser {name}}\"}" ``` -Personal, project, or group access tokens can be passed in using the `private_token` parameter: +You can pass in personal, project, or group access tokens using the `private_token` parameter: ```shell curl "https://gitlab.com/api/graphql?private_token=" \ diff --git a/spec/support/helpers/database/duplicate_indexes.yml b/spec/support/helpers/database/duplicate_indexes.yml index 80d409f233d..29e1c1da245 100644 --- a/spec/support/helpers/database/duplicate_indexes.yml +++ b/spec/support/helpers/database/duplicate_indexes.yml @@ -162,9 +162,6 @@ term_agreements: todos: index_todos_on_author_id_and_created_at: - index_todos_on_author_id -user_callouts: - index_user_callouts_on_user_id_and_feature_name: - - index_user_callouts_on_user_id vulnerabilities: index_vulnerabilities_project_id_state_severity_default_branch: - index_vulnerabilities_on_project_id_and_state_and_severity -- cgit v1.2.3