From 747345dee0fc6ffcfc8bf820c9c1eb63f227b241 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 31 Oct 2024 00:13:19 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo/gitlab/bounded_contexts.yml | 1 - .../gitlab/documentation_links/link.yml | 2 - .rubocop_todo/rails/inverse_of.yml | 1 - .rubocop_todo/rspec/feature_category.yml | 1 - .rubocop_todo/search/namespaced_class.yml | 1 - .../style/class_and_module_children.yml | 1 - GITALY_SERVER_VERSION | 2 +- .../pipeline_failed_jobs_widget.vue | 16 +- .../components/deployment_header.vue | 32 ++ .../components/show_deployment.vue | 20 +- .../graphql/queries/release.query.graphql | 13 + .../components/diff_discussion_header.vue | 2 +- .../notes/components/diff_with_note.vue | 2 +- .../notes/components/noteable_note.vue | 2 +- .../components/toggle_replies_widget.vue | 2 +- app/assets/stylesheets/framework/diffs.scss | 2 +- app/assets/stylesheets/framework/files.scss | 22 +- .../page_bundles/design_management.scss | 2 +- .../page_bundles/notes/_diff_comments.scss | 24 +- .../page_bundles/notes/_notes_base.scss | 28 +- app/models/ci/runner_manager.rb | 9 +- app/models/group.rb | 2 +- app/models/namespace.rb | 11 +- app/models/namespace/traversal_hierarchy.rb | 2 +- app/models/namespaces/traversal/linear.rb | 2 +- app/models/namespaces/traversal/recursive.rb | 2 +- .../backfill_has_vulnerability_resolution.yml | 2 +- db/docs/ci_runner_machines_687967fa8a.yml | 13 + db/docs/dependency_list_exports.yml | 2 +- db/docs/elastic_reindexing_subtasks.yml | 2 +- ...oup_type_ci_runner_machines_687967fa8a.yml | 13 + ...nce_type_ci_runner_machines_687967fa8a.yml | 13 + ...ect_type_ci_runner_machines_687967fa8a.yml | 13 + .../protected_branch_merge_access_levels.yml | 20 +- db/docs/security_scans.yml | 1 + ...ability_occurrence_pipelines_project_id.rb | 3 + ...6_create_partitioned_ci_runner_managers.rb | 64 ++++ ...raint_to_partitioned_ci_runner_managers.rb | 27 ++ ...nner_managers_to_partitioned_ci_runners.rb | 67 ++++ ...e_backfill_has_vulnerability_resolution.rb | 23 ++ db/schema_migrations/20241024204816 | 1 + db/schema_migrations/20241025010332 | 1 + db/schema_migrations/20241025112847 | 1 + db/schema_migrations/20241025153240 | 1 + db/structure.sql | 319 ++++++++++++++++++ .../package_information/supported_os.md | 2 +- doc/ci/steps/index.md | 10 +- doc/ci/variables/index.md | 2 +- doc/development/fe_guide/style/scss.md | 41 +++ doc/tutorials/compliance_pipeline/index.md | 11 +- doc/update/index.md | 3 +- doc/user/group/compliance_pipelines.md | 6 +- lib/api/namespaces.rb | 2 +- lib/api/npm_instance_packages.rb | 2 +- .../database/partitioning/monthly_strategy.rb | 8 +- .../database/partitioning/time_partition.rb | 14 +- lib/gitlab/diff/merge_request_suggestion.rb | 7 +- lib/gitlab/pages/virtual_host_finder.rb | 2 +- lib/users/internal.rb | 1 - locale/gitlab.pot | 14 +- qa/gdk/Dockerfile.gdk | 2 +- spec/db/schema_spec.rb | 4 + .../pipeline_failed_jobs_widget_spec.js | 15 +- .../components/show_deployment_spec.js | 2 +- spec/lib/api/ci/helpers/runner_spec.rb | 14 +- .../partitioning/monthly_strategy_spec.rb | 69 ++-- .../partitioning/time_partition_spec.rb | 62 +--- .../diff/merge_request_suggestion_spec.rb | 15 +- spec/models/ci/runner_manager_spec.rb | 6 + spec/models/namespace_spec.rb | 43 ++- 70 files changed, 934 insertions(+), 213 deletions(-) create mode 100644 app/assets/javascripts/deployments/graphql/queries/release.query.graphql create mode 100644 db/docs/ci_runner_machines_687967fa8a.yml create mode 100644 db/docs/group_type_ci_runner_machines_687967fa8a.yml create mode 100644 db/docs/instance_type_ci_runner_machines_687967fa8a.yml create mode 100644 db/docs/project_type_ci_runner_machines_687967fa8a.yml rename db/{post_migrate => migrate}/20241022181600_remove_backfill_vulnerability_occurrence_pipelines_project_id.rb (72%) create mode 100644 db/migrate/20241024204816_create_partitioned_ci_runner_managers.rb create mode 100644 db/migrate/20241025112847_add_sharding_key_check_constraint_to_partitioned_ci_runner_managers.rb create mode 100644 db/migrate/20241025153240_add_fk_from_partitioned_ci_runner_managers_to_partitioned_ci_runners.rb create mode 100644 db/post_migrate/20241025010332_finalize_backfill_has_vulnerability_resolution.rb create mode 100644 db/schema_migrations/20241024204816 create mode 100644 db/schema_migrations/20241025010332 create mode 100644 db/schema_migrations/20241025112847 create mode 100644 db/schema_migrations/20241025153240 diff --git a/.rubocop_todo/gitlab/bounded_contexts.yml b/.rubocop_todo/gitlab/bounded_contexts.yml index 01ae4b178bc..529152c7bac 100644 --- a/.rubocop_todo/gitlab/bounded_contexts.yml +++ b/.rubocop_todo/gitlab/bounded_contexts.yml @@ -2907,7 +2907,6 @@ Gitlab/BoundedContexts: - 'ee/app/models/elastic/index_setting.rb' - 'ee/app/models/elastic/migration_record.rb' - 'ee/app/models/elastic/reindexing_slice.rb' - - 'ee/app/models/elastic/reindexing_subtask.rb' - 'ee/app/models/elastic/reindexing_task.rb' - 'ee/app/models/elasticsearch_indexed_namespace.rb' - 'ee/app/models/elasticsearch_indexed_project.rb' diff --git a/.rubocop_todo/gitlab/documentation_links/link.yml b/.rubocop_todo/gitlab/documentation_links/link.yml index dfedee119f5..2fb80207ed5 100644 --- a/.rubocop_todo/gitlab/documentation_links/link.yml +++ b/.rubocop_todo/gitlab/documentation_links/link.yml @@ -22,7 +22,6 @@ Gitlab/DocumentationLinks/Link: - 'ee/app/helpers/projects/security/api_fuzzing_configuration_helper.rb' - 'ee/app/helpers/vulnerabilities_helper.rb' - 'ee/app/models/integrations/github.rb' - - 'ee/lib/api/managed_licenses.rb' - 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb' - 'ee/lib/gitlab/checks/secrets_check.rb' - 'ee/lib/gitlab/llm/chain/tools/tool.rb' @@ -38,7 +37,6 @@ Gitlab/DocumentationLinks/Link: - 'lib/gitlab/usage_data_counters/hll_redis_counter.rb' - 'lib/slack/block_kit/app_home_opened.rb' - 'lib/system_check/helpers.rb' - - 'lib/users/internal.rb' - 'spec/helpers/ide_helper_spec.rb' - 'spec/mailers/emails/pages_domains_spec.rb' - 'spec/presenters/clusters/cluster_presenter_spec.rb' diff --git a/.rubocop_todo/rails/inverse_of.yml b/.rubocop_todo/rails/inverse_of.yml index c8dbb9b7a0e..2ed8bc1ae8c 100644 --- a/.rubocop_todo/rails/inverse_of.yml +++ b/.rubocop_todo/rails/inverse_of.yml @@ -60,7 +60,6 @@ Rails/InverseOf: - 'ee/app/models/ee/project.rb' - 'ee/app/models/ee/service_desk_setting.rb' - 'ee/app/models/ee/user.rb' - - 'ee/app/models/elastic/reindexing_subtask.rb' - 'ee/app/models/geo/event.rb' - 'ee/app/models/geo/event_log.rb' - 'ee/app/models/geo/job_artifact_registry.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index 7721a1987be..3967d117d3b 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -816,7 +816,6 @@ RSpec/FeatureCategory: - 'ee/spec/models/ee/users_statistics_spec.rb' - 'ee/spec/models/elastic/index_setting_spec.rb' - 'ee/spec/models/elastic/reindexing_slice_spec.rb' - - 'ee/spec/models/elastic/reindexing_subtask_spec.rb' - 'ee/spec/models/elastic/reindexing_task_spec.rb' - 'ee/spec/models/epic_user_mention_spec.rb' - 'ee/spec/models/gitlab/seat_link_data_spec.rb' diff --git a/.rubocop_todo/search/namespaced_class.yml b/.rubocop_todo/search/namespaced_class.yml index 28479ab5826..118f7842990 100644 --- a/.rubocop_todo/search/namespaced_class.yml +++ b/.rubocop_todo/search/namespaced_class.yml @@ -31,7 +31,6 @@ Search/NamespacedClass: - 'ee/app/models/elastic/index_setting.rb' - 'ee/app/models/elastic/migration_record.rb' - 'ee/app/models/elastic/reindexing_slice.rb' - - 'ee/app/models/elastic/reindexing_subtask.rb' - 'ee/app/models/elastic/reindexing_task.rb' - 'ee/app/models/elasticsearch_indexed_namespace.rb' - 'ee/app/models/elasticsearch_indexed_project.rb' diff --git a/.rubocop_todo/style/class_and_module_children.yml b/.rubocop_todo/style/class_and_module_children.yml index 6867e5d4eda..542cbbc3bb2 100644 --- a/.rubocop_todo/style/class_and_module_children.yml +++ b/.rubocop_todo/style/class_and_module_children.yml @@ -421,7 +421,6 @@ Style/ClassAndModuleChildren: - 'ee/app/models/dast/profile_schedule.rb' - 'ee/app/models/ee/ci/job_artifact.rb' - 'ee/app/models/elastic/reindexing_slice.rb' - - 'ee/app/models/elastic/reindexing_subtask.rb' - 'ee/app/models/elastic/reindexing_task.rb' - 'ee/app/models/epic/metrics.rb' - 'ee/app/models/epic/related_epic_link.rb' diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 712ed302de9..d18cb6e9aff 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -f5742bf5cd567c3bfc02aca8880bc8f73a7fb7c4 +c2675ac3885b916376fb35eb123dd54820ca797d diff --git a/app/assets/javascripts/ci/pipelines_page/components/failure_widget/pipeline_failed_jobs_widget.vue b/app/assets/javascripts/ci/pipelines_page/components/failure_widget/pipeline_failed_jobs_widget.vue index b0c2c509251..317f9b508cf 100644 --- a/app/assets/javascripts/ci/pipelines_page/components/failure_widget/pipeline_failed_jobs_widget.vue +++ b/app/assets/javascripts/ci/pipelines_page/components/failure_widget/pipeline_failed_jobs_widget.vue @@ -1,11 +1,12 @@ @@ -157,5 +172,22 @@ export default { +

+ + + +

+ +
+
diff --git a/app/assets/javascripts/deployments/components/show_deployment.vue b/app/assets/javascripts/deployments/components/show_deployment.vue index d51205f75fc..a7894fc5eb2 100644 --- a/app/assets/javascripts/deployments/components/show_deployment.vue +++ b/app/assets/javascripts/deployments/components/show_deployment.vue @@ -5,6 +5,7 @@ import { toggleQueryPollingByVisibility, etagQueryHeaders } from '~/graphql_shar import { s__ } from '~/locale'; import deploymentQuery from '../graphql/queries/deployment.query.graphql'; import environmentQuery from '../graphql/queries/environment.query.graphql'; +import releaseQuery from '../graphql/queries/release.query.graphql'; import DeploymentHeader from './deployment_header.vue'; import DeploymentAside from './deployment_aside.vue'; import DeploymentDeployBlock from './deployment_deploy_block.vue'; @@ -58,9 +59,25 @@ export default { this.errorMessage = this.$options.i18n.errorMessage; }, }, + release: { + query: releaseQuery, + variables() { + return { fullPath: this.projectPath, tagName: this.deployment?.ref }; + }, + update(data) { + return data?.project?.release; + }, + skip() { + return !this.deployment?.tag; + }, + error(error) { + captureException(error); + this.errorMessage = this.$options.i18n.errorMessage; + }, + }, }, data() { - return { deployment: {}, environment: {}, errorMessage: '' }; + return { deployment: {}, environment: {}, errorMessage: '', release: null }; }, computed: { hasError() { @@ -104,6 +121,7 @@ export default { v-else :deployment="deployment" :environment="environment" + :release="release" :loading="isLoading" /> diff --git a/app/assets/javascripts/deployments/graphql/queries/release.query.graphql b/app/assets/javascripts/deployments/graphql/queries/release.query.graphql new file mode 100644 index 00000000000..4b094585337 --- /dev/null +++ b/app/assets/javascripts/deployments/graphql/queries/release.query.graphql @@ -0,0 +1,13 @@ +query relatedRelease($fullPath: ID!, $tagName: String!) { + project(fullPath: $fullPath) { + id + release(tagName: $tagName) { + id + name + descriptionHtml + links { + selfUrl + } + } + } +} diff --git a/app/assets/javascripts/notes/components/diff_discussion_header.vue b/app/assets/javascripts/notes/components/diff_discussion_header.vue index 662e278dacf..d348fd6cd95 100644 --- a/app/assets/javascripts/notes/components/diff_discussion_header.vue +++ b/app/assets/javascripts/notes/components/diff_discussion_header.vue @@ -137,7 +137,7 @@ export default { diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index e1d017d572a..0ea92366173 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -102,7 +102,7 @@ export default { :discussion-path="discussion.discussion_path" :diff-file="discussion.diff_file" :can-current-user-fork="false" - class="gl-border" + class="gl-border gl-border-section" :expanded="!isCollapsed" />
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index c57cfbe90d2..0c6c2c4fbc2 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -421,7 +421,7 @@ export default {