From 84b4fcc62057fc2ba55ee1dfb35d99799660ce7c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 19 Dec 2024 06:30:57 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/test-on-cng/main.gitlab-ci.yml | 2 +- GITALY_SERVER_VERSION | 2 +- Gemfile.checksum | 2 +- Gemfile.lock | 2 +- Gemfile.next.checksum | 2 +- Gemfile.next.lock | 2 +- .../components/wrappers/table_cell_base.vue | 2 - .../components/import_actions_cell.vue | 2 - .../components/states/ready_to_merge.vue | 3 - app/assets/stylesheets/framework/common.scss | 2 +- .../stylesheets/framework/dropdowns.scss | 4 +- app/controllers/concerns/stream_diffs.rb | 2 + .../merge_requests/application_controller.rb | 12 +++ .../merge_requests/creations_controller.rb | 12 --- .../creations_diffs_stream_controller.rb | 19 ++++ app/models/issue.rb | 29 ++---- app/models/work_items/type.rb | 4 - app/models/work_items/widgets/hierarchy.rb | 5 +- app/views/projects/pipelines/show.html.haml | 4 +- .../gitlab/jira_import/import_issue_worker.rb | 1 - .../issues_set_correct_work_item_type_id.yml | 9 -- .../issues_use_correct_work_item_type_id.yml | 9 -- config/routes/merge_requests.rb | 1 + .../templates/_deprecation_template.md.erb | 4 +- .../backfill_seat_assignments_table.yml | 6 +- ...3_queue_backfill_seat_assignments_table.rb | 13 +-- ..._truncate_subscription_seat_assignments.rb | 14 +++ ...requeue_backfill_seat_assignments_table.rb | 29 ++++++ db/schema_migrations/20241209130842 | 1 + db/schema_migrations/20241209131010 | 1 + .../inactive_project_deletion.md | 4 +- .../postgresql/multiple_databases.md | 4 +- .../settings/rate_limit_on_groups_api.md | 4 +- .../settings/rate_limit_on_members_api.md | 4 +- .../rate_limit_on_organizations_api.md | 4 +- .../settings/rate_limit_on_projects_api.md | 4 +- .../settings/third_party_offers.md | 4 +- doc/api/graphql/removed_items.md | 2 + doc/api/group_badges.md | 4 +- doc/api/group_ldap_links.md | 4 +- doc/api/groups.md | 4 +- doc/api/invitations.md | 4 +- doc/api/organizations.md | 4 +- doc/api/project_forks.md | 4 +- doc/api/project_starring.md | 4 +- doc/api/projects.md | 4 +- doc/api/topics.md | 4 +- .../cells/application_settings_analysis.md | 4 +- doc/development/cells/index.md | 4 +- doc/development/cells/topology_service.md | 4 +- .../database/multiple_databases.md | 4 +- doc/development/image_scaling.md | 4 +- doc/development/integrations/secure.md | 5 +- doc/development/organization/index.md | 4 +- doc/install/postgresql_extensions.md | 2 +- doc/topics/git/project.md | 4 +- .../index.md | 4 +- .../move_personal_project_to_group/index.md | 4 +- doc/update/deprecations.md | 4 +- doc/user/get_started/get_started_projects.md | 4 +- doc/user/group/access_and_permissions.md | 4 +- doc/user/group/index.md | 4 +- doc/user/group/manage.md | 4 +- doc/user/group/subgroups/index.md | 4 +- doc/user/group/troubleshooting.md | 4 +- doc/user/namespace/index.md | 4 +- doc/user/organization/index.md | 4 +- doc/user/packages/dependency_proxy/index.md | 92 +++++++++--------- .../reduce_dependency_proxy_storage.md | 10 +- ...o_factor_authentication_troubleshooting.md | 2 +- doc/user/profile/achievements.md | 4 +- doc/user/profile/contributions_calendar.md | 4 +- doc/user/project/badges.md | 4 +- doc/user/project/index.md | 4 +- doc/user/project/members/index.md | 4 +- .../members/sharing_projects_groups.md | 4 +- .../project/organize_work_with_projects.md | 4 +- doc/user/project/project_topics.md | 4 +- doc/user/project/settings/index.md | 4 +- doc/user/project/settings/migrate_projects.md | 4 +- doc/user/project/troubleshooting.md | 4 +- doc/user/project/use_project_as_go_package.md | 4 +- doc/user/project/working_with_projects.md | 4 +- doc/user/public_access.md | 4 +- doc/user/reserved_names.md | 4 +- lib/gitlab/issues/type_association_getter.rb | 6 +- lib/gitlab/jira_import/issue_serializer.rb | 13 +-- .../cells/application-settings-analysis.rb | 4 +- .../user_settings/active_sessions_spec.rb | 16 ---- .../wrappers/table_cell_base_spec.js | 2 - .../issues/type_association_getter_spec.rb | 8 -- .../jira_import/issue_serializer_spec.rb | 23 ----- ...ue_backfill_seat_assignments_table_spec.rb | 11 +-- ...ue_backfill_seat_assignments_table_spec.rb | 27 ++++++ spec/models/active_session_spec.rb | 36 ++++++- spec/models/issue_spec.rb | 94 ------------------- spec/models/work_items/type_spec.rb | 60 ------------ .../creations_diffs_stream_controller_spec.rb | 79 ++++++++++++++++ .../work_item_type_list_shared_examples.rb | 12 --- .../projects/pipelines/show.html.haml_spec.rb | 8 +- .../jira_import/import_issue_worker_spec.rb | 31 ------ 101 files changed, 412 insertions(+), 527 deletions(-) create mode 100644 app/controllers/projects/merge_requests/creations_diffs_stream_controller.rb delete mode 100644 config/feature_flags/wip/issues_set_correct_work_item_type_id.yml delete mode 100644 config/feature_flags/wip/issues_use_correct_work_item_type_id.yml create mode 100644 db/post_migrate/20241209130842_truncate_subscription_seat_assignments.rb create mode 100644 db/post_migrate/20241209131010_queue_requeue_backfill_seat_assignments_table.rb create mode 100644 db/schema_migrations/20241209130842 create mode 100644 db/schema_migrations/20241209131010 create mode 100644 spec/migrations/20241209131010_queue_requeue_backfill_seat_assignments_table_spec.rb create mode 100644 spec/requests/projects/merge_requests/creations_diffs_stream_controller_spec.rb diff --git a/.gitlab/ci/test-on-cng/main.gitlab-ci.yml b/.gitlab/ci/test-on-cng/main.gitlab-ci.yml index aee1f7e4647..01f47baaa90 100644 --- a/.gitlab/ci/test-on-cng/main.gitlab-ci.yml +++ b/.gitlab/ci/test-on-cng/main.gitlab-ci.yml @@ -78,7 +78,7 @@ workflow: QA_ALLOW_LOCAL_REQUESTS: "true" QA_SUITE_STATUS_ENV_FILE: $CI_PROJECT_DIR/suite_status.env QA_RUN_IN_PARALLEL: "true" - QA_PARALLEL_PROCESSES: 5 + QA_PARALLEL_PROCESSES: 4 GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN before_script: - echo "SUITE_RAN=true" > "$QA_SUITE_STATUS_ENV_FILE" diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 0a925483954..da3e344c328 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -6ac5ec362f7794ee359fec0db88e2c828ba1b19b +8e905bd19b45aa6a4bf8c2ae4cf31f271a7cb3de diff --git a/Gemfile.checksum b/Gemfile.checksum index a6ea56b2ef9..b245199e3c0 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -421,7 +421,7 @@ {"name":"net-protocol","version":"0.1.3","platform":"ruby","checksum":"ad43e2be965ede676683c047b2c3d76762aa49a764779d98312a10da04622c14"}, {"name":"net-scp","version":"4.0.0","platform":"ruby","checksum":"b32ded0d48c88ce70844a063e4e14efb44a95e51a9e0c0bfb0c54b4313b622ea"}, {"name":"net-smtp","version":"0.3.3","platform":"ruby","checksum":"3d51dcaa981b74aff2d89cbe89de4503bc2d682365ea5176366e950a0d68d5b0"}, -{"name":"net-ssh","version":"7.2.0","platform":"ruby","checksum":"2a28f177173d1f6bef77471fa927c73959cda36cd03772e117f2fec48f34d2cb"}, +{"name":"net-ssh","version":"7.3.0","platform":"ruby","checksum":"172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0"}, {"name":"netrc","version":"0.11.0","platform":"ruby","checksum":"de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f"}, {"name":"nio4r","version":"2.7.0","platform":"java","checksum":"3f2e515e928ceeef7668e1f64fc3bfef1417a5ec0908d8e69f2c6d486284e04d"}, {"name":"nio4r","version":"2.7.0","platform":"ruby","checksum":"9586a685eca8246d6406e712a525e705d15bb88f709d78fc3f141e864df97276"}, diff --git a/Gemfile.lock b/Gemfile.lock index dec5585412e..e9723e3149c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1198,7 +1198,7 @@ GEM net-ssh (>= 2.6.5, < 8.0.0) net-smtp (0.3.3) net-protocol - net-ssh (7.2.0) + net-ssh (7.3.0) netrc (0.11.0) nio4r (2.7.0) no_proxy_fix (0.1.2) diff --git a/Gemfile.next.checksum b/Gemfile.next.checksum index c0ba79a2138..5fab2d0c534 100644 --- a/Gemfile.next.checksum +++ b/Gemfile.next.checksum @@ -426,7 +426,7 @@ {"name":"net-protocol","version":"0.1.3","platform":"ruby","checksum":"ad43e2be965ede676683c047b2c3d76762aa49a764779d98312a10da04622c14"}, {"name":"net-scp","version":"4.0.0","platform":"ruby","checksum":"b32ded0d48c88ce70844a063e4e14efb44a95e51a9e0c0bfb0c54b4313b622ea"}, {"name":"net-smtp","version":"0.3.3","platform":"ruby","checksum":"3d51dcaa981b74aff2d89cbe89de4503bc2d682365ea5176366e950a0d68d5b0"}, -{"name":"net-ssh","version":"7.2.0","platform":"ruby","checksum":"2a28f177173d1f6bef77471fa927c73959cda36cd03772e117f2fec48f34d2cb"}, +{"name":"net-ssh","version":"7.3.0","platform":"ruby","checksum":"172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0"}, {"name":"netrc","version":"0.11.0","platform":"ruby","checksum":"de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f"}, {"name":"nio4r","version":"2.7.0","platform":"java","checksum":"3f2e515e928ceeef7668e1f64fc3bfef1417a5ec0908d8e69f2c6d486284e04d"}, {"name":"nio4r","version":"2.7.0","platform":"ruby","checksum":"9586a685eca8246d6406e712a525e705d15bb88f709d78fc3f141e864df97276"}, diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 4e8371abe8b..a9fc008f8ea 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -1213,7 +1213,7 @@ GEM net-ssh (>= 2.6.5, < 8.0.0) net-smtp (0.3.3) net-protocol - net-ssh (7.2.0) + net-ssh (7.3.0) netrc (0.11.0) nio4r (2.7.0) no_proxy_fix (0.1.2) diff --git a/app/assets/javascripts/content_editor/components/wrappers/table_cell_base.vue b/app/assets/javascripts/content_editor/components/wrappers/table_cell_base.vue index b865bda423a..eb539f18a72 100644 --- a/app/assets/javascripts/content_editor/components/wrappers/table_cell_base.vue +++ b/app/assets/javascripts/content_editor/components/wrappers/table_cell_base.vue @@ -170,11 +170,9 @@ export default { diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue index 86ca81e2dde..8cb44b95d2a 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue @@ -712,13 +712,10 @@ export default { v-gl-tooltip.hover.focus="__('Select merge moment')" :disabled="isMergeButtonDisabled" variant="confirm" - class="gl-mr-0" data-testid="merge-immediately-dropdown" - icon="chevron-down" toggle-class="btn-icon js-merge-moment" :toggle-text="__('Select a merge moment')" text-sr-only - no-caret > (types) { joins(::Gitlab::Issues::TypeAssociationGetter.call).where.not(work_item_types: { base_type: types }) @@ -366,9 +355,7 @@ class Issue < ApplicationRecord # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/499911 def work_item_type - return correct_work_item_type if Feature.enabled?(:issues_use_correct_work_item_type_id, :instance) - - super + correct_work_item_type end def work_item_type_id=(input_work_item_type_id) diff --git a/app/models/work_items/type.rb b/app/models/work_items/type.rb index 11eaff85c35..f077cf99fc2 100644 --- a/app/models/work_items/type.rb +++ b/app/models/work_items/type.rb @@ -87,8 +87,6 @@ module WorkItems scope :order_by_name_asc, -> { order(arel_table[:name].lower.asc) } scope :by_type, ->(base_type) { where(base_type: base_type) } scope :with_correct_id_and_fallback, ->(correct_ids) { - return id_in(correct_ids) if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance) - # This shouldn't work for nil ids as we expect newer instances to have NULL values in old_id correct_ids = Array(correct_ids).compact return none if correct_ids.blank? @@ -137,8 +135,6 @@ module WorkItems end def to_global_id - return super if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance) - ::Gitlab::GlobalId.build(self, id: correct_id) end # Alias necessary here as the Gem uses `alias` to define the `gid` method diff --git a/app/models/work_items/widgets/hierarchy.rb b/app/models/work_items/widgets/hierarchy.rb index d32eca87f07..b224fcdd163 100644 --- a/app/models/work_items/widgets/hierarchy.rb +++ b/app/models/work_items/widgets/hierarchy.rb @@ -56,13 +56,12 @@ module WorkItems private def counts_by_state(work_item_type) - type_id_column = Feature.enabled?(:issues_use_correct_work_item_type_id, :instance) ? 'correct_id' : 'id' open_count = counts_by_type_and_state.fetch( - [work_item_type.attributes[type_id_column], WorkItem.available_states[:opened]], + [work_item_type.attributes['correct_id'], WorkItem.available_states[:opened]], 0 ) closed_count = counts_by_type_and_state.fetch( - [work_item_type.attributes[type_id_column], WorkItem.available_states[:closed]], + [work_item_type.attributes['correct_id'], WorkItem.available_states[:closed]], 0 ) diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 2d1c5c432c4..617ae8e59d3 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -2,7 +2,7 @@ - add_to_breadcrumbs _('Pipelines'), project_pipelines_path(@project) - breadcrumb_title "##{@pipeline.id}" - page_title _('Pipeline') -- pipeline_has_errors = @pipeline.builds.empty? && @pipeline.yaml_errors.present? +- pipeline_has_errors = @pipeline.builds.empty? && @pipeline.error_messages.any? - add_page_specific_style 'page_bundles/pipeline' - add_page_specific_style 'page_bundles/reports' - add_page_specific_style 'page_bundles/ci_status' @@ -19,7 +19,7 @@ alert_options: { class: 'gl-mb-5' }) do |c| - c.with_body do %ul - - @pipeline.yaml_errors.split("\n").each do |error| + - @pipeline.error_messages.pluck(:content).each do |error| # rubocop:disable CodeReuse/ActiveRecord -- done temporarily to drop yaml_errors %li= error - if can_view_pipeline_editor?(@project) = render Pajamas::ButtonComponent.new(href: project_ci_pipeline_editor_path(@project, branch_name: @pipeline.source_ref), variant: :confirm) do diff --git a/app/workers/gitlab/jira_import/import_issue_worker.rb b/app/workers/gitlab/jira_import/import_issue_worker.rb index 2f566c2de03..0f0a3c6de26 100644 --- a/app/workers/gitlab/jira_import/import_issue_worker.rb +++ b/app/workers/gitlab/jira_import/import_issue_worker.rb @@ -34,7 +34,6 @@ module Gitlab # Necessary temporarily as new version might process jobs enqueued in old version def ensure_correct_work_item_type(attributes) - return attributes if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance) return attributes unless attributes.key?('work_item_type_id') work_item_type = ::WorkItems::Type.find_by_correct_id_with_fallback(attributes['work_item_type_id']) diff --git a/config/feature_flags/wip/issues_set_correct_work_item_type_id.yml b/config/feature_flags/wip/issues_set_correct_work_item_type_id.yml deleted file mode 100644 index 6789e32d0f7..00000000000 --- a/config/feature_flags/wip/issues_set_correct_work_item_type_id.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: issues_set_correct_work_item_type_id -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/504064 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171781 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/504107 -milestone: '17.7' -group: group::project management -type: wip -default_enabled: false diff --git a/config/feature_flags/wip/issues_use_correct_work_item_type_id.yml b/config/feature_flags/wip/issues_use_correct_work_item_type_id.yml deleted file mode 100644 index 75044c68012..00000000000 --- a/config/feature_flags/wip/issues_use_correct_work_item_type_id.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: issues_use_correct_work_item_type_id -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/493976 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169798 -rollout_issue_url: -milestone: '17.6' -group: group::project management -type: wip -default_enabled: false diff --git a/config/routes/merge_requests.rb b/config/routes/merge_requests.rb index 226ba25c845..252a13c7ad1 100644 --- a/config/routes/merge_requests.rb +++ b/config/routes/merge_requests.rb @@ -94,5 +94,6 @@ scope path: 'merge_requests', controller: 'merge_requests/creations' do get :diff_for_path get :branch_from get :branch_to + get :diffs_stream, to: 'merge_requests/creations_diffs_stream#diffs' end end diff --git a/data/deprecations/templates/_deprecation_template.md.erb b/data/deprecations/templates/_deprecation_template.md.erb index 1199cfa4e71..5c6b8e7fa4f 100644 --- a/data/deprecations/templates/_deprecation_template.md.erb +++ b/data/deprecations/templates/_deprecation_template.md.erb @@ -17,9 +17,7 @@ The following GitLab features are deprecated and no longer recommended for use. For advanced searching and filtering of this deprecation information, try [a tool built by our Customer Success team](https://gitlab-com.gitlab.io/cs-tools/gitlab-cs-tools/what-is-new-since/?tab=deprecations). -[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) -and [GraphQL deprecations](https://docs.gitlab.com/ee/api/graphql/removed_items.html) -are documented separately. +[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) are documented separately. **{rss}** **To be notified of upcoming breaking changes**, add this URL to your RSS feed reader: `https://about.gitlab.com/breaking-changes.xml` diff --git a/db/docs/batched_background_migrations/backfill_seat_assignments_table.yml b/db/docs/batched_background_migrations/backfill_seat_assignments_table.yml index 4a6e2603cd5..ab971826c45 100644 --- a/db/docs/batched_background_migrations/backfill_seat_assignments_table.yml +++ b/db/docs/batched_background_migrations/backfill_seat_assignments_table.yml @@ -1,8 +1,8 @@ --- migration_job_name: BackfillSeatAssignmentsTable -description: Backfill subcription_seat_assignments table with namespace memberships data. +description: Backfill subscription_seat_assignments table with namespace memberships data. feature_category: seat_cost_management introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172095 -milestone: '17.7' -queued_migration_version: 20241108133603 +milestone: '17.8' +queued_migration_version: 20241209131010 finalized_by: # version of the migration that finalized this BBM diff --git a/db/post_migrate/20241108133603_queue_backfill_seat_assignments_table.rb b/db/post_migrate/20241108133603_queue_backfill_seat_assignments_table.rb index cc4f1b241c7..9735d10252f 100644 --- a/db/post_migrate/20241108133603_queue_backfill_seat_assignments_table.rb +++ b/db/post_migrate/20241108133603_queue_backfill_seat_assignments_table.rb @@ -11,17 +11,12 @@ class QueueBackfillSeatAssignmentsTable < Gitlab::Database::Migration[2.2] SUB_BATCH_SIZE = 1000 def up - queue_batched_background_migration( - MIGRATION, - :members, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) + # no-op, there were invalid records that needs to be fixed. + # Fixed by: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174545 end def down - delete_batched_background_migration(MIGRATION, :members, :id, []) + # no-op, there were invalid records that needs to be fixed. + # Fixed by: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174545 end end diff --git a/db/post_migrate/20241209130842_truncate_subscription_seat_assignments.rb b/db/post_migrate/20241209130842_truncate_subscription_seat_assignments.rb new file mode 100644 index 00000000000..83cd3e36cfc --- /dev/null +++ b/db/post_migrate/20241209130842_truncate_subscription_seat_assignments.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class TruncateSubscriptionSeatAssignments < Gitlab::Database::Migration[2.2] + milestone '17.8' + disable_ddl_transaction! + + def up + truncate_tables!('subscription_seat_assignments') + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20241209131010_queue_requeue_backfill_seat_assignments_table.rb b/db/post_migrate/20241209131010_queue_requeue_backfill_seat_assignments_table.rb new file mode 100644 index 00000000000..f92cefd63bd --- /dev/null +++ b/db/post_migrate/20241209131010_queue_requeue_backfill_seat_assignments_table.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class QueueRequeueBackfillSeatAssignmentsTable < Gitlab::Database::Migration[2.2] + milestone '17.8' + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + MIGRATION = "BackfillSeatAssignmentsTable" + DELAY_INTERVAL = 2.minutes + BATCH_SIZE = 10_000 + SUB_BATCH_SIZE = 1000 + + def up + delete_batched_background_migration(MIGRATION, :members, :id, []) + + queue_batched_background_migration( + MIGRATION, + :members, + :id, + job_interval: DELAY_INTERVAL, + batch_size: BATCH_SIZE, + sub_batch_size: SUB_BATCH_SIZE + ) + end + + def down + delete_batched_background_migration(MIGRATION, :members, :id, []) + end +end diff --git a/db/schema_migrations/20241209130842 b/db/schema_migrations/20241209130842 new file mode 100644 index 00000000000..a705a7f19fb --- /dev/null +++ b/db/schema_migrations/20241209130842 @@ -0,0 +1 @@ +267d0f9278b4bb269512f9cc65c5a843ad27d74c03cf862024ba3aebc42e1714 \ No newline at end of file diff --git a/db/schema_migrations/20241209131010 b/db/schema_migrations/20241209131010 new file mode 100644 index 00000000000..60acb9d064c --- /dev/null +++ b/db/schema_migrations/20241209131010 @@ -0,0 +1 @@ +b647e83a95daace95d0d52a78dbbe29e23e3cf2bc98df6766fe1a0ca3e39f746 \ No newline at end of file diff --git a/doc/administration/inactive_project_deletion.md b/doc/administration/inactive_project_deletion.md index b3998be4570..f47fe9bbb9f 100644 --- a/doc/administration/inactive_project_deletion.md +++ b/doc/administration/inactive_project_deletion.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/postgresql/multiple_databases.md b/doc/administration/postgresql/multiple_databases.md index 3d54344792f..f70f5584169 100644 --- a/doc/administration/postgresql/multiple_databases.md +++ b/doc/administration/postgresql/multiple_databases.md @@ -1,7 +1,7 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/settings/rate_limit_on_groups_api.md b/doc/administration/settings/rate_limit_on_groups_api.md index 789f9647d9a..2eaefff581e 100644 --- a/doc/administration/settings/rate_limit_on_groups_api.md +++ b/doc/administration/settings/rate_limit_on_groups_api.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/settings/rate_limit_on_members_api.md b/doc/administration/settings/rate_limit_on_members_api.md index 57765cf75bc..ac062cf7971 100644 --- a/doc/administration/settings/rate_limit_on_members_api.md +++ b/doc/administration/settings/rate_limit_on_members_api.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/settings/rate_limit_on_organizations_api.md b/doc/administration/settings/rate_limit_on_organizations_api.md index a8eda723a97..30cbdddfb15 100644 --- a/doc/administration/settings/rate_limit_on_organizations_api.md +++ b/doc/administration/settings/rate_limit_on_organizations_api.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/settings/rate_limit_on_projects_api.md b/doc/administration/settings/rate_limit_on_projects_api.md index 7605a1b1cc1..73fab979da9 100644 --- a/doc/administration/settings/rate_limit_on_projects_api.md +++ b/doc/administration/settings/rate_limit_on_projects_api.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/administration/settings/third_party_offers.md b/doc/administration/settings/third_party_offers.md index 3cc70c14366..ac94f35c88f 100644 --- a/doc/administration/settings/third_party_offers.md +++ b/doc/administration/settings/third_party_offers.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/graphql/removed_items.md b/doc/api/graphql/removed_items.md index 8489d6c629e..b890f26b604 100644 --- a/doc/api/graphql/removed_items.md +++ b/doc/api/graphql/removed_items.md @@ -14,6 +14,8 @@ GraphQL is a versionless API, unlike the REST API. Occasionally, items have to be updated or removed from the GraphQL API. According to our [process for removing items](index.md#deprecation-and-removal-process), here are the items that have been removed. +For deprecations, see the [Deprecations by version page](../../update/deprecations.md). + ## GitLab 17.0 Fields removed in GitLab 17.0. diff --git a/doc/api/group_badges.md b/doc/api/group_badges.md index cfd74033e20..c01b3f0ad01 100644 --- a/doc/api/group_badges.md +++ b/doc/api/group_badges.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/group_ldap_links.md b/doc/api/group_ldap_links.md index e7d69ff5b5d..acc2f9543f8 100644 --- a/doc/api/group_ldap_links.md +++ b/doc/api/group_ldap_links.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/groups.md b/doc/api/groups.md index 64bd401b5e4..460238630ca 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/invitations.md b/doc/api/invitations.md index db48d74033f..09bb296fb2e 100644 --- a/doc/api/invitations.md +++ b/doc/api/invitations.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/organizations.md b/doc/api/organizations.md index fb33e64e189..58ab0270e26 100644 --- a/doc/api/organizations.md +++ b/doc/api/organizations.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/project_forks.md b/doc/api/project_forks.md index 726ba6192ae..26a95001744 100644 --- a/doc/api/project_forks.md +++ b/doc/api/project_forks.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/project_starring.md b/doc/api/project_starring.md index d4dad4cbad3..79a883ec470 100644 --- a/doc/api/project_starring.md +++ b/doc/api/project_starring.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/projects.md b/doc/api/projects.md index 8e80f3956c0..34fab03a1d0 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/api/topics.md b/doc/api/topics.md index 1d3473c5ac6..50d5f8fa92b 100644 --- a/doc/api/topics.md +++ b/doc/api/topics.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/cells/application_settings_analysis.md b/doc/development/cells/application_settings_analysis.md index e3b0842b3d1..678c2731cc2 100644 --- a/doc/development/cells/application_settings_analysis.md +++ b/doc/development/cells/application_settings_analysis.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Cells Infrastructure info: Analysis of Application Settings for Cells 1.0. --- # Application Settings analysis diff --git a/doc/development/cells/index.md b/doc/development/cells/index.md index 7dba1b05b84..c8cea02cff3 100644 --- a/doc/development/cells/index.md +++ b/doc/development/cells/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Cells Infrastructure info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- diff --git a/doc/development/cells/topology_service.md b/doc/development/cells/topology_service.md index 22b67db8674..75938fe0f13 100644 --- a/doc/development/cells/topology_service.md +++ b/doc/development/cells/topology_service.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Cells Infrastructure info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index 1308f47f669..83f5b6b0822 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Cells Infrastructure info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- diff --git a/doc/development/image_scaling.md b/doc/development/image_scaling.md index ed38496e3a4..4f9008af826 100644 --- a/doc/development/image_scaling.md +++ b/doc/development/image_scaling.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- diff --git a/doc/development/integrations/secure.md b/doc/development/integrations/secure.md index f8baa669b1c..c055702bc2f 100644 --- a/doc/development/integrations/secure.md +++ b/doc/development/integrations/secure.md @@ -327,8 +327,9 @@ If a report uses a `PATCH` version that doesn't match any vendored schema versio the latest vendored `PATCH` version. For example, if a report version is 15.0.23 and the latest vendored version is 15.0.6, the report is validated against version 15.0.6. -GitLab uses the [`gitlab-security_report_schemas`](https://rubygems.org/gems/gitlab-security_report_schemas) -gem to perform validation. You can see which schema versions are supported in your GitLab version +GitLab validates reports against security report JSON schemas +it reads from the [`gitlab-security_report_schemas`](https://rubygems.org/gems/gitlab-security_report_schemas) +gem. You can see which schema versions are supported in your GitLab version by looking at the version of the gem in your GitLab installation. For example, [GitLab 15.4](https://gitlab.com/gitlab-org/gitlab/-/blob/93a2a651a48bd03d9d84847e1cade19962ab4292/Gemfile#L431) uses version `0.1.2.min15.0.0.max15.2.0`, which means it has versions in the range `15.0.0` and `15.2.0`. diff --git a/doc/development/organization/index.md b/doc/development/organization/index.md index 488a5b0db6b..47bc58af0ab 100644 --- a/doc/development/organization/index.md +++ b/doc/development/organization/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: "See the Technical Writers assigned to Development Guidelines: https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" description: "Development Guidelines: learn about organization when developing GitLab." --- diff --git a/doc/install/postgresql_extensions.md b/doc/install/postgresql_extensions.md index 68ef2492361..4342fd2fee1 100644 --- a/doc/install/postgresql_extensions.md +++ b/doc/install/postgresql_extensions.md @@ -1,5 +1,5 @@ --- -stage: Data Stores +stage: Tenant Scale group: Database info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/topics/git/project.md b/doc/topics/git/project.md index b4a8804be95..dbc05e861ff 100644 --- a/doc/topics/git/project.md +++ b/doc/topics/git/project.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments" --- diff --git a/doc/tutorials/convert_personal_namespace_to_group/index.md b/doc/tutorials/convert_personal_namespace_to_group/index.md index 80625ca754a..320185734c0 100644 --- a/doc/tutorials/convert_personal_namespace_to_group/index.md +++ b/doc/tutorials/convert_personal_namespace_to_group/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: For assistance with this tutorial, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- diff --git a/doc/tutorials/move_personal_project_to_group/index.md b/doc/tutorials/move_personal_project_to_group/index.md index 993d23c4f0f..27a159ffeb3 100644 --- a/doc/tutorials/move_personal_project_to_group/index.md +++ b/doc/tutorials/move_personal_project_to_group/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: For assistance with this tutorial, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index a7148c1b2bb..edf25a0d477 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -17,9 +17,7 @@ The following GitLab features are deprecated and no longer recommended for use. For advanced searching and filtering of this deprecation information, try [a tool built by our Customer Success team](https://gitlab-com.gitlab.io/cs-tools/gitlab-cs-tools/what-is-new-since/?tab=deprecations). -[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) -and [GraphQL deprecations](https://docs.gitlab.com/ee/api/graphql/removed_items.html) -are documented separately. +[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) are documented separately. **{rss}** **To be notified of upcoming breaking changes**, add this URL to your RSS feed reader: `https://about.gitlab.com/breaking-changes.xml` diff --git a/doc/user/get_started/get_started_projects.md b/doc/user/get_started/get_started_projects.md index 95ed08e24c1..6ad7e86fed4 100644 --- a/doc/user/get_started/get_started_projects.md +++ b/doc/user/get_started/get_started_projects.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/group/access_and_permissions.md b/doc/user/group/access_and_permissions.md index f0764805700..4c2e8c44fda 100644 --- a/doc/user/group/access_and_permissions.md +++ b/doc/user/group/access_and_permissions.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/group/index.md b/doc/user/group/index.md index 9b757ca9cd0..00964ad98bd 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/group/manage.md b/doc/user/group/manage.md index 08766a7ecba..70bdc343602 100644 --- a/doc/user/group/manage.md +++ b/doc/user/group/manage.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/group/subgroups/index.md b/doc/user/group/subgroups/index.md index bd1a715a632..be5bc3f2a75 100644 --- a/doc/user/group/subgroups/index.md +++ b/doc/user/group/subgroups/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/group/troubleshooting.md b/doc/user/group/troubleshooting.md index 5dcf99a02dc..a1b80ee978f 100644 --- a/doc/user/group/troubleshooting.md +++ b/doc/user/group/troubleshooting.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/namespace/index.md b/doc/user/namespace/index.md index a1278b00048..4a1efeaa4b6 100644 --- a/doc/user/namespace/index.md +++ b/doc/user/namespace/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/organization/index.md b/doc/user/organization/index.md index e043c0bf4c8..671d50cb8f6 100644 --- a/doc/user/organization/index.md +++ b/doc/user/organization/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/packages/dependency_proxy/index.md b/doc/user/packages/dependency_proxy/index.md index c38d7349a29..a81cf76cb87 100644 --- a/doc/user/packages/dependency_proxy/index.md +++ b/doc/user/packages/dependency_proxy/index.md @@ -4,21 +4,21 @@ group: Container Registry info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Dependency Proxy +# Dependency proxy for container images DETAILS: **Tier:** Free, Premium, Ultimate **Offering:** GitLab.com, Self-managed, GitLab Dedicated -The GitLab Dependency Proxy is a local proxy you can use for your frequently-accessed +The GitLab dependency proxy for container images is a local proxy you can use for your frequently-accessed upstream images. -In the case of CI/CD, the Dependency Proxy receives a request and returns the +In the case of CI/CD, the dependency proxy receives a request and returns the upstream image from a registry, acting as a pull-through cache. ## Prerequisites -To use the Dependency Proxy, it must be enabled for the GitLab instance. It's enabled by default, +To use the dependency proxy for container images, it must be enabled for the GitLab instance. It's enabled by default, but [administrators can turn it off](../../../administration/packages/dependency_proxy.md). ### Supported images and packages @@ -32,32 +32,32 @@ The following images and packages are supported. For a list of planned additions, view the [direction page](https://about.gitlab.com/direction/package/#dependency-proxy). -## Enable or turn off the Dependency Proxy for a group +## Enable or turn off the dependency proxy for a group > - Required role [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/350682) from Developer to Maintainer in GitLab 15.0. > - Required role [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/370471) from Maintainer to Owner in GitLab 17.0. -To enable or turn off the Dependency Proxy for a group: +To enable or turn off the dependency proxy for a group: 1. On the left sidebar, select **Search or go to** and find your group. 1. Select **Settings > Packages and registries**. 1. Expand the **Dependency Proxy** section. 1. To enable the proxy, turn on **Enable Proxy**. To turn it off, turn the toggle off. -This setting only affects the Dependency Proxy for a group. Only an administrator can -[turn the Dependency Proxy on or off](../../../administration/packages/dependency_proxy.md) +This setting only affects the dependency proxy for a group. Only an administrator can +[turn the dependency proxy on or off](../../../administration/packages/dependency_proxy.md) for the entire GitLab instance. -## View the Dependency Proxy +## View the dependency proxy for container images -To view the Dependency Proxy: +To view the dependency proxy for container images: 1. On the left sidebar, select **Search or go to** and find your group. 1. Select **Operate > Dependency Proxy**. -The Dependency Proxy is not available for projects. +The dependency proxy is not available for projects. -## Use the Dependency Proxy for Docker images +## Use the dependency proxy for Docker images You can use GitLab as a source for your Docker images. @@ -65,19 +65,19 @@ Prerequisites: - Your images must be stored on [Docker Hub](https://hub.docker.com/). -### Authenticate with the Dependency Proxy +### Authenticate with the dependency proxy for container images > - [Removed](https://gitlab.com/gitlab-org/gitlab/-/issues/276777) the feature flag `dependency_proxy_for_private_groups` in GitLab 15.0. > - Support for group access tokens [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362991) in GitLab 16.3. -Because the Dependency Proxy is storing Docker images in a space associated with your group, -you must authenticate against the Dependency Proxy. +Because the dependency proxy for container images is storing Docker images in a space associated with your group, +you must authenticate with it. Follow the [instructions for using images from a private registry](../../../ci/docker/using_docker_images.md#access-an-image-from-a-private-container-registry), but instead of using `registry.example.com:5000`, use your GitLab domain with no port `gitlab.example.com`. NOTE: -[Admin Mode](../../../administration/settings/sign_in_restrictions.md#admin-mode) does not apply during authentication with the dependency proxy. If you are an administrator with Admin Mode enabled, and you create a personal access token without the `admin_mode` scope, that token works even though Admin Mode is enabled. +[Admin Mode](../../../administration/settings/sign_in_restrictions.md#admin-mode) does not apply during authentication with the dependency proxy for container images. If you are an administrator with Admin Mode enabled, and you create a personal access token without the `admin_mode` scope, that token works even though Admin Mode is enabled. For example, to manually sign in: @@ -92,10 +92,10 @@ You can authenticate using: - A [group deploy token](../../../user/project/deploy_tokens/index.md) with the scope set to `read_registry` and `write_registry`. - A [group access token](../../../user/group/settings/group_access_tokens.md) for the group, with the scope set to `read_registry` and `write_registry`, or to `api`. -Users accessing the Dependency Proxy with a personal access token or username and password must +Users accessing the dependency proxy for container images with a personal access token or username and password must have at least the Guest role for the group they pull images from. -The Dependency Proxy follows the [Docker v2 token authentication flow](https://distribution.github.io/distribution/spec/auth/token/), +The dependency proxy for container images follows the [Docker v2 token authentication flow](https://distribution.github.io/distribution/spec/auth/token/), issuing the client a JWT to use for the pull requests. The JWT issued as a result of authenticating expires after some time. When the token expires, most Docker clients store your credentials and automatically request a new token without further action. @@ -106,17 +106,16 @@ On GitLab.com, the expiration time is 15 minutes. #### SAML SSO When [SSO enforcement](../../group/saml_sso/index.md#sso-enforcement) -is enabled, users must be signed-in through SSO before they can pull images through the Dependency -Proxy. +is enabled, users must be signed-in through SSO before they can pull images through the dependency proxy for container images. SSO enforcement also affects [auto-merge](../../project/merge_requests/auto_merge.md). If an SSO session expires before the auto-merge triggers, the merge pipeline fails -to pull images through the Dependency Proxy. +to pull images through the dependency proxy. #### Authenticate within CI/CD -Runners sign in to the Dependency Proxy automatically. To pull through -the Dependency Proxy, use one of the [predefined variables](../../../ci/variables/predefined_variables.md): +Runners sign in to the dependency proxy for container images automatically. To pull through +the dependency proxy, use one of the [predefined variables](../../../ci/variables/predefined_variables.md): - `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` pulls through the top-level group. - `CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX` pulls through the subgroup, or direct group the @@ -131,9 +130,9 @@ image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest There are other additional predefined CI/CD variables you can also use: -- `CI_DEPENDENCY_PROXY_USER`: A CI/CD user for logging in to the Dependency Proxy. -- `CI_DEPENDENCY_PROXY_PASSWORD`: A CI/CD password for logging in to the Dependency Proxy. -- `CI_DEPENDENCY_PROXY_SERVER`: The server for logging in to the Dependency Proxy. +- `CI_DEPENDENCY_PROXY_USER`: A CI/CD user for logging in to the dependency proxy. +- `CI_DEPENDENCY_PROXY_PASSWORD`: A CI/CD password for logging in to the dependency proxy +- `CI_DEPENDENCY_PROXY_SERVER`: The server for logging in to the dependency proxy. - `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX`: the image prefix for pulling images through the dependency proxy from the top-level group. - `CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX`: the image prefix for pulling images through the @@ -141,15 +140,14 @@ There are other additional predefined CI/CD variables you can also use: `CI_DEPENDENCY_PROXY_SERVER`, `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX`, and `CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX` -include the server port. If you explicitly include the Dependency Proxy -path, the port must be included, unless you have logged into the Dependency -Proxy manually without including the port: +include the server port. If you explicitly include the dependency proxy +path, the port must be included, unless you have logged into the dependency proxy manually without including the port: ```shell docker pull gitlab.example.com:443/my-group/dependency_proxy/containers/alpine:latest ``` -Example when using the Dependency Proxy to build an image: +Example when using the dependency proxy to build an image: ```plaintext # Dockerfile @@ -177,9 +175,9 @@ build: You can also use [custom CI/CD variables](../../../ci/variables/index.md#for-a-project) to store and access your personal access token or deploy token. -### Store a Docker image in Dependency Proxy cache +### Store a Docker image in dependency proxy cache -To store a Docker image in Dependency Proxy storage: +To store a Docker image in dependency proxy storage: 1. On the left sidebar, select **Search or go to** and find your group. 1. Select **Operate > Dependency Proxy**. @@ -218,19 +216,19 @@ from the GitLab server. ## Reduce storage usage -For information on reducing your storage use on the Dependency Proxy, see -[Reduce Dependency Proxy storage use](reduce_dependency_proxy_storage.md). +For information on reducing your storage use on the dependency proxy for container images, see +[Reduce dependency proxy storage use](reduce_dependency_proxy_storage.md). -## Docker Hub rate limits and the Dependency Proxy +## Docker Hub rate limits and the dependency proxy -Watch how to [use the Dependency Proxy to help avoid Docker Hub rate limits](https://youtu.be/Nc4nUo7Pq08). +Watch how to [use the dependency proxy to help avoid Docker Hub rate limits](https://youtu.be/Nc4nUo7Pq08). In November 2020, Docker introduced [rate limits on pull requests from Docker Hub](https://docs.docker.com/docker-hub/download-rate-limit/). If your GitLab [CI/CD configuration](../../../ci/index.md) uses an image from Docker Hub, each time a job runs, it may count as a pull request. -To help get around this limit, you can pull your image from the Dependency Proxy cache instead. +To help get around this limit, you can pull your image from the dependency proxy cache instead. When you pull an image (by using a command like `docker pull` or, in a `.gitlab-ci.yml` file, `image: foo:latest`), the Docker client makes a collection of requests: @@ -240,7 +238,7 @@ file, `image: foo:latest`), the Docker client makes a collection of requests: 1. Using the manifest, the Docker client requests a collection of layers, also known as blobs, one at a time. -The Docker Hub rate limit is based on the number of GET requests for the manifest. The Dependency Proxy +The Docker Hub rate limit is based on the number of GET requests for the manifest. The dependency proxy caches both the manifest and blobs for a given image, so when you request it again, Docker Hub does not have to be contacted. @@ -248,18 +246,18 @@ Docker Hub does not have to be contacted. If you are using an image tag like `alpine:latest`, the image changes over time. Each time it changes, the manifest contains different information about which -blobs to request. The Dependency Proxy does not pull a new image each time the +blobs to request. The dependency proxy does not pull a new image each time the manifest changes; it checks only when the manifest becomes stale. Docker does not count HEAD requests for the image manifest towards the rate limit. You can make a HEAD request for `alpine:latest`, view the digest (checksum) value returned in the header, and determine if a manifest has changed. -The Dependency Proxy starts all requests with a HEAD request. If the manifest +The dependency proxy starts all requests with a HEAD request. If the manifest has become stale, only then is a new image pulled. For example, if your pipeline pulls `node:latest` every five -minutes, the Dependency Proxy caches the entire image and only updates it if +minutes, the dependency proxy caches the entire image and only updates it if `node:latest` changes. So instead of having 360 requests for the image in six hours (which exceeds the Docker Hub rate limit), you only have one pull request, unless the manifest changed during that time. @@ -305,9 +303,9 @@ hub_docker_quota_check: ### Authentication error: "HTTP Basic: Access Denied" -If you receive an `HTTP Basic: Access denied` error when authenticating against the Dependency Proxy, refer to the [two-factor authentication troubleshooting guide](../../profile/account/two_factor_authentication_troubleshooting.md). +If you receive an `HTTP Basic: Access denied` error when authenticating against the dependency proxy, refer to the [two-factor authentication troubleshooting guide](../../profile/account/two_factor_authentication_troubleshooting.md). -### Dependency Proxy Connection Failure +### Dependency proxy connection failure If a service alias is not set the `docker:20.10.16` image is unable to find the `dind` service, and an error like the following is thrown: @@ -324,13 +322,13 @@ services: alias: docker ``` -### Issues when authenticating to the Dependency Proxy from CI/CD jobs +### Issues when authenticating to the dependency proxy from CI/CD jobs -GitLab Runner authenticates automatically to the Dependency Proxy. However, the underlying Docker engine is still subject to its [authorization resolving process](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#precedence-of-docker-authorization-resolving). +GitLab Runner authenticates automatically to the dependency proxy. However, the underlying Docker engine is still subject to its [authorization resolving process](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#precedence-of-docker-authorization-resolving). Misconfigurations in the authentication mechanism may cause `HTTP Basic: Access denied` and `403: Access forbidden` errors. -You can use the job logs to view the authentication mechanism used to authenticate against the Dependency Proxy: +You can use the job logs to view the authentication mechanism used to authenticate against the dependency proxy: ```plaintext Authenticating with credentials from $DOCKER_AUTH_CONFIG @@ -349,7 +347,7 @@ Make sure you are using the expected authentication mechanism. ### `Not Found` or `404` error when pulling image Errors like these might indicate that the user running the job doesn't have -a minimum of the Guest role for the Dependency Proxy group: +a minimum of the Guest role for the dependency proxy group: - ```plaintext ERROR: gitlab.example.com:443/group1/dependency_proxy/containers/alpine:latest: not found diff --git a/doc/user/packages/dependency_proxy/reduce_dependency_proxy_storage.md b/doc/user/packages/dependency_proxy/reduce_dependency_proxy_storage.md index 826a462a3a9..60a9a03abf5 100644 --- a/doc/user/packages/dependency_proxy/reduce_dependency_proxy_storage.md +++ b/doc/user/packages/dependency_proxy/reduce_dependency_proxy_storage.md @@ -4,7 +4,7 @@ group: Container Registry info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- -# Reduce Dependency Proxy Storage +# Reduce dependency proxy storage for container images DETAILS: **Tier:** Free, Premium, Ultimate @@ -13,14 +13,14 @@ DETAILS: There's no automatic removal process for blobs. Unless you delete them manually, they're stored indefinitely. This page covers several options for clearing unused items from the cache. -## Check Dependency Proxy Storage Use +## Check dependency proxy storage use -The [**Usage Quotas**](../../storage_usage_quotas.md) page displays storage usage for the dependency proxy. +The [**Usage Quotas**](../../storage_usage_quotas.md) page displays storage usage for the dependency proxy for container images. ## Use the API to clear the cache To reclaim disk space used by image blobs that are no longer needed, use the -[Dependency Proxy API](../../../api/dependency_proxy.md) +[dependency proxy API](../../../api/dependency_proxy.md) to clear the entire cache. If you clear the cache, the next time a pipeline runs it must pull an image or tag from Docker Hub. @@ -31,7 +31,7 @@ image or tag from Docker Hub. ### Enable cleanup policies from within GitLab -You can enable an automatic time-to-live (TTL) policy for the Dependency Proxy from the user +You can enable an automatic time-to-live (TTL) policy for the dependency proxy for container images from the user interface. To do this, go to your group's **Settings > Packages and registries > Dependency Proxy** and enable the setting to automatically clear items from the cache after 90 days. diff --git a/doc/user/profile/account/two_factor_authentication_troubleshooting.md b/doc/user/profile/account/two_factor_authentication_troubleshooting.md index 0c3b6369d8f..8a63e4b04e9 100644 --- a/doc/user/profile/account/two_factor_authentication_troubleshooting.md +++ b/doc/user/profile/account/two_factor_authentication_troubleshooting.md @@ -36,7 +36,7 @@ Instead you can authenticate: - For Git requests over HTTP(S), a PAT with `read_repository` or `write_repository` scope is required. - For [GitLab container registry](../../packages/container_registry/authenticate_with_container_registry.md) requests, a PAT with `read_registry` or `write_registry` scope is required. - - For [Dependency Proxy](../../packages/dependency_proxy/index.md#authenticate-with-the-dependency-proxy) requests, a PAT with + - For [dependency proxy](../../packages/dependency_proxy/index.md#authenticate-with-the-dependency-proxy-for-container-images) requests, a PAT with `read_registry` and `write_registry` scopes is required. - If you have configured LDAP, using an [LDAP password](../../../administration/auth/ldap/index.md) - Using an [OAuth credential helper](../../profile/account/two_factor_authentication.md#oauth-credential-helpers). diff --git a/doc/user/profile/achievements.md b/doc/user/profile/achievements.md index 4b262941347..13e464d4fe0 100644 --- a/doc/user/profile/achievements.md +++ b/doc/user/profile/achievements.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/profile/contributions_calendar.md b/doc/user/profile/contributions_calendar.md index 13ee207e186..73a1aca8f1a 100644 --- a/doc/user/profile/contributions_calendar.md +++ b/doc/user/profile/contributions_calendar.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/badges.md b/doc/user/project/badges.md index 602754767c5..bfa822a86e7 100644 --- a/doc/user/project/badges.md +++ b/doc/user/project/badges.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/index.md b/doc/user/project/index.md index ec6e4ee839c..89783cf4ec2 100644 --- a/doc/user/project/index.md +++ b/doc/user/project/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments" --- diff --git a/doc/user/project/members/index.md b/doc/user/project/members/index.md index 0a05a6c62bc..9735aa70702 100644 --- a/doc/user/project/members/index.md +++ b/doc/user/project/members/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/members/sharing_projects_groups.md b/doc/user/project/members/sharing_projects_groups.md index 588e370ba81..865d47953ca 100644 --- a/doc/user/project/members/sharing_projects_groups.md +++ b/doc/user/project/members/sharing_projects_groups.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/organize_work_with_projects.md b/doc/user/project/organize_work_with_projects.md index 71829dbba17..779afd662c7 100644 --- a/doc/user/project/organize_work_with_projects.md +++ b/doc/user/project/organize_work_with_projects.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations description: Project visibility, search, badges, layout. info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/project_topics.md b/doc/user/project/project_topics.md index 5ca95231489..92188d4e5f9 100644 --- a/doc/user/project/project_topics.md +++ b/doc/user/project/project_topics.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/settings/index.md b/doc/user/project/settings/index.md index b39ccf363c2..02dfed13759 100644 --- a/doc/user/project/settings/index.md +++ b/doc/user/project/settings/index.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/settings/migrate_projects.md b/doc/user/project/settings/migrate_projects.md index cce15d7dc5c..659701c2562 100644 --- a/doc/user/project/settings/migrate_projects.md +++ b/doc/user/project/settings/migrate_projects.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: 'To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments' --- diff --git a/doc/user/project/troubleshooting.md b/doc/user/project/troubleshooting.md index 959803ce42a..0e233430638 100644 --- a/doc/user/project/troubleshooting.md +++ b/doc/user/project/troubleshooting.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/project/use_project_as_go_package.md b/doc/user/project/use_project_as_go_package.md index 8c6a878ed4b..163210620ee 100644 --- a/doc/user/project/use_project_as_go_package.md +++ b/doc/user/project/use_project_as_go_package.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments" --- diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md index c2990038017..3dfb5110187 100644 --- a/doc/user/project/working_with_projects.md +++ b/doc/user/project/working_with_projects.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments" --- diff --git a/doc/user/public_access.md b/doc/user/public_access.md index 8b87e304cc5..8ddd80c04c7 100644 --- a/doc/user/public_access.md +++ b/doc/user/public_access.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/user/reserved_names.md b/doc/user/reserved_names.md index 3b32616938a..4bf9a06f8f1 100644 --- a/doc/user/reserved_names.md +++ b/doc/user/reserved_names.md @@ -1,6 +1,6 @@ --- -stage: Data Stores -group: Tenant Scale +stage: Tenant Scale +group: Organizations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/lib/gitlab/issues/type_association_getter.rb b/lib/gitlab/issues/type_association_getter.rb index b71783357eb..c9eb2aba05a 100644 --- a/lib/gitlab/issues/type_association_getter.rb +++ b/lib/gitlab/issues/type_association_getter.rb @@ -4,11 +4,7 @@ module Gitlab module Issues module TypeAssociationGetter def self.call - if Feature.enabled?(:issues_use_correct_work_item_type_id, :instance) - :correct_work_item_type - else - :work_item_type - end + :correct_work_item_type end end end diff --git a/lib/gitlab/jira_import/issue_serializer.rb b/lib/gitlab/jira_import/issue_serializer.rb index ba9c4546d61..e3371c6dae8 100644 --- a/lib/gitlab/jira_import/issue_serializer.rb +++ b/lib/gitlab/jira_import/issue_serializer.rb @@ -15,7 +15,7 @@ module Gitlab end def execute - attributes = { + { iid: params[:iid], project_id: project.id, namespace_id: project.project_namespace_id, @@ -26,16 +26,9 @@ module Gitlab created_at: jira_issue.created, author_id: reporter, assignee_ids: assignees, - label_ids: label_ids + label_ids: label_ids, + correct_work_item_type_id: @work_item_type.correct_id } - - if Feature.enabled?(:issues_set_correct_work_item_type_id, :instance) - attributes[:correct_work_item_type_id] = @work_item_type.correct_id - else - attributes[:work_item_type_id] = @work_item_type.id - end - - attributes end private diff --git a/scripts/cells/application-settings-analysis.rb b/scripts/cells/application-settings-analysis.rb index f1b74afc88c..8416d5db100 100755 --- a/scripts/cells/application-settings-analysis.rb +++ b/scripts/cells/application-settings-analysis.rb @@ -356,8 +356,8 @@ class ApplicationSettingsAnalysis DOC_PAGE_HEADERS = [ "---", - "stage: Data Stores", - "group: Tenant Scale", + "stage: Tenant Scale", + "group: Cells Infrastructure", "info: Analysis of Application Settings for Cells 1.0.", "---", "# Application Settings analysis\n", diff --git a/spec/features/user_settings/active_sessions_spec.rb b/spec/features/user_settings/active_sessions_spec.rb index d7ca5627259..da36c5853f1 100644 --- a/spec/features/user_settings/active_sessions_spec.rb +++ b/spec/features/user_settings/active_sessions_spec.rb @@ -119,20 +119,4 @@ RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state, fe expect(page).to have_content('You need to sign in or sign up before continuing.') end end - - it 'load_raw_session does load known attributes only' do - new_session = ActiveSession.send(:load_raw_session, - 'v2:{"ip_address": "127.0.0.1", "browser": "Firefox", "os": "Debian",' \ - '"device_type": "desktop", "session_id": "8f62cc7383c",' \ - '"new_attribute": "unknown attribute"}' - ) - - expect(new_session).to have_attributes( - ip_address: "127.0.0.1", - browser: "Firefox", - os: "Debian", - device_type: "desktop", - session_id: "8f62cc7383c" - ) - end end diff --git a/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js b/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js index 8d833e45e83..4f9c5a2febc 100644 --- a/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js +++ b/spec/frontend/content_editor/components/wrappers/table_cell_base_spec.js @@ -61,9 +61,7 @@ describe('content/components/wrappers/table_cell_base', () => { expect(findDropdown().props()).toMatchObject({ category: 'tertiary', - icon: 'chevron-down', size: 'small', - noCaret: true, }); expect(findDropdown().attributes()).toMatchObject({ boundary: 'viewport', diff --git a/spec/lib/gitlab/issues/type_association_getter_spec.rb b/spec/lib/gitlab/issues/type_association_getter_spec.rb index 1ac67d3bb02..74c8107cca9 100644 --- a/spec/lib/gitlab/issues/type_association_getter_spec.rb +++ b/spec/lib/gitlab/issues/type_association_getter_spec.rb @@ -7,13 +7,5 @@ RSpec.describe Gitlab::Issues::TypeAssociationGetter, feature_category: :team_pl subject { described_class.call } it { is_expected.to eq(:correct_work_item_type) } - - context 'when issues_use_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_use_correct_work_item_type_id: false) - end - - it { is_expected.to eq(:work_item_type) } - end end end diff --git a/spec/lib/gitlab/jira_import/issue_serializer_spec.rb b/spec/lib/gitlab/jira_import/issue_serializer_spec.rb index f3bf0303ba8..aeeed807379 100644 --- a/spec/lib/gitlab/jira_import/issue_serializer_spec.rb +++ b/spec/lib/gitlab/jira_import/issue_serializer_spec.rb @@ -88,29 +88,6 @@ RSpec.describe Gitlab::JiraImport::IssueSerializer do ) end - context 'when the issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it 'sets work_item_type_id' do - expect(subject).to include( - iid: iid, - project_id: project.id, - namespace_id: project.project_namespace_id, - description: expected_description.strip, - title: "[#{key}] #{summary}", - state_id: 1, - updated_at: updated_at, - created_at: created_at, - author_id: current_user.id, - assignee_ids: nil, - label_ids: [project_label.id, group_label.id] + Label.reorder(id: :asc).last(2).pluck(:id), - work_item_type_id: issue_type.id - ) - end - end - it 'creates a hash for valid issue' do expect(Issue.new(subject)).to be_valid end diff --git a/spec/migrations/20241108133603_queue_backfill_seat_assignments_table_spec.rb b/spec/migrations/20241108133603_queue_backfill_seat_assignments_table_spec.rb index 75f45becf9b..cd15993d34b 100644 --- a/spec/migrations/20241108133603_queue_backfill_seat_assignments_table_spec.rb +++ b/spec/migrations/20241108133603_queue_backfill_seat_assignments_table_spec.rb @@ -6,21 +6,14 @@ require_migration! RSpec.describe QueueBackfillSeatAssignmentsTable, migration: :gitlab_main, feature_category: :seat_cost_management do let!(:batched_migration) { described_class::MIGRATION } - it 'schedules a new batched migration' do + it 'does nothing' do reversible_migration do |migration| migration.before -> { expect(batched_migration).not_to have_scheduled_batched_migration } migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - gitlab_schema: :gitlab_main, - table_name: :members, - column_name: :id, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) + expect(batched_migration).not_to have_scheduled_batched_migration } end end diff --git a/spec/migrations/20241209131010_queue_requeue_backfill_seat_assignments_table_spec.rb b/spec/migrations/20241209131010_queue_requeue_backfill_seat_assignments_table_spec.rb new file mode 100644 index 00000000000..0f45775a5cb --- /dev/null +++ b/spec/migrations/20241209131010_queue_requeue_backfill_seat_assignments_table_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe QueueRequeueBackfillSeatAssignmentsTable, migration: :gitlab_main, feature_category: :seat_cost_management do + let!(:batched_migration) { described_class::MIGRATION } + + it 'schedules a new batched migration' do + reversible_migration do |migration| + migration.before -> { + expect(batched_migration).not_to have_scheduled_batched_migration + } + + migration.after -> { + expect(batched_migration).to have_scheduled_batched_migration( + gitlab_schema: :gitlab_main, + table_name: :members, + column_name: :id, + interval: described_class::DELAY_INTERVAL, + batch_size: described_class::BATCH_SIZE, + sub_batch_size: described_class::SUB_BATCH_SIZE + ) + } + end + end +end diff --git a/spec/models/active_session_spec.rb b/spec/models/active_session_spec.rb index 8181fbf3486..cc9ac2ec321 100644 --- a/spec/models/active_session_spec.rb +++ b/spec/models/active_session_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do +RSpec.describe ActiveSession, :clean_gitlab_redis_sessions, feature_category: :system_access do let(:lookup_key) { described_class.lookup_key_name(user.id) } let(:user) do create(:user).tap do |user| @@ -79,6 +79,10 @@ RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do ) end + it 'returns an empty array if the user does not have any active session' do + expect(described_class.list(user)).to be_empty + end + shared_examples 'ignoring obsolete entries' do let(:session_id) { '6919a6f1bb119dd7396fadc38fd18d0d' } let(:session) { described_class.new(session_id: 'a') } @@ -116,10 +120,34 @@ RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do let(:serialized_session) { session.dump } it_behaves_like 'ignoring obsolete entries' - end - it 'returns an empty array if the user does not have any active session' do - expect(described_class.list(user)).to be_empty + context 'when the current session contains unknown attributes' do + let(:session_id) { '8f62cc7383c' } + let(:session_key) { described_class.key_name(user.id, session_id) } + let(:serialized_session) do + "v2:{\"ip_address\": \"127.0.0.1\", \"browser\": \"Firefox\", \"os\": \"Debian\", " \ + "\"device_type\": \"desktop\", \"session_id\": \"#{session_id}\", " \ + "\"new_attribute\": \"unknown attribute\"}" + end + + it 'loads known attributes only' do + Gitlab::Redis::Sessions.with do |redis| + redis.set(session_key, serialized_session) + redis.sadd(lookup_key, [session_id]) + end + + expect(described_class.list(user)).to contain_exactly( + have_attributes( + ip_address: "127.0.0.1", + browser: "Firefox", + os: "Debian", + device_type: "desktop", + session_id: session_id.to_s + ) + ) + expect(described_class.list(user).first).not_to respond_to :new_attribute + end + end end end diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index db89993f7bd..85ddd72ffca 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -565,23 +565,6 @@ RSpec.describe Issue, feature_category: :team_planning do }x ) end - - context 'when issues_use_correct_work_item_type_id FF is disabled' do - before do - stub_feature_flags(issues_use_correct_work_item_type_id: false) - end - - it 'joins the work_item_types table for filtering with issues.work_item_type_id column' do - expect do - described_class.with_issue_type([:issue, :incident]).to_a - end.to make_queries_matching( - %r{ - INNER\sJOIN\s"work_item_types"\sON\s"work_item_types"\."id"\s=\s"issues"\."work_item_type_id" - \sWHERE\s"work_item_types"\."base_type"\sIN\s\(0,\s1\) - }x - ) - end - end end context 'when a single issue_type is provided' do @@ -597,24 +580,6 @@ RSpec.describe Issue, feature_category: :team_planning do }x ) end - - context 'when issues_use_correct_work_item_type_id FF is disabled' do - before do - stub_feature_flags(issues_use_correct_work_item_type_id: false) - end - - it 'uses an optimized query for a single work item type using issues.work_item_type_id column' do - expect do - described_class.with_issue_type([:incident]).to_a - end.to make_queries_matching( - %r{ - WHERE\s\("issues"\."work_item_type_id"\s= - \s\(SELECT\s"work_item_types"\."id"\sFROM\s"work_item_types"\sWHERE\s"work_item_types"\."base_type"\s=\s1 - \sLIMIT\s1\)\) - }x - ) - end - end end context 'when no types are provided' do @@ -649,23 +614,6 @@ RSpec.describe Issue, feature_category: :team_planning do }x ) end - - context 'when issues_use_correct_work_item_type_id FF is disabled' do - before do - stub_feature_flags(issues_use_correct_work_item_type_id: false) - end - - it 'uses the work_item_types table and issues.work_item_type_id for filtering' do - expect do - described_class.without_issue_type(:issue).to_a - end.to make_queries_matching( - %r{ - INNER\sJOIN\s"work_item_types"\sON\s"work_item_types"\."id"\s=\s"issues"\."work_item_type_id" - \sWHERE\s"work_item_types"\."base_type"\s!=\s0 - }x - ) - end - end end describe '.order_severity' do @@ -2649,18 +2597,6 @@ RSpec.describe Issue, feature_category: :team_planning do issue.work_item_type end.to make_queries_matching(/FROM "work_item_types" WHERE "work_item_types"\."correct_id" =/) end - - context 'when the issues_use_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_use_correct_work_item_type_id: false) - end - - it 'uses the work_item_type_id column to fetch the associated type' do - expect do - issue.work_item_type - end.to make_queries_matching(/FROM "work_item_types" WHERE "work_item_types"\."id" =/) - end - end end describe '#work_item_type_id=', :aggregate_failures do @@ -2708,36 +2644,6 @@ RSpec.describe Issue, feature_category: :team_planning do expect(issue.correct_work_item_type_id).to eq(type1.correct_id) end - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it 'does not find the type by correct_id' do - issue = build(:issue, project: reusable_project, work_item_type: nil) - - expect(issue.work_item_type_id).to be_nil - expect(issue.correct_work_item_type_id).to be_nil - - issue.work_item_type_id = type1.correct_id - - expect(issue.work_item_type_id).to be_nil - expect(issue.correct_work_item_type_id).to be_nil - end - - it 'also sets correct_work_item_type_id when setting id' do - issue = build(:issue, project: reusable_project, work_item_type: nil) - - expect(issue.work_item_type_id).to be_nil - expect(issue.correct_work_item_type_id).to be_nil - - issue.work_item_type_id = type1.id - - expect(issue.work_item_type_id).to eq(type1.id) - expect(issue.correct_work_item_type_id).to eq(type1.correct_id) - end - end - context 'when work_item_type_id does not exist in the DB' do it 'does not set type id values' do issue = build(:issue, project: reusable_project, work_item_type: nil) diff --git a/spec/models/work_items/type_spec.rb b/spec/models/work_items/type_spec.rb index d3f5904e85a..b9462b65d94 100644 --- a/spec/models/work_items/type_spec.rb +++ b/spec/models/work_items/type_spec.rb @@ -9,18 +9,6 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do GlobalID.new(type.public_send(gid_method).to_s).model_id.to_i ).to eq(type.attributes['correct_id']) end - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it 'uses the id column for global ids' do - expect( - GlobalID.new(type.public_send(gid_method).to_s).model_id.to_i - ).to eq(type.attributes['id']) - end - end end describe 'modules' do @@ -134,42 +122,18 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do let(:ids_for_scope) { nil } it { is_expected.to be_empty } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to be_empty } - end end context 'when ids are empty array' do let(:ids_for_scope) { [] } it { is_expected.to be_empty } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to be_empty } - end end context 'when using old ids' do let(:ids_for_scope) { [type1, type2].map(&:old_id) } it { is_expected.to contain_exactly(type1, type2) } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to be_empty } - end end context 'when using correct ids' do @@ -177,42 +141,18 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do # type3 only gets matched because it's old_id matches type2.correct_id it { is_expected.to contain_exactly(type1, type2, type3) } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to be_empty } - end end context 'when using correct ids but another type has the same old_id value' do let(:ids_for_scope) { [type2].map(&:correct_id) } it { is_expected.to contain_exactly(type2, type3) } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to be_empty } - end end context 'when using ids' do let(:ids_for_scope) { [type1, type2].map(&:id) } it { is_expected.to be_empty } - - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it { is_expected.to contain_exactly(type1, type2) } - end end end diff --git a/spec/requests/projects/merge_requests/creations_diffs_stream_controller_spec.rb b/spec/requests/projects/merge_requests/creations_diffs_stream_controller_spec.rb new file mode 100644 index 00000000000..f22ffe2931c --- /dev/null +++ b/spec/requests/projects/merge_requests/creations_diffs_stream_controller_spec.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Merge Request Creations diffs stream', feature_category: :code_review_workflow do + let_it_be(:project) { create(:project, :public, :repository) } + let_it_be(:user) { create(:user, maintainer_of: project) } + let_it_be(:source_branch) { 'fix' } + let_it_be(:target_branch) { 'master' } + + let_it_be(:compare) do + CompareService.new( + project, + source_branch + ).execute( + project, + target_branch + ) + end + + let_it_be(:offset) { 0 } + let_it_be(:diff_files) { compare.diffs.diff_files } + + before do + sign_in(user) + end + + describe 'GET diffs_stream' do + def send_request(**extra_params) + params = { + namespace_id: project.namespace, + project_id: project, + offset: offset, + merge_request: { + source_branch: source_branch, + target_branch: target_branch + } + } + + get namespace_project_new_merge_request_diffs_stream_path(params.merge(extra_params)) + end + + it 'includes all diffs' do + send_request + + streamed_content = response.body + + diff_files.each do |diff_file| + expect(streamed_content).to include(diff_file.new_path) + end + end + + include_examples 'diffs stream tests' + + context 'when user does not access to create merge request' do + let(:user) { create(:user) } + + it 'returns a 404 status' do + send_request + + expect(response).to have_gitlab_http_status(:not_found) + end + end + + context 'when merge request cannot be created' do + before do + allow_next_instance_of(MergeRequest) do |instance| + allow(instance).to receive(:can_be_created).and_return(false) + end + end + + it 'no diffs are streamed' do + send_request + + expect(response.body).to be_empty + end + end + end +end diff --git a/spec/support/shared_examples/requests/api/graphql/work_item_type_list_shared_examples.rb b/spec/support/shared_examples/requests/api/graphql/work_item_type_list_shared_examples.rb index de599303de8..b614a365131 100644 --- a/spec/support/shared_examples/requests/api/graphql/work_item_type_list_shared_examples.rb +++ b/spec/support/shared_examples/requests/api/graphql/work_item_type_list_shared_examples.rb @@ -39,18 +39,6 @@ RSpec.shared_examples 'graphql work item type list request spec' do |context_nam expect(ids_from_response).to match_array(WorkItems::Type.pluck(:correct_id)) end - context 'when issues_set_correct_work_item_type_id feature flag is disabled' do - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it 'exposes id in the API through the id field' do - post_graphql(query, current_user: current_user) - - expect(ids_from_response).to match_array(WorkItems::Type.pluck(:id)) - end - end - it 'prevents N+1 queries' do # Destroy 2 existing types WorkItems::Type.by_type([:issue, :task]).delete_all diff --git a/spec/views/projects/pipelines/show.html.haml_spec.rb b/spec/views/projects/pipelines/show.html.haml_spec.rb index 65659129918..b8599144eac 100644 --- a/spec/views/projects/pipelines/show.html.haml_spec.rb +++ b/spec/views/projects/pipelines/show.html.haml_spec.rb @@ -4,21 +4,21 @@ require 'spec_helper' RSpec.describe 'projects/pipelines/show', feature_category: :pipeline_composition do include Devise::Test::ControllerHelpers + let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } - let(:pipeline) { create(:ci_pipeline, project: project) } let(:presented_pipeline) { pipeline.present(current_user: user) } before do + allow(view).to receive(:current_user) { user } assign(:project, project) assign(:pipeline, presented_pipeline) - allow(view).to receive(:current_user) { user } end context 'when pipeline has errors' do before do - allow(pipeline).to receive(:yaml_errors).and_return('some errors') + create(:ci_pipeline_message, pipeline: pipeline, content: 'some errors', severity: :error) end it 'shows errors' do @@ -51,7 +51,7 @@ RSpec.describe 'projects/pipelines/show', feature_category: :pipeline_compositio end end - context 'when pipeline is valid' do + context 'when pipeline does not have errors' do it 'does not show errors' do render diff --git a/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb b/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb index 81da9145457..363d02b685c 100644 --- a/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb +++ b/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb @@ -137,37 +137,6 @@ RSpec.describe Gitlab::JiraImport::ImportIssueWorker, feature_category: :importe expect(issue.correct_work_item_type_id).to eq(issue_type.correct_id) expect(issue.work_item_type_id).to eq(issue_type.id) end - - context 'when the issues_set_correct_work_item_type_id feature flag is disabled' do - let(:delay_exec) { true } - - before do - stub_feature_flags(issues_set_correct_work_item_type_id: false) - end - - it 'record a failed to import issue, old_id does not exist in the work_item_types.id column' do - perform_inline - - expect( - Gitlab::Cache::Import::Caching.read(Gitlab::JiraImport.failed_issues_counter_cache_key(project.id)).to_i - ).to eq(1) - end - - context 'when a correct work_item_types_id is used' do - let(:work_item_type_id) { issue_type.id } - - it 'creates an issue with the correct type' do - expect(::WorkItems::Type).not_to receive(:find_by_correct_id_with_fallback) - - perform_inline - - issue = Issue.last - - expect(issue.correct_work_item_type_id).to eq(issue_type.correct_id) - expect(issue.work_item_type_id).to eq(issue_type.id) - end - end - end end context 'when assignee_ids is nil' do