diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml
index 4a743a3393b9f..052a1b1bb7e0c 100644
--- a/.rubocop_todo/layout/argument_alignment.yml
+++ b/.rubocop_todo/layout/argument_alignment.yml
@@ -1396,7 +1396,6 @@ Layout/ArgumentAlignment:
- 'spec/lib/gitlab/gitaly_client/ref_service_spec.rb'
- 'spec/lib/gitlab/gitaly_client_spec.rb'
- 'spec/lib/gitlab/github_gists_import/importer/gist_importer_spec.rb'
- - 'spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb'
- 'spec/lib/gitlab/github_import/importer/labels_importer_spec.rb'
- 'spec/lib/gitlab/github_import/importer/milestones_importer_spec.rb'
- 'spec/lib/gitlab/graphql/query_analyzers/ast/logger_analyzer_spec.rb'
diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml
index 4ea3134accf00..fbfd72fde7dfe 100644
--- a/.rubocop_todo/rspec/feature_category.yml
+++ b/.rubocop_todo/rspec/feature_category.yml
@@ -3464,7 +3464,6 @@ RSpec/FeatureCategory:
- 'spec/lib/gitlab/github_import/importer/events/renamed_spec.rb'
- 'spec/lib/gitlab/github_import/importer/events/reopened_spec.rb'
- 'spec/lib/gitlab/github_import/importer/issue_and_label_links_importer_spec.rb'
- - 'spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb'
- 'spec/lib/gitlab/github_import/importer/issue_importer_spec.rb'
- 'spec/lib/gitlab/github_import/importer/label_links_importer_spec.rb'
- 'spec/lib/gitlab/github_import/importer/lfs_object_importer_spec.rb'
diff --git a/app/graphql/types/ci/catalog/resources/component_type.rb b/app/graphql/types/ci/catalog/resources/component_type.rb
index ea0b991b3cce4..3b4771446cb1b 100644
--- a/app/graphql/types/ci/catalog/resources/component_type.rb
+++ b/app/graphql/types/ci/catalog/resources/component_type.rb
@@ -4,9 +4,9 @@ module Types
module Ci
module Catalog
module Resources
- # rubocop: disable Graphql/AuthorizeTypes -- Authorization is handled by VersionsType
+ # rubocop: disable Graphql/AuthorizeTypes -- Authorization is handled by VersionType
class ComponentType < BaseObject
- graphql_name 'CiCatalogResourcesComponent'
+ graphql_name 'CiCatalogResourceComponent'
field :id, ::Types::GlobalIDType[::Ci::Catalog::Resources::Component], null: false,
description: 'ID of the component.',
diff --git a/app/graphql/types/ci/catalog/resources/components/input_type.rb b/app/graphql/types/ci/catalog/resources/components/input_type.rb
index a643a7b84e3ee..4b20c564ea7ef 100644
--- a/app/graphql/types/ci/catalog/resources/components/input_type.rb
+++ b/app/graphql/types/ci/catalog/resources/components/input_type.rb
@@ -7,7 +7,7 @@ module Resources
module Components
# rubocop: disable Graphql/AuthorizeTypes -- Authorization hanlded by ComponentType -> VersionType
class InputType < BaseObject
- graphql_name 'CiCatalogResourcesComponentsInput'
+ graphql_name 'CiCatalogResourceComponentInput'
field :name, GraphQL::Types::String, null: true,
description: 'Name of the input.',
diff --git a/app/models/concerns/vulnerability_finding_helpers.rb b/app/models/concerns/vulnerability_finding_helpers.rb
index 94d091e84592e..337c7f0571a27 100644
--- a/app/models/concerns/vulnerability_finding_helpers.rb
+++ b/app/models/concerns/vulnerability_finding_helpers.rb
@@ -3,12 +3,10 @@
module VulnerabilityFindingHelpers
extend ActiveSupport::Concern
- # Manually resolvable report types cannot be considered fixed once removed from the
- # target branch due to requiring active triage, such as rotation of an exposed token.
- REPORT_TYPES_REQUIRING_MANUAL_RESOLUTION = %w[secret_detection].freeze
-
def requires_manual_resolution?
- REPORT_TYPES_REQUIRING_MANUAL_RESOLUTION.include?(report_type)
+ return false unless defined?(::Vulnerability::REPORT_TYPES_REQUIRING_MANUAL_RESOLUTION)
+
+ ::Vulnerability::REPORT_TYPES_REQUIRING_MANUAL_RESOLUTION.include?(report_type)
end
def matches_signatures(other_signatures, other_uuid)
diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb
index 6b979308d2605..664c26debb872 100644
--- a/app/services/groups/transfer_service.rb
+++ b/app/services/groups/transfer_service.rb
@@ -65,6 +65,7 @@ def proceed_to_transfer
) do
Group.transaction do
update_group_attributes
+ remove_paid_features_for_projects(old_root_ancestor_id)
ensure_ownership
update_integrations
remove_issue_contacts(old_root_ancestor_id, was_root_group)
@@ -179,6 +180,10 @@ def update_group_attributes
@group.reload # rubocop:disable Cop/ActiveRecordAssociationReload
end
+ # Overridden in EE
+ def remove_paid_features_for_projects(old_root_ancestor_id)
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def update_children_and_projects_visibility
descendants = @group.descendants.where("visibility_level > ?", @new_parent_group.visibility_level)
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 24182e6b7db6e..f28de72cdb262 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -883,6 +883,9 @@
Settings.cron_jobs['click_house_ci_finished_builds_sync_worker']['cron'] ||= '*/3 * * * *'
Settings.cron_jobs['click_house_ci_finished_builds_sync_worker']['args'] ||= [1]
Settings.cron_jobs['click_house_ci_finished_builds_sync_worker']['job_class'] = 'ClickHouse::CiFinishedBuildsSyncCronWorker'
+ Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker'] ||= {}
+ Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker']['cron'] ||= "0 */4 * * *"
+ Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker']['job_class'] = 'GitlabSubscriptions::AddOnPurchases::ScheduleBulkRefreshUserAssignmentsWorker'
Gitlab.com do
Settings.cron_jobs['disable_legacy_open_source_license_for_inactive_projects'] ||= {}
@@ -894,9 +897,6 @@
Settings.cron_jobs['gitlab_subscriptions_schedule_refresh_seats_worker'] ||= {}
Settings.cron_jobs['gitlab_subscriptions_schedule_refresh_seats_worker']['cron'] ||= "0 */6 * * *"
Settings.cron_jobs['gitlab_subscriptions_schedule_refresh_seats_worker']['job_class'] = 'GitlabSubscriptions::ScheduleRefreshSeatsWorker'
- Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker'] ||= {}
- Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker']['cron'] ||= "0 */4 * * *"
- Settings.cron_jobs['gitlab_subscriptions_add_on_purchases_schedule_bulk_refresh_user_assignments_worker']['job_class'] = 'GitlabSubscriptions::AddOnPurchases::ScheduleBulkRefreshUserAssignmentsWorker'
Settings.cron_jobs['click_house_events_sync_worker'] ||= {}
Settings.cron_jobs['click_house_events_sync_worker']['cron'] ||= "*/3 * * * *"
Settings.cron_jobs['click_house_events_sync_worker']['job_class'] = 'ClickHouse::EventsSyncWorker'
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 6b281e1ade8a0..b97bc58c3d6ec 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -9187,6 +9187,29 @@ The edge type for [`CiBuildNeed`](#cibuildneed).
| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
| `node` | [`CiBuildNeed`](#cibuildneed) | The item at the end of the edge. |
+#### `CiCatalogResourceComponentConnection`
+
+The connection type for [`CiCatalogResourceComponent`](#cicatalogresourcecomponent).
+
+##### Fields
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| `edges` | [`[CiCatalogResourceComponentEdge]`](#cicatalogresourcecomponentedge) | A list of edges. |
+| `nodes` | [`[CiCatalogResourceComponent]`](#cicatalogresourcecomponent) | A list of nodes. |
+| `pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
+
+#### `CiCatalogResourceComponentEdge`
+
+The edge type for [`CiCatalogResourceComponent`](#cicatalogresourcecomponent).
+
+##### Fields
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
+| `node` | [`CiCatalogResourceComponent`](#cicatalogresourcecomponent) | The item at the end of the edge. |
+
#### `CiCatalogResourceConnection`
The connection type for [`CiCatalogResource`](#cicatalogresource).
@@ -9235,29 +9258,6 @@ The edge type for [`CiCatalogResourceVersion`](#cicatalogresourceversion).
| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
| `node` | [`CiCatalogResourceVersion`](#cicatalogresourceversion) | The item at the end of the edge. |
-#### `CiCatalogResourcesComponentConnection`
-
-The connection type for [`CiCatalogResourcesComponent`](#cicatalogresourcescomponent).
-
-##### Fields
-
-| Name | Type | Description |
-| ---- | ---- | ----------- |
-| `edges` | [`[CiCatalogResourcesComponentEdge]`](#cicatalogresourcescomponentedge) | A list of edges. |
-| `nodes` | [`[CiCatalogResourcesComponent]`](#cicatalogresourcescomponent) | A list of nodes. |
-| `pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
-
-#### `CiCatalogResourcesComponentEdge`
-
-The edge type for [`CiCatalogResourcesComponent`](#cicatalogresourcescomponent).
-
-##### Fields
-
-| Name | Type | Description |
-| ---- | ---- | ----------- |
-| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
-| `node` | [`CiCatalogResourcesComponent`](#cicatalogresourcescomponent) | The item at the end of the edge. |
-
#### `CiConfigGroupConnection`
The connection type for [`CiConfigGroup`](#ciconfiggroup).
@@ -15485,41 +15485,41 @@ four standard [pagination arguments](#connection-pagination-arguments):
| ---- | ---- | ----------- |
| `sort` | [`CiCatalogResourceVersionSort`](#cicatalogresourceversionsort) | Sort versions by given criteria. |
-### `CiCatalogResourceVersion`
+### `CiCatalogResourceComponent`
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
-| `author` **{warning-solid}** | [`UserCore`](#usercore) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. User that created the version. |
-| `commit` **{warning-solid}** | [`Commit`](#commit) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Commit associated with the version. |
-| `components` **{warning-solid}** | [`CiCatalogResourcesComponentConnection`](#cicatalogresourcescomponentconnection) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Components belonging to the catalog resource. |
-| `createdAt` **{warning-solid}** | [`Time`](#time) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Timestamp of when the version was created. |
-| `id` **{warning-solid}** | [`CiCatalogResourcesVersionID!`](#cicatalogresourcesversionid) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Global ID of the version. |
-| `releasedAt` **{warning-solid}** | [`Time`](#time) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Timestamp of when the version was released. |
-| `tagName` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the tag associated with the version. |
-| `tagPath` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Relative web path to the tag associated with the version. |
+| `id` **{warning-solid}** | [`CiCatalogResourcesComponentID!`](#cicatalogresourcescomponentid) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. ID of the component. |
+| `inputs` **{warning-solid}** | [`[CiCatalogResourceComponentInput!]`](#cicatalogresourcecomponentinput) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Inputs for the component. |
+| `name` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the component. |
+| `path` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Path used to include the component. |
-### `CiCatalogResourcesComponent`
+### `CiCatalogResourceComponentInput`
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
-| `id` **{warning-solid}** | [`CiCatalogResourcesComponentID!`](#cicatalogresourcescomponentid) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. ID of the component. |
-| `inputs` **{warning-solid}** | [`[CiCatalogResourcesComponentsInput!]`](#cicatalogresourcescomponentsinput) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Inputs for the component. |
-| `name` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the component. |
-| `path` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Path used to include the component. |
+| `default` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Default value for the input. |
+| `name` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the input. |
+| `required` **{warning-solid}** | [`Boolean`](#boolean) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Indicates if an input is required. |
-### `CiCatalogResourcesComponentsInput`
+### `CiCatalogResourceVersion`
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
-| `default` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Default value for the input. |
-| `name` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the input. |
-| `required` **{warning-solid}** | [`Boolean`](#boolean) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Indicates if an input is required. |
+| `author` **{warning-solid}** | [`UserCore`](#usercore) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. User that created the version. |
+| `commit` **{warning-solid}** | [`Commit`](#commit) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Commit associated with the version. |
+| `components` **{warning-solid}** | [`CiCatalogResourceComponentConnection`](#cicatalogresourcecomponentconnection) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Components belonging to the catalog resource. |
+| `createdAt` **{warning-solid}** | [`Time`](#time) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Timestamp of when the version was created. |
+| `id` **{warning-solid}** | [`CiCatalogResourcesVersionID!`](#cicatalogresourcesversionid) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Global ID of the version. |
+| `releasedAt` **{warning-solid}** | [`Time`](#time) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Timestamp of when the version was released. |
+| `tagName` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Name of the tag associated with the version. |
+| `tagPath` **{warning-solid}** | [`String`](#string) | **Introduced** in 16.7. This feature is an Experiment. It can be changed or removed at any time. Relative web path to the tag associated with the version. |
### `CiConfig`
diff --git a/doc/install/installation.md b/doc/install/installation.md
index dc9f40056de8e..370f67865ed4d 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -45,7 +45,7 @@ If the highest number stable branch is unclear, check the [GitLab blog](https://
| Software | Minimum version | Notes |
|:------------------------|:----------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [Ruby](#2-ruby) | `3.0.x` | From GitLab 15.10, Ruby 3.0 is required. You must use the standard MRI implementation of Ruby. We love [JRuby](https://www.jruby.org/) and [Rubinius](https://github.com/rubinius/rubinius#the-rubinius-language-platform), but GitLab needs several Gems that have native extensions. |
+| [Ruby](#2-ruby) | `3.1.x` | From GitLab 16.7, Ruby 3.1 is required. You must use the standard MRI implementation of Ruby. We love [JRuby](https://www.jruby.org/) and [Rubinius](https://github.com/rubinius/rubinius#the-rubinius-language-platform), but GitLab needs several Gems that have native extensions. |
| [RubyGems](#3-rubygems) | `3.4.x` | A specific RubyGems version is not fully needed, but it's recommended to update so you can enjoy some known performance improvements. |
| [Go](#4-go) | `1.20.x` | From GitLab 16.4, Go 1.20 or later is required. |
| [Git](#git) | `2.42.x` | From GitLab 16.5, Git 2.42.x and later is required. You should use the [Git version provided by Gitaly](#git). |
diff --git a/doc/solutions/cloud/aws/gitlab_aws_integration.md b/doc/solutions/cloud/aws/gitlab_aws_integration.md
index 0a2d5772a566c..11add88f7c003 100644
--- a/doc/solutions/cloud/aws/gitlab_aws_integration.md
+++ b/doc/solutions/cloud/aws/gitlab_aws_integration.md
@@ -11,6 +11,8 @@ Learn how to integrate GitLab and AWS.
This content is intended for GitLab team members as well as members of the wider community.
+When content that is badged for GitLab SaaS ( **(SAAS)** ) or Self-Managed ( **(SELF)** ) it means that the link applies to only that type of GitLab instance implementation. Unbadged content works for any type of GitLab implementation.
+
This page attempts to index the ways in which GitLab can integrate with AWS. It does so whether the integration is the result of configuring general functionality, was built in to AWS or GitLab or is provided as a solution.
| Text Tag | Configuration / Built / Solution | Support/Maintenance |
@@ -21,10 +23,16 @@ This page attempts to index the ways in which GitLab can integrate with AWS. It
| `[GitLab Built]` | Built into GitLab by Product Team to Address AWS Integration | GitLab |
| `[AWS Solution]` | Built as Solution Example by AWS or AWS Partners | Community/Example |
| `[GitLab Solution]` | Built as Solution Example by GitLab or GitLab Partners | Community/Example |
-| `[CI Solution]` | Built, at least in part, using GitLab CI and therefore
more customer customizable. | Items tagged `[CI Solution will]`
also carry one of the other tags
that indicates the maintenance status. |
+| `[CI Solution]` | Built, at least in part, using GitLab CI and therefore
more customer customizable. | Items tagged `[CI Solution]` will
also carry one of the other tags
that indicate the maintenance status. |
+
+## Table of Contents
+
+[TOC]
## Integrations For Development Activities
+These integrations have to do with using GitLab to build application workloads and deploy them to AWS.
+
### SCM Integrations
- **AWS CodeStar Connections** - enables SCM connections to multiple AWS Services. **Currently for GitLab.com SaaS only**. [Configure GitLab](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-gitlab.html). [Supported Providers](https://docs.aws.amazon.com/dtconsole/latest/userguide/supported-versions-connections.html). [Supported AWS Services](https://docs.aws.amazon.com/dtconsole/latest/userguide/integrations-connections.html) - each one may have to make updates to support GitLab, so here is the subset that currently support GitLab `[AWS Built]`
@@ -51,53 +59,77 @@ This page attempts to index the ways in which GitLab can integrate with AWS. It
- **AWS CodeDeploy Integration** - indirectly through CodePipeline support. `[AWS Built]`
- [Integrate EKS clusters for application deployment](../../../user/infrastructure/clusters/connect/new_eks_cluster.md). `[GitLab Built]`
-## Solutions For Specific Development Frameworks and Ecosystems
+## End-to-End Solutions for development and deployment if specific development frameworks and ecosystems
Generally solutions demonstrate end-to-end capabilities for the development framework - leveraging all relevant integration techniques to show the art of maximum value for using GitLab and AWS together.
-### Serverless Development
+### Serverless
-- [Serverless Framework Deployment to AWS with GitLab Serverless SAST Scanning and Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/serverless/serverless-framework-aws) - working example code and tutorials. `[GitLab Solution]` `[CI Solution]`
+- [Serverless Framework Deployment to AWS with GitLab Serverless SAST Scanning and Lifecycle Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/serverless/serverless-framework-aws) - working example code and tutorials. `[GitLab Solution]` `[CI Solution]`
- [Tutorial: Serverless Framework Deployment to AWS with GitLab Serverless SAST Scanning](https://gitlab.com/guided-explorations/aws/serverless/serverless-framework-aws/-/blob/master/TUTORIAL.md) `[GitLab Solution]` `[CI Solution]`
- [Tutorial: Secure Serverless Framework Development with GitLab Security Policy Approval Rules and Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/serverless/serverless-framework-aws/-/blob/master/TUTORIAL2-SecurityAndManagedEnvs.md) `[GitLab Solution]` `[CI Solution]`
-### Infrastructure as Code
+### Terraform
-- [Terraform Deployment to AWS with GitLab MR Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/terraform/terraform-web-server-cluster)
+- [Terraform Deployment to AWS with GitLab Lifecycle Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/terraform/terraform-web-server-cluster)
- [Tutorial: Terraform Deployment to AWS with GitLab IaC SAST Scanning](https://gitlab.com/guided-explorations/aws/terraform/terraform-web-server-cluster/-/blob/prod/TUTORIAL.md) `[GitLab Solution]` `[CI Solution]`
- [Terraform Deployment to AWS with GitLab Security Policy Approval Rules and Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/terraform/terraform-web-server-cluster/-/blob/prod/TUTORIAL2-SecurityAndManagedEnvs.md) `[GitLab Solution]` `[CI Solution]`
-- [Tutorial: CloudFormation Deployment With GitLab MR Managed DevOps Environments](https://gitlab.com/guided-explorations/aws/cloudformation-deploy) `[GitLab Solution]` `[CI Solution]`
-### .Net on AWS
+#### CloudFormation
+
+[CloudFormation Development and Deployment With GitLab Lifecycle Managed DevOps Environments Working Code](https://gitlab.com/guided-explorations/aws/cloudformation-deploy) `[GitLab Solution]` `[CI Solution]`
+
+### CDK
+
+- [Building Cross-Account Deployment in GitLab Pipelines Using AWS CDK](https://aws.amazon.com/blogs/apn/building-cross-account-deployment-in-gitlab-pipelines-using-aws-cdk/) `[AWS Solution]` `[CI Solution]`
+
+### .NET on AWS
- [Working Example Code for Scaling .NET Framework 4.x Runners on AWS](https://gitlab.com/guided-explorations/aws/dotnet-aws-toolkit) `[GitLab Solution]` `[CI Solution]`
-- [Video Walkthrough of Code and Building a .NET Framework 4.x Project](https://www.youtube.com/watch?v=_4r79ZLmDuo) `[GitLab Solution]` `[CI Solution]`
+- [Video Walkthrough of Code and Building a .NET Framework 4.x Project](https://www.youtube.com/watch?v=_4r79ZLmDuo) `[GitLab Solution]` `[CI Solution]`
-## Authentication Integration
+## System to system integration of GitLab and AWS
+
+AWS Identity providers (IDP) can be configured to authenticate into GitLab or GitLab can function as an IDP into AWS accounts.
+
+Top level groups on GitLab.com are also known as "Namespaces" and naming one after your company is the first step to setting up a tenant for your organization on GitLab.com. Namespaces can be configured for special functionality like SSO which then integrates your IDP into GitLab.
+
+### User authentication and authorization between GitLab and AWS
+
+- [SAML SSO for GitLab.com groups](../../../user/group/saml_sso/index.md) `[GitLab Configuration]` **(SAAS)**
+- [Integrate LDAP with GitLab](../../../administration/auth/ldap/index.md) `[GitLab Configuration]` **(SELF)**
+
+### Runner workload authentication and authorization integration
- [Runner Job Authentication using Open ID & JWT Authentication](../../../ci/cloud_services/aws/index.md). `[GitLab Built]`
- [Configure OpenID Connect between GitLab and AWS](https://gitlab.com/guided-explorations/aws/configure-openid-connect-in-aws) `[GitLab Solution]` `[CI Solution]`
- [OIDC and Multi-Account Deployment with GitLab and ECS](https://gitlab.com/guided-explorations/aws/oidc-and-multi-account-deployment-with-ecs) `[GitLab Solution]` `[CI Solution]`
-## GitLab Instance Compute & Operations Integration
+## GitLab infrastructure workloads deployed on AWS
+
+While GitLab can be deployed on a single box for up to 500 users, when it is horizontally scaled for very large user counts like 50,000 it expands into being a complex, many tiered platform that benefits from deployment to AWS. GitLab is supports and is regularly tested being backed by AWS services. GitLab is deployable to Ec2 for traditional scaling and to AWS EKS in a Cloud Native Hybrid implementation. It is called Hybrid because specific service layers cannot be placed in a container cluster due to the workload shapes that are common to Git (and common to how Git processes behave handles that workload variety).
+
+### GitLab Instance Compute & Operations Integration
- Installing GitLab Self-Managed on AWS
+ - [AWS Services that can be used when deploying GitLab](gitlab_instance_on_aws.md)
- GitLab Single EC2 Instance. `[GitLab Built]`
- [Using 5 Seat AWS marketplace subscription](gitlab_single_box_on_aws.md#marketplace-subscription)
- [Using Prepared AMIs](gitlab_single_box_on_aws.md#official-gitlab-releases-as-amis) - Bring Your Own License for Enterprise Edition.
- GitLab Cloud Native Hybrid Scaled on AWS EKS and Paas. `[GitLab Built]`
- - Using GitLab Environment Toolkit (GET) - `[GitLab Solution]`
+ - [Using GitLab Environment Toolkit (GET)](https://gitlab.com/gitlab-org/gitlab-environment-toolkit) - `[GitLab Solution]`
- GitLab Instance Scaled on AWS EC2 and PaaS. `[GitLab Built]`
- - Using GitLab Environment Toolkit (GET) - `[GitLab Solution]`
+ - [Using GitLab Environment Toolkit (GET)](https://gitlab.com/gitlab-org/gitlab-environment-toolkit) - `[GitLab Solution]`
- [Amazon Managed Grafana](https://docs.aws.amazon.com/grafana/latest/userguide/gitlab-AMG-datasource.html) for GitLab self-managed Prometheus metrics. `[AWS Built]`
-## GitLab Runner on AWS Compute
+### GitLab Runner on AWS Compute
+- [GitLab Runner Autoscaler](https://docs.gitlab.com/runner/runner_autoscale/) - core technology built by GitLab Runner team. `[GitLab Built]`
+- [GitLab Runner Infrastructure Toolkit (GRIT)](https://gitlab.com/gitlab-org/ci-cd/runner-tools/grit) - managed infrastructure as code stewarded by the GitLab Runner team. Needed to deploy things like the GitLab Runner Autoscaler. `[GitLab Built]`
- [Autoscaling GitLab Runner on AWS EC2](https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/). `[GitLab Built]`
- [GitLab HA Scaling Runner Vending Machine for AWS EC2 ASG](https://gitlab.com/guided-explorations/aws/gitlab-runner-autoscaling-aws-asg/). `[GitLab Solution]`
- Runner vending machine training resources.
-
- [GitLab EKS Fargate Runners](https://gitlab.com/guided-explorations/aws/eks-runner-configs/gitlab-runner-eks-fargate/-/blob/main/README.md). `[GitLab Solution]`
diff --git a/doc/solutions/cloud/aws/gitlab_aws_partner_designations.md b/doc/solutions/cloud/aws/gitlab_aws_partner_designations.md
index c48c3f95f9d9e..076fbec4940d1 100644
--- a/doc/solutions/cloud/aws/gitlab_aws_partner_designations.md
+++ b/doc/solutions/cloud/aws/gitlab_aws_partner_designations.md
@@ -17,11 +17,11 @@ This competency validates that GitLab delivers DevOps solutions that work with a
## DevSecOps Specialty Category
-[AWS Program Information](https://aws.amazon.com/blogs/apn/aws-devops-competency-expands-to-include-devsecops-category/) [GitLab Announcement](https://about.gitlab.com/blog/2023/09/25/aws-devsecops-competency-partner/)
+The DevSecOps qualification is a category of the DevOps Software Competency that demonstrates that GitLab is a substantial solution in helping organizations meet their DevSecOps maturity goals. GitLab was reviewed for meeting these additional qualifications before being granted this designation. [AWS Program Information](https://aws.amazon.com/blogs/apn/aws-devops-competency-expands-to-include-devsecops-category/) [GitLab Announcement](https://about.gitlab.com/blog/2023/09/25/aws-devsecops-competency-partner/)
## Public Sector Partner
-This designation indicates that GitLab has been deemed qualified to work with AWS Public Sector customers. In fact, we have an entire organization dedicated to this practice. [AWS Program Information](https://aws.amazon.com/partners/programs/public-sector/)
+This designation indicates that GitLab has been deemed qualified to work with AWS Public Sector customers. GitLab has a dedicated organization to address public sector specific needs. [AWS Program Information](https://aws.amazon.com/partners/programs/public-sector/)
## AWS Graviton
diff --git a/doc/solutions/cloud/aws/gitlab_instance_on_aws.md b/doc/solutions/cloud/aws/gitlab_instance_on_aws.md
index 320c317d446d0..de0ffcdc2595c 100644
--- a/doc/solutions/cloud/aws/gitlab_instance_on_aws.md
+++ b/doc/solutions/cloud/aws/gitlab_instance_on_aws.md
@@ -6,7 +6,7 @@ info: This page is owned by the Solutions Architecture team.
{::options parse_block_html="true" /}
-# Provision GitLab Instances on AWS EKS **(FREE SELF)**
+# Provision GitLab Instances on AWS
## Available Infrastructure as Code for GitLab Instance Installation on AWS
@@ -16,7 +16,7 @@ You can use the GitLab Environment Toolkit to deploy a Cloud Native Hybrid envir
### Two and Three Zone High Availability
-While GitLab Reference Architectures generally encourage three zone redundancy, AWS Quick Starts and AWS Well Architected consider two zone redundancy as AWS Well Architected. Individual implementations should weigh the costs of two and three zone configurations against their own high availability requirements for a final configuration.
+While GitLab Reference Architectures generally encourage three zone redundancy, the AWS Well Architected framework consider two zone redundancy as AWS Well Architected. Individual implementations should weigh the costs of two and three zone configurations against their own high availability requirements for a final configuration.
Gitaly Cluster uses a consistency voting system to implement strong consistency between synchronized nodes. Regardless of the number of availability zones implemented, there will always need to be a minimum of three Gitaly and three Praefect nodes in the cluster to avoid voting stalemates cause by an even number of nodes.
@@ -28,28 +28,27 @@ These services have been tested with GitLab.
Some services, such as log aggregation, outbound email are not specified by GitLab, but where provided are noted.
-| GitLab Services | AWS PaaS (Tested) | Provided by AWS Cloud
Native Hybrid Quick Start |
-| ------------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------ |
-| Tested PaaS Mentioned in Reference Architectures | | |
-| **PostgreSQL Database** | Amazon RDS PostgreSQL | Yes. |
-| **Redis Caching** | Redis ElastiCache | Yes. |
-| **Gitaly Cluster (Git Repository Storage)**
(Including Praefect and PostgreSQL) | ASG and Instances | Yes - ASG and Instances
**Note: Gitaly cannot be put into a Kubernetes Cluster.** |
-| **All GitLab storages besides Git Repository Storage**
(Includes Git-LFS which is S3 Compatible) | AWS S3 | Yes |
-| | | |
-| Tested PaaS for Supplemental Services | | |
-| **Front End Load Balancing** | AWS ELB | Yes |
-| **Internal Load Balancing** | AWS ELB | Yes |
-| **Outbound Email Services** | AWS Simple Email Service (SES) | Yes |
-| **Certificate Authority and Management** | AWS Certificate Manager (ACM) | Yes |
-| **DNS** | AWS Route53 (tested) | Yes |
-| **GitLab and Infrastructure Log Aggregation** | AWS CloudWatch Logs | Yes (ContainerInsights Agent for EKS) |
-| **Infrastructure Performance Metrics** | AWS CloudWatch Metrics | Yes |
-| | | |
-| Supplemental Services and Configurations (Tested) | | |
-| **Prometheus for GitLab** | AWS EKS (Cloud Native Only) | Yes |
-| **Grafana for GitLab** | AWS EKS (Cloud Native Only) | Yes |
-| **Administrative Access to GitLab Backend** | Bastion Host in VPC | Yes - HA - Preconfigured for Cluster Management. |
-| **Encryption (In Transit / At Rest)** | AWS KMS | Yes |
-| **Secrets Storage for Provisioning** | AWS Secrets Manager | Yes |
-| **Configuration Data for Provisioning** | AWS Parameter Store | Yes |
-| **AutoScaling Kubernetes** | EKS AutoScaling Agent | Yes |
+| GitLab Services | AWS PaaS (Tested) |
+| ------------------------------------------------------------ | ------------------------------ |
+| Tested PaaS Mentioned in Reference Architectures | |
+| **PostgreSQL Database** | Amazon RDS PostgreSQL |
+| **Redis Caching** | Redis ElastiCache |
+| **Gitaly Cluster (Git Repository Storage)**
(Including Praefect and PostgreSQL) | ASG and Instances |
+| **All GitLab storages besides Git Repository Storage**
(Includes Git-LFS which is S3 Compatible) | AWS S3 |
+| | |
+| Tested PaaS for Supplemental Services | |
+| **Front End Load Balancing** | AWS ELB |
+| **Internal Load Balancing** | AWS ELB |
+| **Outbound Email Services** | AWS Simple Email Service (SES) |
+| **Certificate Authority and Management** | AWS Certificate Manager (ACM) |
+| **DNS** | AWS Route53 (tested) |
+| **GitLab and Infrastructure Log Aggregation** | AWS CloudWatch Logs |
+| **Infrastructure Performance Metrics** | AWS CloudWatch Metrics |
+| | |
+| Supplemental Services and Configurations | |
+| **Prometheus for GitLab** | AWS EKS (Cloud Native Only) |
+| **Grafana for GitLab** | AWS EKS (Cloud Native Only) |
+| **Encryption (In Transit / At Rest)** | AWS KMS |
+| **Secrets Storage for Provisioning** | AWS Secrets Manager |
+| **Configuration Data for Provisioning** | AWS Parameter Store |
+| **AutoScaling Kubernetes** | EKS AutoScaling Agent |
diff --git a/doc/solutions/cloud/aws/index.md b/doc/solutions/cloud/aws/index.md
index 7e9eed235ff35..360b4161d4984 100644
--- a/doc/solutions/cloud/aws/index.md
+++ b/doc/solutions/cloud/aws/index.md
@@ -8,20 +8,20 @@ info: This page is owned by the Solutions Architecture team.
This documentation covers solutions relating to leveraging GitLab with and on Amazon Web Services (AWS).
-- [GitLab partnership certifications and designations from AWS](gitlab_aws_integration.md)
-- [GitLab AWS Integration Index](gitlab_aws_partner_designations.md)
+- [GitLab partnership certifications and designations from AWS](gitlab_aws_partner_designations.md)
+- [GitLab AWS Integration Index](gitlab_aws_integration.md)
- [GitLab Instances on AWS EKS](gitlab_instance_on_aws.md)
-- [SRE Considerations Gitaly on AWS](gitaly_sre_for_aws.md)
+- [SRE Considerations for Gitaly on AWS](gitaly_sre_for_aws.md)
- [Provision GitLab on a single EC2 instance in AWS](gitlab_single_box_on_aws.md)
## Cloud platform well architected compliance
-Testing-backed architectural qualification is a fundamental concept behind implementation patterns:
+Testing-backed architectural qualification is a fundamental concept behind Cloud solution implementations:
-- Implementation patterns maintain GitLab Reference Architecture compliance and provide [GitLab Performance Tool](https://gitlab.com/gitlab-org/quality/performance) (GPT) reports to demonstrate adherence to them.
-- Implementation patterns may be qualified by and/or contributed to by the technology vendor. For instance, an implementation pattern for AWS may be officially reviewed by AWS.
-- Implementation patterns may specify and test Cloud Platform PaaS services for suitability for GitLab. This testing can be coordinated and help qualify these technologies for Reference Architectures. For instance, qualifying compatibility with and availability of runtime versions of top level PaaS such as those for PostgreSQL and Redis.
-- Implementation patterns can provided qualified testing for platform limitations, for example, ensuring Gitaly Cluster can work correctly on specific Cloud Platform availability zone latency and throughput characteristics or qualifying what levels of available platform partner local disk performance is workable for Gitaly server to operate with integrity.
+- Cloud solution implementations maintain GitLab Reference Architecture compliance and provide [GitLab Performance Tool](https://gitlab.com/gitlab-org/quality/performance) (GPT) reports to demonstrate adherence to them.
+- Cloud solution implementations may be qualified by and/or contributed to by the technology vendor. For instance, an implementation pattern for AWS may be officially reviewed by AWS.
+- Cloud solution implementations may specify and test Cloud Platform PaaS services for suitability for GitLab. This testing can be coordinated and help qualify these technologies for Reference Architectures. For instance, qualifying compatibility with and availability of runtime versions of top level PaaS such as those for PostgreSQL and Redis.
+- Cloud solution implementations can provided qualified testing for platform limitations, for example, ensuring Gitaly Cluster can work correctly on specific Cloud Platform availability zone latency and throughput characteristics or qualifying what levels of available platform partner local disk performance is workable for Gitaly server to operate with integrity.
## AWS known issues list
@@ -35,34 +35,36 @@ See the [GitLab AWS known issues list](https://gitlab.com/gitlab-com/alliances/a
## Platform partner specificity
-Implementation patterns enable platform-specific terminology, best practice architecture, and platform-specific build manifests:
+Cloud solution implementations enable platform-specific terminology, best practice architecture, and platform-specific build manifests:
-- Implementation patterns are more vendor specific. For instance, advising specific compute instances / VMs / nodes instead of vCPUs or other generalized measures.
-- Implementation patterns are oriented to implementing good architecture for the vendor in view.
-- Implementation patterns are written to an audience who is familiar with building on the infrastructure that the implementation pattern targets. For example, if the implementation pattern is for GCP, the specific terminology of GCP is used - including using the specific names for PaaS services.
-- Implementation patterns can test and qualify if the versions of PaaS available are compatible with GitLab (for example, PostgreSQL, Redis, etc.).
+- Cloud solution implementations are more vendor specific. For instance, advising specific compute instances / VMs / nodes instead of vCPUs or other generalized measures.
+- Cloud solution implementations are oriented to implementing good architecture for the vendor in view.
+- Cloud solution implementations are written to an audience who is familiar with building on the infrastructure that the implementation pattern targets. For example, if the implementation pattern is for GCP, the specific terminology of GCP is used - including using the specific names for PaaS services.
+- Cloud solution implementations can test and qualify if the versions of PaaS available are compatible with GitLab (for example, PostgreSQL, Redis, etc.).
-## Platform as a Service (PaaS) specification and usage
+## AWS Platform as a Service (PaaS) specification and usage
-Platform as a Service options are a huge portion of the value provided by Cloud Platforms as they simplify operational complexity and reduce the SRE and security skilling required to operate advanced, highly available technology services. Implementation patterns can be pre-qualified against the partner PaaS options.
+Platform as a Service options are a huge portion of the value provided by Cloud Platforms as they simplify operational complexity and reduce the SRE and security skilling required to operate advanced, highly available technology services. Cloud solution implementations can be pre-qualified against the partner PaaS options.
-- Implementation patterns help implementers understand what PaaS options are known to work and how to choose between PaaS solutions when a single platform has more than one PaaS option for the same GitLab role.
+- Cloud solution implementations help implementers understand what PaaS options are known to work and how to choose between PaaS solutions when a single platform has more than one PaaS option for the same GitLab role.
- For instance, where reference architectures do not have a specific recommendation on what technology is leveraged for GitLab outbound email services or what the sizing should be - a Reference Implementation may advise using a cloud providers Email as a Service (PaaS) and possibly even with specific settings.
+You can read more at [AWS services are usable to deploy GitLab infrastruture](gitlab_instance_on_aws.md).
+
## Cost optimizing engineering
Cost engineering is a fundamental aspect of Cloud Architecture and frequently the savings capabilities available on a platform exert strong influence on how to build out scaled computing.
-- Implementation patterns may engineer specifically for the savings models available on a platform provider. An AWS example would be maximizing the occurrence of a specific instance type for taking advantage of reserved instances.
-- Implementation patterns may leverage ephemeral compute where appropriate and with appropriate customer guidelines. For instance, a Kubernetes node group dedicated to runners on ephemeral compute (with appropriate GitLab Runner tagging to indicate the compute type).
-- Implementation patterns may include vendor specific cost calculators.
+- Cloud solution implementations may engineer specifically for the savings models available on a platform provider. An AWS example would be maximizing the occurrence of a specific instance type for taking advantage of reserved instances.
+- Cloud solution implementations may leverage ephemeral compute where appropriate and with appropriate customer guidelines. For instance, a Kubernetes node group dedicated to runners on ephemeral compute (with appropriate GitLab Runner tagging to indicate the compute type).
+- Cloud solution implementations may include vendor specific cost calculators.
## Actionability and automatability orientation
-Implementation patterns are one step closer to specifics that can be used as a source for build instructions and automation code:
+Cloud solution implementations are one step closer to specifics that can be used as a source for build instructions and automation code:
-- Implementation patterns enable builders to generate a list of vendor specific resources required to implement GitLab for a given Reference Architecture.
-- Implementation patterns enable builders to use manual instructions or to create automation to build out the reference implementation.
+- Cloud solution implementations enable builders to generate a list of vendor specific resources required to implement GitLab for a given Reference Architecture.
+- Cloud solution implementations enable builders to use manual instructions or to create automation to build out the reference implementation.
## Intended audiences and contributors
diff --git a/doc/update/upgrading_from_source.md b/doc/update/upgrading_from_source.md
index 1ba032174b590..d705c43dc8640 100644
--- a/doc/update/upgrading_from_source.md
+++ b/doc/update/upgrading_from_source.md
@@ -61,7 +61,7 @@ sudo service gitlab stop
### 3. Update Ruby
-From GitLab 15.10, we only support Ruby 3.0.x and dropped support for Ruby 2.7. Be sure to upgrade if necessary.
+From GitLab 16.7, we only support Ruby 3.1.x and dropped support for Ruby 3.0. Be sure to upgrade if necessary.
You can check which version you are running with `ruby -v`.
[Install Ruby](https://www.ruby-lang.org/en/documentation/installation/).
diff --git a/doc/user/group/import/index.md b/doc/user/group/import/index.md
index f610c2f01d499..118596f877a8a 100644
--- a/doc/user/group/import/index.md
+++ b/doc/user/group/import/index.md
@@ -76,7 +76,7 @@ Estimating the duration of migration by direct transfer is difficult. The follow
very different amounts of time to migrate if one of the projects has a lot more attachments, comments, and other items on the merge requests. Therefore, the number
of merge requests on a project is a poor predictor of how long a project will take to migrate.
-There’s no exact formula to reliably estimate a migration. However, the average durations of each pipeline worker importing a project relation can help you to get an idea of how long importing your projects might take:
+There's no exact formula to reliably estimate a migration. However, the average durations of each pipeline worker importing a project relation can help you to get an idea of how long importing your projects might take:
| Project resource type | Average time (in seconds) to import a record |
|:----------------------------|:---------------------------------------------|
@@ -177,6 +177,9 @@ To migrate groups by direct transfer:
- Your must have a role on the destination namespace the enables you to
[create a subgroup](../../group/subgroups/index.md#create-a-subgroup) in that
namespace.
+- To import items stored in object storage, you must either:
+ - [Configure `proxy_download`](../../../administration/object_storage.md#configure-the-common-parameters).
+ - Ensure that the destination GitLab instance has access to the object storage of the source GitLab instance.
### Prepare user accounts
diff --git a/doc/user/group/index.md b/doc/user/group/index.md
index 3e0f98fbe6748..89134cf1705dd 100644
--- a/doc/user/group/index.md
+++ b/doc/user/group/index.md
@@ -117,6 +117,21 @@ To edit group details:
The description is limited to 500 characters.
1. Select **Save changes**.
+## Leave a group
+
+> The button to leave a group [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/431539) to the Actions menu in GitLab 16.7.
+
+When you leave a group:
+
+- You are no longer a member of the group, its subgroups, and projects, and cannot contribute.
+- All the issues and merge requests that were assigned to you are unassigned.
+
+To leave a group:
+
+1. On the left sidebar, select **Search or go to** and find your group.
+1. On the group overview page, in the top right, select **Actions** (**{ellipsis_v})**.
+1. Select **Leave group**, then **Leave group** again.
+
## Remove a group
> Enabled delayed deletion by default and removed the option to delete immediately [on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/393622) and [on self-managed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119606) in GitLab 16.0.
@@ -339,9 +354,6 @@ You can add a new project to a group in two ways:
### Specify who can add projects to a group
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/2534) in GitLab 10.5.
-> - [Moved](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/25975) from GitLab Premium to GitLab Free in 11.10.
-
By default, users with at least the:
- Developer role can create projects under a group. This default can be changed.
@@ -357,3 +369,15 @@ To change the role that can create projects under a group:
1. Select **Save changes**.
To change this setting globally, see [Default project creation protection](../../administration/settings/visibility_and_access_controls.md#define-which-roles-can-create-projects).
+
+## Get the group ID
+
+> Group ID [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/431539) to the Actions menu in GitLab 16.7.
+
+You might need the group ID if you want to interact with it using the [GitLab API](../../api/index.md).
+
+To copy the group ID:
+
+1. On the left sidebar, select **Search or go to** and find your group.
+1. On the group overview page, in the top right, select **Actions** (**{ellipsis_v})**.
+1. Select **Copy group ID**.
diff --git a/doc/user/project/working_with_projects.md b/doc/user/project/working_with_projects.md
index 13ed70160554d..47610ffd75d39 100644
--- a/doc/user/project/working_with_projects.md
+++ b/doc/user/project/working_with_projects.md
@@ -236,18 +236,24 @@ To rename a repository:
1. In the **Change path** text box, edit the path.
1. Select **Change path**.
-## Access the Project overview page by using the project ID
+## Access the project overview page by using the project ID
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/53671) in GitLab 11.8.
+> Project ID [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/431539) to the Actions menu in GitLab 16.7.
To access a project by using the project ID instead of its name,
-go to `https://gitlab.example.com/projects/:id`.
+go to `https://gitlab.example.com/projects/`.
-The project ID is displayed in the **Project overview** page, under the project name.
+To copy the project ID:
+
+1. On the left sidebar, select **Search or go to** and find your project.
+1. On the project overview page, in the top right, select **Actions** (**{ellipsis_v})**.
+1. Select **Copy project ID**.
For example, if in your personal namespace `alex` you have a project `my-project` with the ID `123456`, you can access the project
either at `https://gitlab.example.com/alex/my-project` or `https://gitlab.example.com/projects/123456`.
+You might also need the project ID if you want to interact with it using the [GitLab API](../../api/index.md).
+
## Who can view the Project overview page
When you select a project, the **Project overview** page shows the project contents.
@@ -266,18 +272,24 @@ For users without permission to view the project's code, the landing page shows:
## Leave a project
+> The button to leave a project [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/431539) to the Actions menu in GitLab 16.7.
+
When you leave a project:
- You are no longer a project member and cannot contribute.
- All the issues and merge requests that were assigned
to you are unassigned.
+Prerequisites:
+
+- You can leave a project this way only when a project is part of a group under a [group namespace](../namespace/index.md).
+- You must be a [direct member](members/index.md#membership-types) of the project.
+
To leave a project:
1. On the left sidebar, select **Search or go to** and find your project.
-1. Select **Leave project**. The **Leave project** option only displays
-on the project dashboard when a project is part of a group under a
-[group namespace](../namespace/index.md).
+1. On the project overview page, in the top right, select **Actions** (**{ellipsis_v})**.
+1. Select **Leave project**, then **Leave project** again..
## Add a compliance framework to a project **(PREMIUM)**
diff --git a/lib/gitlab/access/branch_protection.rb b/lib/gitlab/access/branch_protection.rb
index 81f02c004af87..f6d0f8b04b397 100644
--- a/lib/gitlab/access/branch_protection.rb
+++ b/lib/gitlab/access/branch_protection.rb
@@ -74,7 +74,11 @@ def protection_none
end
def protection_partial
- protection_none.merge(allow_force_push: false)
+ {
+ allowed_to_push: [{ 'access_level' => Gitlab::Access::DEVELOPER }],
+ allowed_to_merge: [{ 'access_level' => Gitlab::Access::MAINTAINER }],
+ allow_force_push: false
+ }
end
def protected_fully
@@ -89,15 +93,15 @@ def protected_against_developer_pushes
{
allowed_to_push: [{ 'access_level' => Gitlab::Access::MAINTAINER }],
allowed_to_merge: [{ 'access_level' => Gitlab::Access::DEVELOPER }],
- allow_force_push: true
+ allow_force_push: false
}
end
def protected_after_initial_push
{
allowed_to_push: [{ 'access_level' => Gitlab::Access::MAINTAINER }],
- allowed_to_merge: [{ 'access_level' => Gitlab::Access::DEVELOPER }],
- allow_force_push: true,
+ allowed_to_merge: [{ 'access_level' => Gitlab::Access::MAINTAINER }],
+ allow_force_push: false,
developer_can_initial_push: true
}
end
diff --git a/lib/gitlab/cache/import/caching.rb b/lib/gitlab/cache/import/caching.rb
index 8f2df29c3202b..e81a90831f75a 100644
--- a/lib/gitlab/cache/import/caching.rb
+++ b/lib/gitlab/cache/import/caching.rb
@@ -138,7 +138,7 @@ def self.set_includes?(raw_key, value)
key = cache_key_for(raw_key)
- Redis::Cache.with do |redis|
+ with_redis do |redis|
redis.sismember(key, value)
end
end
@@ -244,7 +244,14 @@ def self.cache_key_for(raw_key)
end
def self.with_redis(&block)
- Redis::Cache.with(&block) # rubocop:disable CodeReuse/ActiveRecord
+ block_result = Gitlab::Redis::Cache.with(&block) # rubocop:disable CodeReuse/ActiveRecord -- This is not AR
+ cache_identity = Gitlab::Redis::Cache.with(&:inspect) # rubocop:disable CodeReuse/ActiveRecord -- This is not AR
+
+ Gitlab::Redis::SharedState.with do |redis|
+ yield redis unless cache_identity == redis.default_store.inspect
+ end
+
+ block_result
end
def self.validate_redis_value!(value)
diff --git a/lib/gitlab/email/handler/create_note_handler.rb b/lib/gitlab/email/handler/create_note_handler.rb
index 0553ca738a2af..817956831e31b 100644
--- a/lib/gitlab/email/handler/create_note_handler.rb
+++ b/lib/gitlab/email/handler/create_note_handler.rb
@@ -75,6 +75,7 @@ def validate_from_address!
end
def reopen_issue_on_external_participant_note
+ return unless noteable.respond_to?(:closed?)
return unless noteable.closed?
return unless author == Users::Internal.support_bot
return unless project.service_desk_setting&.reopen_issue_on_external_participant_note?
diff --git a/lib/gitlab/github_import/importer/events/merged.rb b/lib/gitlab/github_import/importer/events/merged.rb
new file mode 100644
index 0000000000000..0f35f6aecd747
--- /dev/null
+++ b/lib/gitlab/github_import/importer/events/merged.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module GithubImport
+ module Importer
+ module Events
+ class Merged < BaseImporter
+ def execute(issue_event)
+ create_event(issue_event)
+ create_state_event(issue_event)
+ end
+
+ private
+
+ def create_event(issue_event)
+ Event.create!(
+ project_id: project.id,
+ author_id: author_id(issue_event),
+ action: 'merged',
+ target_type: issuable_type(issue_event),
+ target_id: issuable_db_id(issue_event),
+ created_at: issue_event.created_at,
+ updated_at: issue_event.created_at
+ )
+ end
+
+ def create_state_event(issue_event)
+ attrs = {
+ user_id: author_id(issue_event),
+ source_commit: issue_event.commit_id,
+ state: 'merged',
+ close_after_error_tracking_resolve: false,
+ close_auto_resolve_prometheus_alert: false,
+ created_at: issue_event.created_at
+ }.merge(resource_event_belongs_to(issue_event))
+
+ ResourceStateEvent.create!(attrs)
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/github_import/importer/issue_event_importer.rb b/lib/gitlab/github_import/importer/issue_event_importer.rb
index e9397accbcd92..d20482eca6f84 100644
--- a/lib/gitlab/github_import/importer/issue_event_importer.rb
+++ b/lib/gitlab/github_import/importer/issue_event_importer.rb
@@ -12,6 +12,7 @@ class IssueEventImporter
cross-referenced
demilestoned
labeled
+ merged
milestoned
renamed
reopened
@@ -62,6 +63,8 @@ def event_importer_class(issue_event)
Gitlab::GithubImport::Importer::Events::ChangedAssignee
when 'review_requested', 'review_request_removed'
Gitlab::GithubImport::Importer::Events::ChangedReviewer
+ when 'merged'
+ Gitlab::GithubImport::Importer::Events::Merged
end
end
end
diff --git a/lib/sidebars/admin/panel.rb b/lib/sidebars/admin/panel.rb
index 7f7d7ec843c2b..e0f9bc70762b9 100644
--- a/lib/sidebars/admin/panel.rb
+++ b/lib/sidebars/admin/panel.rb
@@ -9,11 +9,6 @@ def configure_menus
add_menus
end
- override :render_raw_scope_menu_partial
- def render_raw_scope_menu_partial
- "shared/nav/admin_scope_header"
- end
-
override :aria_label
def aria_label
s_("Admin|Admin Area")
diff --git a/lib/sidebars/concerns/container_with_html_options.rb b/lib/sidebars/concerns/container_with_html_options.rb
index 796b7cbe2752d..55bea2658e528 100644
--- a/lib/sidebars/concerns/container_with_html_options.rb
+++ b/lib/sidebars/concerns/container_with_html_options.rb
@@ -20,50 +20,10 @@ def extra_container_html_options
{}
end
- # The attributes returned from this method
- # will be applied to helper methods like
- # `link_to` or the div containing the container
- # when it is collapsed.
- def collapsed_container_html_options
- {
- aria: { label: title }
- }.merge(extra_collapsed_container_html_options)
- end
-
- # Classes should mostly override this method
- # and not `collapsed_container_html_options`.
- def extra_collapsed_container_html_options
- {}
- end
-
- # Attributes to pass to the html_options attribute
- # in the helper method that sets the active class
- # on each element.
- def nav_link_html_options
- {
- data: {
- track_label: self.class.name.demodulize.underscore
- }
- }.deep_merge(extra_nav_link_html_options)
- end
-
- # Classes should mostly override this method
- # and not `nav_link_html_options`.
- def extra_nav_link_html_options
- {}
- end
-
def title
raise NotImplementedError
end
- # The attributes returned from this method
- # will be applied right next to the title,
- # for example in the span that renders the title.
- def title_html_options
- {}
- end
-
def link
raise NotImplementedError
end
diff --git a/lib/sidebars/concerns/has_hint.rb b/lib/sidebars/concerns/has_hint.rb
deleted file mode 100644
index dc4f765e974c2..0000000000000
--- a/lib/sidebars/concerns/has_hint.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-# This module has the necessary methods to store
-# hints for menus. Hints are elements displayed
-# when the user hover the menu item.
-module Sidebars
- module Concerns
- module HasHint
- def show_hint?
- false
- end
-
- def hint_html_options
- {}
- end
- end
- end
-end
diff --git a/lib/sidebars/concerns/has_icon.rb b/lib/sidebars/concerns/has_icon.rb
index afff466239d13..6f797f5a1ff3a 100644
--- a/lib/sidebars/concerns/has_icon.rb
+++ b/lib/sidebars/concerns/has_icon.rb
@@ -17,10 +17,6 @@ def image_path
nil
end
- def image_html_options
- {}
- end
-
def icon_or_image?
sprite_icon || image_path
end
diff --git a/lib/sidebars/explore/panel.rb b/lib/sidebars/explore/panel.rb
index 3559f7d962711..a07072b5241b4 100644
--- a/lib/sidebars/explore/panel.rb
+++ b/lib/sidebars/explore/panel.rb
@@ -13,11 +13,6 @@ def aria_label
_('Explore')
end
- override :render_raw_scope_menu_partial
- def render_raw_scope_menu_partial
- "shared/nav/explore_scope_header"
- end
-
override :super_sidebar_context_header
def super_sidebar_context_header
aria_label
diff --git a/lib/sidebars/groups/menus/scope_menu.rb b/lib/sidebars/groups/menus/scope_menu.rb
index 5f6663e991967..ca20a86a91853 100644
--- a/lib/sidebars/groups/menus/scope_menu.rb
+++ b/lib/sidebars/groups/menus/scope_menu.rb
@@ -19,15 +19,6 @@ def active_routes
{ path: %w[groups#show groups#details groups#new projects#new] }
end
- override :extra_nav_link_html_options
- def extra_nav_link_html_options
- {
- class: 'context-header has-tooltip',
- title: context.group.name,
- data: { container: 'body', placement: 'right' }
- }
- end
-
override :render?
def render?
true
diff --git a/lib/sidebars/groups/menus/settings_menu.rb b/lib/sidebars/groups/menus/settings_menu.rb
index b8f345c1ed5f4..ece6460bb8952 100644
--- a/lib/sidebars/groups/menus/settings_menu.rb
+++ b/lib/sidebars/groups/menus/settings_menu.rb
@@ -40,13 +40,6 @@ def sprite_icon
'settings'
end
- override :extra_nav_link_html_options
- def extra_nav_link_html_options
- {
- class: 'shortcuts-settings'
- }
- end
-
override :pick_into_super_sidebar?
def pick_into_super_sidebar?
true
diff --git a/lib/sidebars/menu_item.rb b/lib/sidebars/menu_item.rb
index bd538d2fa900e..16f924602d51b 100644
--- a/lib/sidebars/menu_item.rb
+++ b/lib/sidebars/menu_item.rb
@@ -4,11 +4,11 @@ module Sidebars
class MenuItem
include ::Sidebars::Concerns::LinkWithHtmlOptions
- attr_reader :title, :link, :active_routes, :item_id, :container_html_options, :sprite_icon, :sprite_icon_html_options, :hint_html_options, :has_pill, :pill_count, :super_sidebar_parent, :avatar, :entity_id
+ attr_reader :title, :link, :active_routes, :item_id, :container_html_options, :sprite_icon, :sprite_icon_html_options, :has_pill, :pill_count, :super_sidebar_parent, :avatar, :entity_id
alias_method :has_pill?, :has_pill
# rubocop: disable Metrics/ParameterLists
- def initialize(title:, link:, active_routes:, item_id: nil, container_html_options: {}, sprite_icon: nil, sprite_icon_html_options: {}, hint_html_options: {}, has_pill: false, pill_count: nil, super_sidebar_parent: nil, avatar: nil, entity_id: nil)
+ def initialize(title:, link:, active_routes:, item_id: nil, container_html_options: {}, sprite_icon: nil, sprite_icon_html_options: {}, has_pill: false, pill_count: nil, super_sidebar_parent: nil, avatar: nil, entity_id: nil)
@title = title
@link = link
@active_routes = active_routes
@@ -18,17 +18,12 @@ def initialize(title:, link:, active_routes:, item_id: nil, container_html_optio
@sprite_icon_html_options = sprite_icon_html_options
@avatar = avatar
@entity_id = entity_id
- @hint_html_options = hint_html_options
@has_pill = has_pill
@pill_count = pill_count
@super_sidebar_parent = super_sidebar_parent
end
# rubocop: enable Metrics/ParameterLists
- def show_hint?
- hint_html_options.present?
- end
-
def render?
true
end
@@ -49,16 +44,6 @@ def serialize_for_super_sidebar
# https://gitlab.com/gitlab-org/gitlab/-/issues/391864
#
# container_html_options
- # hint_html_options
- # nav_link_html_options
- }
- end
-
- def nav_link_html_options
- {
- data: {
- track_label: item_id
- }
}
end
end
diff --git a/lib/sidebars/organizations/menus/scope_menu.rb b/lib/sidebars/organizations/menus/scope_menu.rb
index ba46dd7911f12..a535be2128088 100644
--- a/lib/sidebars/organizations/menus/scope_menu.rb
+++ b/lib/sidebars/organizations/menus/scope_menu.rb
@@ -24,13 +24,6 @@ def render?
true
end
- override :extra_nav_link_html_options
- def extra_nav_link_html_options
- {
- class: 'context-header'
- }
- end
-
override :serialize_as_menu_item_args
def serialize_as_menu_item_args
super.merge({
diff --git a/lib/sidebars/panel.rb b/lib/sidebars/panel.rb
index 518b13f0fae70..5f8f95d6699f8 100644
--- a/lib/sidebars/panel.rb
+++ b/lib/sidebars/panel.rb
@@ -74,22 +74,6 @@ def container
context.container
end
- # Auxiliar method that helps with the migration from
- # regular views to the new logic
- def render_raw_scope_menu_partial
- # No-op
- end
-
- # Auxiliar method that helps with the migration from
- # regular views to the new logic.
- #
- # Any menu inside this partial will be added after
- # all the menus added in the `configure_menus`
- # method.
- def render_raw_menus_partial
- # No-op
- end
-
private
override :index_of
diff --git a/lib/sidebars/projects/menus/ci_cd_menu.rb b/lib/sidebars/projects/menus/ci_cd_menu.rb
index c77e8e996b0c5..65e8573753e95 100644
--- a/lib/sidebars/projects/menus/ci_cd_menu.rb
+++ b/lib/sidebars/projects/menus/ci_cd_menu.rb
@@ -27,13 +27,6 @@ def title
_('CI/CD')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-pipelines-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'rocket'
diff --git a/lib/sidebars/projects/menus/confluence_menu.rb b/lib/sidebars/projects/menus/confluence_menu.rb
index 43ef7ac73c449..be80d2dfee3a0 100644
--- a/lib/sidebars/projects/menus/confluence_menu.rb
+++ b/lib/sidebars/projects/menus/confluence_menu.rb
@@ -26,13 +26,6 @@ def image_path
'confluence.svg'
end
- override :image_html_options
- def image_html_options
- {
- alt: title
- }
- end
-
override :render?
def render?
context.project.has_confluence?
diff --git a/lib/sidebars/projects/menus/external_issue_tracker_menu.rb b/lib/sidebars/projects/menus/external_issue_tracker_menu.rb
index f088ccce9f5ef..860fab4296dba 100644
--- a/lib/sidebars/projects/menus/external_issue_tracker_menu.rb
+++ b/lib/sidebars/projects/menus/external_issue_tracker_menu.rb
@@ -18,26 +18,11 @@ def extra_container_html_options
}
end
- override :extra_collapsed_container_html_options
- def extra_collapsed_container_html_options
- {
- target: '_blank',
- rel: 'noopener noreferrer'
- }
- end
-
override :title
def title
external_issue_tracker.title
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-issues-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'external-link'
diff --git a/lib/sidebars/projects/menus/external_wiki_menu.rb b/lib/sidebars/projects/menus/external_wiki_menu.rb
index 1af9abc33ff34..c273fb7698aee 100644
--- a/lib/sidebars/projects/menus/external_wiki_menu.rb
+++ b/lib/sidebars/projects/menus/external_wiki_menu.rb
@@ -18,14 +18,6 @@ def extra_container_html_options
}
end
- override :extra_collapsed_container_html_options
- def extra_collapsed_container_html_options
- {
- target: '_blank',
- rel: 'noopener noreferrer'
- }
- end
-
override :title
def title
s_('ExternalWikiService|External wiki')
diff --git a/lib/sidebars/projects/menus/infrastructure_menu.rb b/lib/sidebars/projects/menus/infrastructure_menu.rb
index d3c9f3a64660a..40a8b70b62416 100644
--- a/lib/sidebars/projects/menus/infrastructure_menu.rb
+++ b/lib/sidebars/projects/menus/infrastructure_menu.rb
@@ -55,24 +55,10 @@ def kubernetes_menu_item
super_sidebar_parent: Sidebars::Projects::SuperSidebarMenus::OperationsMenu,
active_routes: { controller: [:cluster_agents, :clusters] },
container_html_options: { class: 'shortcuts-kubernetes' },
- hint_html_options: kubernetes_hint_html_options,
item_id: :kubernetes
)
end
- def kubernetes_hint_html_options
- return {} unless context.show_cluster_hint
-
- { disabled: true,
- data: { trigger: 'manual',
- container: 'body',
- placement: 'right',
- highlight: Users::CalloutsHelper::GKE_CLUSTER_INTEGRATION,
- highlight_priority: Users::Callout.feature_names[:GKE_CLUSTER_INTEGRATION],
- dismiss_endpoint: callouts_path,
- auto_devops_help_path: help_page_path('topics/autodevops/index') } }
- end
-
def terraform_states_menu_item
unless can?(context.current_user, :read_terraform_state, context.project)
return ::Sidebars::NilMenuItem.new(item_id: :terraform_states)
diff --git a/lib/sidebars/projects/menus/issues_menu.rb b/lib/sidebars/projects/menus/issues_menu.rb
index e599b764ed94a..9791a88cf9f41 100644
--- a/lib/sidebars/projects/menus/issues_menu.rb
+++ b/lib/sidebars/projects/menus/issues_menu.rb
@@ -30,13 +30,6 @@ def title
_('Issues')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-issues-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'issues'
diff --git a/lib/sidebars/projects/menus/merge_requests_menu.rb b/lib/sidebars/projects/menus/merge_requests_menu.rb
index ae4fd6b02e768..eb6827f90e7ce 100644
--- a/lib/sidebars/projects/menus/merge_requests_menu.rb
+++ b/lib/sidebars/projects/menus/merge_requests_menu.rb
@@ -21,13 +21,6 @@ def title
_('Merge requests')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-mr-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'git-merge'
diff --git a/lib/sidebars/projects/menus/project_information_menu.rb b/lib/sidebars/projects/menus/project_information_menu.rb
index 6ab7e00dad363..ee06ed5314e7b 100644
--- a/lib/sidebars/projects/menus/project_information_menu.rb
+++ b/lib/sidebars/projects/menus/project_information_menu.rb
@@ -18,11 +18,6 @@ def extra_container_html_options
{ class: 'shortcuts-project-information' }
end
- override :extra_nav_link_html_options
- def extra_nav_link_html_options
- { class: 'home' }
- end
-
override :title
def title
_('Project information')
diff --git a/lib/sidebars/projects/menus/repository_menu.rb b/lib/sidebars/projects/menus/repository_menu.rb
index 5d23bf1f59c84..807ed72e85cda 100644
--- a/lib/sidebars/projects/menus/repository_menu.rb
+++ b/lib/sidebars/projects/menus/repository_menu.rb
@@ -32,13 +32,6 @@ def title
_('Repository')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-repo-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'doc-text'
diff --git a/lib/sidebars/projects/menus/scope_menu.rb b/lib/sidebars/projects/menus/scope_menu.rb
index d03abfdfb7edc..5bbbf3696e817 100644
--- a/lib/sidebars/projects/menus/scope_menu.rb
+++ b/lib/sidebars/projects/menus/scope_menu.rb
@@ -26,15 +26,6 @@ def extra_container_html_options
}
end
- override :extra_nav_link_html_options
- def extra_nav_link_html_options
- {
- class: 'context-header has-tooltip',
- title: context.project.name,
- data: { container: 'body', placement: 'right' }
- }
- end
-
override :render?
def render?
true
diff --git a/lib/sidebars/projects/menus/settings_menu.rb b/lib/sidebars/projects/menus/settings_menu.rb
index 077eebf58b9e1..5aaccb2644f6a 100644
--- a/lib/sidebars/projects/menus/settings_menu.rb
+++ b/lib/sidebars/projects/menus/settings_menu.rb
@@ -19,13 +19,6 @@ def title
_('Settings')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-settings-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'settings'
diff --git a/lib/sidebars/projects/menus/zentao_menu.rb b/lib/sidebars/projects/menus/zentao_menu.rb
index 1b5ba900a8689..c6edcd77cba77 100644
--- a/lib/sidebars/projects/menus/zentao_menu.rb
+++ b/lib/sidebars/projects/menus/zentao_menu.rb
@@ -14,26 +14,11 @@ def title
s_('ZentaoIntegration|ZenTao')
end
- override :title_html_options
- def title_html_options
- {
- id: 'js-onboarding-settings-link'
- }
- end
-
override :sprite_icon
def sprite_icon
'external-link'
end
- # Hardcode sizes so image doesn't flash before CSS loads https://gitlab.com/gitlab-org/gitlab/-/issues/321022
- override :image_html_options
- def image_html_options
- {
- size: 16
- }
- end
-
override :render?
def render?
return false if zentao_integration.blank?
diff --git a/lib/sidebars/user_settings/panel.rb b/lib/sidebars/user_settings/panel.rb
index b61cb3ed144dc..5be27936d9900 100644
--- a/lib/sidebars/user_settings/panel.rb
+++ b/lib/sidebars/user_settings/panel.rb
@@ -13,11 +13,6 @@ def aria_label
_('User settings')
end
- override :render_raw_scope_menu_partial
- def render_raw_scope_menu_partial
- "shared/nav/user_settings_scope_header"
- end
-
override :super_sidebar_context_header
def super_sidebar_context_header
aria_label
diff --git a/lib/sidebars/your_work/panel.rb b/lib/sidebars/your_work/panel.rb
index 6316023a8cb02..d1297fb439db9 100644
--- a/lib/sidebars/your_work/panel.rb
+++ b/lib/sidebars/your_work/panel.rb
@@ -13,11 +13,6 @@ def aria_label
_('Your work')
end
- override :render_raw_scope_menu_partial
- def render_raw_scope_menu_partial
- "shared/nav/your_work_scope_header"
- end
-
override :super_sidebar_context_header
def super_sidebar_context_header
aria_label
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 172b3642dd7ce..80d2c8a36472d 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1469,7 +1469,7 @@ msgstr ""
msgid "+ %{count} more"
msgstr ""
-msgid "+ %{hiddenBranchesLength} more"
+msgid "+ %{itemsLength} more"
msgstr ""
msgid "+ %{moreCount} more"
@@ -5508,6 +5508,9 @@ msgstr ""
msgid "Analytics|Are you sure you want to cancel creating this dashboard?"
msgstr ""
+msgid "Analytics|Are you sure you want to cancel creating this visualization?"
+msgstr ""
+
msgid "Analytics|Are you sure you want to cancel editing this dashboard?"
msgstr ""
@@ -42265,12 +42268,18 @@ msgstr ""
msgid "Saving project."
msgstr ""
-msgid "ScanExecutionPolicy|%{boldStart}Run%{boldEnd} %{typeSelector} %{filePath} %{tooltip}"
+msgid "ScanExecutionPolicy|%{boldStart}Run%{boldEnd} %{typeSelector} %{actionType}"
+msgstr ""
+
+msgid "ScanExecutionPolicy|%{boldStart}Run%{boldEnd} %{typeSelector} from the project %{projectSelector} with ref %{refSelector}"
msgstr ""
msgid "ScanExecutionPolicy|%{hostname}'s timezone"
msgstr ""
+msgid "ScanExecutionPolicy|%{labelStart}File path:%{labelEnd} %{filePath}"
+msgstr ""
+
msgid "ScanExecutionPolicy|%{period} %{days} at %{time} %{timezoneLabel} %{timezone}"
msgstr ""
@@ -42370,6 +42379,9 @@ msgstr ""
msgid "ScanExecutionPolicy|Select or Create a Key"
msgstr ""
+msgid "ScanExecutionPolicy|Select ref"
+msgstr ""
+
msgid "ScanExecutionPolicy|Select scanner profile"
msgstr ""
@@ -42397,6 +42409,9 @@ msgstr ""
msgid "ScanExecutionPolicy|branch"
msgstr ""
+msgid "ScanExecutionPolicy|file path group"
+msgstr ""
+
msgid "ScanExecutionPolicy|has specific tag"
msgstr ""
@@ -43427,7 +43442,7 @@ msgstr ""
msgid "SecurityOrchestration|Groups"
msgstr ""
-msgid "SecurityOrchestration|Hide extra branches"
+msgid "SecurityOrchestration|Hide extra items"
msgstr ""
msgid "SecurityOrchestration|If any scanner finds a newly detected critical vulnerability in an open merge request targeting the master branch, then require two approvals from any member of App security."
@@ -57414,9 +57429,6 @@ msgid_plural "files"
msgstr[0] ""
msgstr[1] ""
-msgid "file path group"
-msgstr ""
-
msgid "finding is not found or is already attached to a vulnerability"
msgstr ""
diff --git a/spec/graphql/types/ci/catalog/resources/component_type_spec.rb b/spec/graphql/types/ci/catalog/resources/component_type_spec.rb
index a26db1a69775e..93ab926d4068e 100644
--- a/spec/graphql/types/ci/catalog/resources/component_type_spec.rb
+++ b/spec/graphql/types/ci/catalog/resources/component_type_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Types::Ci::Catalog::Resources::ComponentType, feature_category: :pipeline_composition do
- specify { expect(described_class.graphql_name).to eq('CiCatalogResourcesComponent') }
+ specify { expect(described_class.graphql_name).to eq('CiCatalogResourceComponent') }
it 'exposes the expected fields' do
expected_fields = %i[
diff --git a/spec/graphql/types/ci/catalog/resources/components/input_type_spec.rb b/spec/graphql/types/ci/catalog/resources/components/input_type_spec.rb
index 4f5350289b7b9..cb716cfff8cb4 100644
--- a/spec/graphql/types/ci/catalog/resources/components/input_type_spec.rb
+++ b/spec/graphql/types/ci/catalog/resources/components/input_type_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Types::Ci::Catalog::Resources::Components::InputType, feature_category: :pipeline_composition do
- specify { expect(described_class.graphql_name).to eq('CiCatalogResourcesComponentsInput') }
+ specify { expect(described_class.graphql_name).to eq('CiCatalogResourceComponentInput') }
it 'exposes the expected fields' do
expected_fields = %i[
diff --git a/spec/lib/api/entities/project_import_status_spec.rb b/spec/lib/api/entities/project_import_status_spec.rb
index 5d7f06dc78e91..8c397c30b7866 100644
--- a/spec/lib/api/entities/project_import_status_spec.rb
+++ b/spec/lib/api/entities/project_import_status_spec.rb
@@ -105,6 +105,7 @@
let(:entity) { described_class.new(project) }
before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
::Gitlab::GithubImport::ObjectCounter.increment(project, :issues, :fetched, value: 10)
::Gitlab::GithubImport::ObjectCounter.increment(project, :issues, :imported, value: 8)
end
diff --git a/spec/lib/bulk_imports/network_error_spec.rb b/spec/lib/bulk_imports/network_error_spec.rb
index d5e2b739c8f2f..7a7250416f796 100644
--- a/spec/lib/bulk_imports/network_error_spec.rb
+++ b/spec/lib/bulk_imports/network_error_spec.rb
@@ -5,6 +5,10 @@
RSpec.describe BulkImports::NetworkError, :clean_gitlab_redis_cache, feature_category: :importers do
let(:tracker) { double(id: 1, stage: 2, entity: double(id: 3)) }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
describe '.new' do
it 'requires either a message or a HTTP response' do
expect { described_class.new }
diff --git a/spec/lib/gitlab/access/branch_protection_spec.rb b/spec/lib/gitlab/access/branch_protection_spec.rb
index e54ff8807b5e1..1ecb1cdd759e8 100644
--- a/spec/lib/gitlab/access/branch_protection_spec.rb
+++ b/spec/lib/gitlab/access/branch_protection_spec.rb
@@ -90,9 +90,9 @@
where(:level, :result) do
Gitlab::Access::PROTECTION_NONE | true
Gitlab::Access::PROTECTION_DEV_CAN_PUSH | false
- Gitlab::Access::PROTECTION_DEV_CAN_MERGE | true
+ Gitlab::Access::PROTECTION_DEV_CAN_MERGE | false
Gitlab::Access::PROTECTION_FULL | false
- Gitlab::Access::PROTECTION_DEV_CAN_INITIAL_PUSH | true
+ Gitlab::Access::PROTECTION_DEV_CAN_INITIAL_PUSH | false
end
with_them { it { is_expected.to eq(result) } }
@@ -117,10 +117,10 @@
where(:level, :result) do
Gitlab::Access::PROTECTION_NONE | [{ 'access_level' => Gitlab::Access::DEVELOPER }]
- Gitlab::Access::PROTECTION_DEV_CAN_PUSH | [{ 'access_level' => Gitlab::Access::DEVELOPER }]
+ Gitlab::Access::PROTECTION_DEV_CAN_PUSH | [{ 'access_level' => Gitlab::Access::MAINTAINER }]
Gitlab::Access::PROTECTION_DEV_CAN_MERGE | [{ 'access_level' => Gitlab::Access::DEVELOPER }]
Gitlab::Access::PROTECTION_FULL | [{ 'access_level' => Gitlab::Access::MAINTAINER }]
- Gitlab::Access::PROTECTION_DEV_CAN_INITIAL_PUSH | [{ 'access_level' => Gitlab::Access::DEVELOPER }]
+ Gitlab::Access::PROTECTION_DEV_CAN_INITIAL_PUSH | [{ 'access_level' => Gitlab::Access::MAINTAINER }]
end
with_them { it { is_expected.to eq(result) } }
diff --git a/spec/lib/gitlab/cache/import/caching_spec.rb b/spec/lib/gitlab/cache/import/caching_spec.rb
index 6f9879da28105..8f1c552e0b744 100644
--- a/spec/lib/gitlab/cache/import/caching_spec.rb
+++ b/spec/lib/gitlab/cache/import/caching_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Cache::Import::Caching, :clean_gitlab_redis_cache do
+RSpec.describe Gitlab::Cache::Import::Caching, :clean_gitlab_redis_cache, :clean_gitlab_redis_shared_state, feature_category: :importers do
shared_examples 'validated redis value' do
let(:value) { double('value', to_s: Object.new) }
@@ -32,7 +32,7 @@
expect(redis).to receive(:get).with(/foo/).and_return('bar')
expect(redis).to receive(:expire).with(/foo/, described_class::TIMEOUT)
- expect(Gitlab::Redis::Cache).to receive(:with).twice.and_yield(redis)
+ expect(Gitlab::Redis::Cache).to receive(:with).exactly(4).times.and_yield(redis)
described_class.read('foo')
end
@@ -44,7 +44,7 @@
expect(redis).to receive(:get).with(/foo/).and_return('')
expect(redis).not_to receive(:expire)
- expect(Gitlab::Redis::Cache).to receive(:with).and_yield(redis)
+ expect(Gitlab::Redis::Cache).to receive(:with).twice.and_yield(redis)
described_class.read('foo')
end
@@ -80,6 +80,10 @@
end
describe '.increment' do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'increment a key and returns the current value' do
expect(described_class.increment('foo')).to eq(1)
diff --git a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
index 53937935a02ee..30514b531dc88 100644
--- a/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
+++ b/spec/lib/gitlab/email/handler/create_note_handler_spec.rb
@@ -262,6 +262,20 @@
expect(noteable).to be_closed
end
+ context 'when noteable is a commit' do
+ let!(:note) { create(:note_on_commit, project: project) }
+ let!(:noteable) { note.noteable }
+
+ let!(:sent_notification) do
+ allow(Gitlab::ServiceDesk).to receive(:enabled?).with(project: project).and_return(true)
+ SentNotification.record_note(note, Users::Internal.support_bot.id)
+ end
+
+ it 'does not reopen issue but adds external participants comment' do
+ expect { receiver.execute }.to change { noteable.notes.count }.by(1)
+ end
+ end
+
context 'when reopen_issue_on_external_participant_note is true' do
shared_examples 'an automatically reopened issue' do
it 'reopens issue, adds external participants comment and reopen comment' do
diff --git a/spec/lib/gitlab/github_import/importer/collaborators_importer_spec.rb b/spec/lib/gitlab/github_import/importer/collaborators_importer_spec.rb
index 63cd3926f02ea..c1e9bed568180 100644
--- a/spec/lib/gitlab/github_import/importer/collaborators_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/collaborators_importer_spec.rb
@@ -74,6 +74,7 @@
describe '#parallel_import', :clean_gitlab_redis_cache do
before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
allow(client).to receive(:collaborators).with(project.import_source, affiliation: 'direct')
.and_return([github_collaborator])
allow(client).to receive(:collaborators).with(project.import_source, affiliation: 'outside')
diff --git a/spec/lib/gitlab/github_import/importer/diff_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/diff_notes_importer_spec.rb
index b3bb449c96368..1eb146ea9585a 100644
--- a/spec/lib/gitlab/github_import/importer/diff_notes_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/diff_notes_importer_spec.rb
@@ -90,6 +90,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each diff note in parallel' do
importer = described_class.new(project, client)
diff --git a/spec/lib/gitlab/github_import/importer/events/merged_spec.rb b/spec/lib/gitlab/github_import/importer/events/merged_spec.rb
new file mode 100644
index 0000000000000..4ea62557dd685
--- /dev/null
+++ b/spec/lib/gitlab/github_import/importer/events/merged_spec.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::GithubImport::Importer::Events::Merged, feature_category: :importers do
+ subject(:importer) { described_class.new(project, client) }
+
+ let_it_be(:project) { create(:project, :repository) }
+ let_it_be(:user) { create(:user) }
+
+ let(:client) { instance_double('Gitlab::GithubImport::Client') }
+ let(:merge_request) { create(:merge_request, source_project: project, target_project: project) }
+ let(:commit_id) { nil }
+
+ let(:issue_event) do
+ Gitlab::GithubImport::Representation::IssueEvent.from_json_hash(
+ 'id' => 6501124486,
+ 'node_id' => 'CE_lADOHK9fA85If7x0zwAAAAGDf0mG',
+ 'url' => 'https://api.github.com/repos/elhowm/test-import/issues/events/6501124486',
+ 'actor' => { 'id' => user.id, 'login' => user.username },
+ 'event' => 'merged',
+ 'created_at' => '2022-04-26 18:30:53 UTC',
+ 'commit_id' => commit_id,
+ 'issue' => { 'number' => merge_request.iid, pull_request: true }
+ )
+ end
+
+ before do
+ allow_next_instance_of(Gitlab::GithubImport::IssuableFinder) do |finder|
+ allow(finder).to receive(:database_id).and_return(merge_request.id)
+ end
+ allow_next_instance_of(Gitlab::GithubImport::UserFinder) do |finder|
+ allow(finder).to receive(:find).with(user.id, user.username).and_return(user.id)
+ end
+ end
+
+ it 'creates expected event and state event' do
+ importer.execute(issue_event)
+
+ expect(merge_request.events.count).to eq 1
+ expect(merge_request.events.first).to have_attributes(
+ project_id: project.id,
+ author_id: user.id,
+ target_id: merge_request.id,
+ target_type: merge_request.class.name,
+ action: 'merged',
+ created_at: issue_event.created_at,
+ updated_at: issue_event.created_at
+ )
+
+ expect(merge_request.resource_state_events.count).to eq 1
+ expect(merge_request.resource_state_events.first).to have_attributes(
+ user_id: user.id,
+ merge_request_id: merge_request.id,
+ state: 'merged',
+ created_at: issue_event.created_at,
+ close_after_error_tracking_resolve: false,
+ close_auto_resolve_prometheus_alert: false
+ )
+ end
+
+ context 'when commit ID is present' do
+ let!(:commit) { create(:commit, project: project) }
+ let(:commit_id) { commit.id }
+
+ it 'creates expected event and state event' do
+ importer.execute(issue_event)
+
+ expect(merge_request.events.count).to eq 1
+ state_event = merge_request.resource_state_events.last
+ expect(state_event.source_commit).to eq commit_id[0..40]
+ end
+ end
+end
diff --git a/spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb b/spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb
index 91121f3c3fc01..2389489e86714 100644
--- a/spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb
@@ -2,20 +2,19 @@
require 'spec_helper'
-RSpec.describe Gitlab::GithubImport::Importer::IssueEventImporter, :clean_gitlab_redis_cache do
+RSpec.describe Gitlab::GithubImport::Importer::IssueEventImporter, :clean_gitlab_redis_cache,
+ feature_category: :importers do
let(:importer) { described_class.new(issue_event, project, client) }
- let(:project) { create(:project) }
- let(:client) { instance_double('Gitlab::GithubImport::Client') }
- let(:user) { create(:user) }
- let(:issue) { create(:issue, project: project) }
+ let(:project) { build(:project) }
+ let(:client) { instance_double(Gitlab::GithubImport::Client) }
let(:issue_event) do
Gitlab::GithubImport::Representation::IssueEvent.from_json_hash(
'id' => 6501124486,
'node_id' => 'CE_lADOHK9fA85If7x0zwAAAAGDf0mG',
'url' => 'https://api.github.com/repos/elhowm/test-import/issues/events/6501124486',
- 'actor' => { 'id' => actor_id, 'login' => 'alice' },
+ 'actor' => { 'id' => 1, 'login' => 'alice' },
'event' => event_name,
'commit_id' => '570e7b2abdd848b95f2f578043fc23bd6f6fd24d',
'commit_url' =>
@@ -25,17 +24,13 @@
)
end
- let(:actor_id) { user.id }
let(:event_name) { 'closed' }
shared_examples 'triggers specific event importer' do |importer_class|
it importer_class.name do
- specific_importer = double(importer_class.name) # rubocop:disable RSpec/VerifiedDoubles
-
- expect(importer_class)
- .to receive(:new).with(project, client)
- .and_return(specific_importer)
- expect(specific_importer).to receive(:execute).with(issue_event)
+ expect_next_instance_of(importer_class, project, client) do |importer|
+ expect(importer).to receive(:execute).with(issue_event)
+ end
importer.execute
end
@@ -45,85 +40,79 @@
context "when it's closed issue event" do
let(:event_name) { 'closed' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::Closed
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::Closed
end
context "when it's reopened issue event" do
let(:event_name) { 'reopened' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::Reopened
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::Reopened
end
context "when it's labeled issue event" do
let(:event_name) { 'labeled' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedLabel
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedLabel
end
context "when it's unlabeled issue event" do
let(:event_name) { 'unlabeled' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedLabel
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedLabel
end
context "when it's renamed issue event" do
let(:event_name) { 'renamed' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::Renamed
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::Renamed
end
context "when it's milestoned issue event" do
let(:event_name) { 'milestoned' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedMilestone
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedMilestone
end
context "when it's demilestoned issue event" do
let(:event_name) { 'demilestoned' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedMilestone
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedMilestone
end
context "when it's cross-referenced issue event" do
let(:event_name) { 'cross-referenced' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::CrossReferenced
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::CrossReferenced
end
context "when it's assigned issue event" do
let(:event_name) { 'assigned' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedAssignee
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedAssignee
end
context "when it's unassigned issue event" do
let(:event_name) { 'unassigned' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedAssignee
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedAssignee
end
context "when it's review_requested issue event" do
let(:event_name) { 'review_requested' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedReviewer
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedReviewer
end
context "when it's review_request_removed issue event" do
let(:event_name) { 'review_request_removed' }
- it_behaves_like 'triggers specific event importer',
- Gitlab::GithubImport::Importer::Events::ChangedReviewer
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::ChangedReviewer
+ end
+
+ context "when it's merged issue event" do
+ let(:event_name) { 'merged' }
+
+ it_behaves_like 'triggers specific event importer', Gitlab::GithubImport::Importer::Events::Merged
end
context "when it's unknown issue event" do
diff --git a/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb b/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb
index fb1e0c3caf7a2..f7ee6fee6dc92 100644
--- a/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb
@@ -74,6 +74,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each note in parallel' do
allow(importer).to receive(:each_object_to_import).and_yield(issue_event)
diff --git a/spec/lib/gitlab/github_import/importer/issues_importer_spec.rb b/spec/lib/gitlab/github_import/importer/issues_importer_spec.rb
index 7b42d3e1325eb..9451d1dfc3787 100644
--- a/spec/lib/gitlab/github_import/importer/issues_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/issues_importer_spec.rb
@@ -83,6 +83,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each issue in parallel' do
importer = described_class.new(project, client)
diff --git a/spec/lib/gitlab/github_import/importer/lfs_objects_importer_spec.rb b/spec/lib/gitlab/github_import/importer/lfs_objects_importer_spec.rb
index 3f5ee68d264a7..a5ec39b417739 100644
--- a/spec/lib/gitlab/github_import/importer/lfs_objects_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/lfs_objects_importer_spec.rb
@@ -111,6 +111,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each lfs object in parallel' do
importer = described_class.new(project, client)
diff --git a/spec/lib/gitlab/github_import/importer/notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/notes_importer_spec.rb
index 99114a9be7729..92d3071c8262a 100644
--- a/spec/lib/gitlab/github_import/importer/notes_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/notes_importer_spec.rb
@@ -76,6 +76,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each note in parallel' do
importer = described_class.new(project, client)
diff --git a/spec/lib/gitlab/github_import/importer/protected_branches_importer_spec.rb b/spec/lib/gitlab/github_import/importer/protected_branches_importer_spec.rb
index e30f3f34de167..b0892767fb338 100644
--- a/spec/lib/gitlab/github_import/importer/protected_branches_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/protected_branches_importer_spec.rb
@@ -133,6 +133,7 @@
describe '#parallel_import', :clean_gitlab_redis_cache do
before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
allow(client).to receive(:branches).and_return(branches)
allow(client)
.to receive(:branch_protection)
diff --git a/spec/lib/gitlab/github_import/importer/pull_requests/reviews_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_requests/reviews_importer_spec.rb
index 4321997815a33..f5779f300b8d4 100644
--- a/spec/lib/gitlab/github_import/importer/pull_requests/reviews_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/pull_requests/reviews_importer_spec.rb
@@ -46,6 +46,10 @@
let(:review) { { id: 1 } }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'fetches the pull requests reviews data' do
page = Struct.new(:objects, :number).new([review], 1)
diff --git a/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb
index 10e413fdfe5e8..1a0adbbe3a320 100644
--- a/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/pull_requests_importer_spec.rb
@@ -93,6 +93,10 @@
end
describe '#parallel_import', :clean_gitlab_redis_cache do
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'imports each note in parallel' do
importer = described_class.new(project, client)
@@ -112,9 +116,8 @@
end
describe '#each_object_to_import', :clean_gitlab_redis_cache do
- let(:importer) { described_class.new(project, client) }
-
before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
page = double(:page, objects: [pull_request], number: 1)
expect(client)
@@ -127,6 +130,8 @@
.and_yield(page)
end
+ let(:importer) { described_class.new(project, client) }
+
it 'yields every pull request to the supplied block' do
expect { |b| importer.each_object_to_import(&b) }
.to yield_with_args(pull_request)
diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb
index 081d08edfb3ff..6fe0494d7cd17 100644
--- a/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb
@@ -29,6 +29,10 @@
let(:note) { { id: 1 } }
let(:page) { double(objects: [note], number: 1) }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'fetches data' do
expect(client)
.to receive(:each_page)
diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_events_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_events_importer_spec.rb
index 8f4d62e53d6a3..91f89f0779c0e 100644
--- a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_events_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_events_importer_spec.rb
@@ -101,14 +101,10 @@
let(:page_counter) { instance_double(Gitlab::GithubImport::PageCounter) }
before do
- allow(client).to receive(:each_page)
- .once
- .with(
- :issue_timeline,
- project.import_source,
- issuable.iid,
- { state: 'all', sort: 'created', direction: 'asc', page: 1 }
- ).and_yield(page)
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ allow(client).to receive(:each_page).once.with(:issue_timeline,
+ project.import_source, issuable.iid, { state: 'all', sort: 'created', direction: 'asc', page: 1 }
+ ).and_yield(page)
end
context 'with issues' do
diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb
index e1f65546e1d51..88613244c8b16 100644
--- a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb
@@ -28,6 +28,10 @@
let(:note) { { id: 1 } }
let(:page) { double(objects: [note], number: 1) }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'fetches data' do
expect(client)
.to receive(:each_page)
diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb
index 5523b97acc3fe..601cd7a8f151b 100644
--- a/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb
@@ -29,6 +29,10 @@
let(:note) { { id: 1 } }
let(:page) { double(objects: [note], number: 1) }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'fetches data' do
expect(client)
.to receive(:each_page)
diff --git a/spec/lib/gitlab/github_import/object_counter_spec.rb b/spec/lib/gitlab/github_import/object_counter_spec.rb
index 964bdd6aad176..aa551195a35c6 100644
--- a/spec/lib/gitlab/github_import/object_counter_spec.rb
+++ b/spec/lib/gitlab/github_import/object_counter_spec.rb
@@ -5,6 +5,10 @@
RSpec.describe Gitlab::GithubImport::ObjectCounter, :clean_gitlab_redis_cache, feature_category: :importers do
let_it_be(:project) { create(:project, :import_started, import_type: 'github', import_url: 'https://github.com/vim/vim.git') }
+ before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ end
+
it 'validates the operation being incremented' do
expect { described_class.increment(project, :issue, :unknown) }
.to raise_error(ArgumentError, 'operation must be fetched or imported')
diff --git a/spec/lib/gitlab/github_import/parallel_scheduling_spec.rb b/spec/lib/gitlab/github_import/parallel_scheduling_spec.rb
index e0b1ff1bc338d..3188206de5bbf 100644
--- a/spec/lib/gitlab/github_import/parallel_scheduling_spec.rb
+++ b/spec/lib/gitlab/github_import/parallel_scheduling_spec.rb
@@ -275,17 +275,10 @@ def abort_on_failure
let(:batch_delay) { 1.minute }
before do
- allow(importer)
- .to receive(:representation_class)
- .and_return(repr_class)
-
- allow(importer)
- .to receive(:sidekiq_worker_class)
- .and_return(worker_class)
-
- allow(repr_class)
- .to receive(:from_api_response)
- .with(object, {})
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ allow(importer).to receive(:representation_class).and_return(repr_class)
+ allow(importer).to receive(:sidekiq_worker_class).and_return(worker_class)
+ allow(repr_class).to receive(:from_api_response).with(object, {})
.and_return({ title: 'One' }, { title: 'Two' }, { title: 'Three' })
end
diff --git a/spec/lib/sidebars/concerns/container_with_html_options_spec.rb b/spec/lib/sidebars/concerns/container_with_html_options_spec.rb
index 588e89a80f70b..6adbfce3087a9 100644
--- a/spec/lib/sidebars/concerns/container_with_html_options_spec.rb
+++ b/spec/lib/sidebars/concerns/container_with_html_options_spec.rb
@@ -18,10 +18,4 @@ def title
expect(subject.container_html_options).to eq(aria: { label: 'Foo' })
end
end
-
- describe '#collapsed_container_html_options' do
- it 'includes by default aria-label attribute' do
- expect(subject.collapsed_container_html_options).to eq(aria: { label: 'Foo' })
- end
- end
end
diff --git a/spec/lib/sidebars/groups/menus/scope_menu_spec.rb b/spec/lib/sidebars/groups/menus/scope_menu_spec.rb
index 2cce2d28e683d..00083fcfbf16f 100644
--- a/spec/lib/sidebars/groups/menus/scope_menu_spec.rb
+++ b/spec/lib/sidebars/groups/menus/scope_menu_spec.rb
@@ -8,12 +8,6 @@
let(:context) { Sidebars::Groups::Context.new(current_user: user, container: group) }
let(:menu) { described_class.new(context) }
- describe '#extra_nav_link_html_options' do
- subject { menu.extra_nav_link_html_options }
-
- specify { is_expected.to match(hash_including(class: 'context-header has-tooltip', title: context.group.name)) }
- end
-
it_behaves_like 'serializable as super_sidebar_menu_args' do
let(:extra_attrs) do
{
diff --git a/spec/lib/sidebars/projects/menus/scope_menu_spec.rb b/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
index 108a98e28a4dd..fb1ec94dfe840 100644
--- a/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
+++ b/spec/lib/sidebars/projects/menus/scope_menu_spec.rb
@@ -25,10 +25,4 @@
specify { is_expected.to match(hash_including(class: 'shortcuts-project')) }
end
-
- describe '#extra_nav_link_html_options' do
- subject { described_class.new(context).extra_nav_link_html_options }
-
- specify { is_expected.to match(hash_including(class: 'context-header has-tooltip', title: context.project.name)) }
- end
end
diff --git a/spec/models/concerns/vulnerability_finding_helpers_spec.rb b/spec/models/concerns/vulnerability_finding_helpers_spec.rb
deleted file mode 100644
index 023ecccb5207a..0000000000000
--- a/spec/models/concerns/vulnerability_finding_helpers_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe VulnerabilityFindingHelpers do
- let(:cls) do
- Class.new do
- include VulnerabilityFindingHelpers
-
- attr_accessor :report_type
-
- def initialize(report_type)
- @report_type = report_type
- end
- end
- end
-
- describe '#requires_manual_resolution?' do
- it 'returns false if the finding does not require manual resolution' do
- expect(cls.new('sast').requires_manual_resolution?).to eq(false)
- end
-
- it 'returns true when the finding requires manual resolution' do
- expect(cls.new('secret_detection').requires_manual_resolution?).to eq(true)
- end
- end
-end
diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml
index 015f63cbf45bd..2892edbe85c58 100644
--- a/spec/support/rspec_order_todo.yml
+++ b/spec/support/rspec_order_todo.yml
@@ -6106,7 +6106,6 @@
- './spec/lib/gitlab/github_import/importer/events/renamed_spec.rb'
- './spec/lib/gitlab/github_import/importer/events/reopened_spec.rb'
- './spec/lib/gitlab/github_import/importer/issue_and_label_links_importer_spec.rb'
-- './spec/lib/gitlab/github_import/importer/issue_event_importer_spec.rb'
- './spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb'
- './spec/lib/gitlab/github_import/importer/issue_importer_spec.rb'
- './spec/lib/gitlab/github_import/importer/issues_importer_spec.rb'
diff --git a/spec/support/shared_examples/models/with_member_role_shared_examples.rb b/spec/support/shared_examples/models/with_member_role_shared_examples.rb
deleted file mode 100644
index 428dffecc0a25..0000000000000
--- a/spec/support/shared_examples/models/with_member_role_shared_examples.rb
+++ /dev/null
@@ -1,97 +0,0 @@
-# frozen_string_literal: true
-
-RSpec.shared_examples 'model with member role relation' do
- describe 'associations', feature_category: :permissions do
- it { is_expected.to belong_to(:member_role) }
- end
-
- describe 'validations', feature_category: :permissions do
- before do
- model.member_role = create(:member_role, namespace: model.group, base_access_level: Gitlab::Access::DEVELOPER)
- model[model.base_access_level_attr] = Gitlab::Access::DEVELOPER
- stub_licensed_features(custom_roles: true)
- end
-
- describe 'validate_member_role_access_level' do
- context 'when no member role is associated' do
- let(:member_role) { nil }
-
- it { is_expected.to be_valid }
- end
-
- context 'when the member role base access level matches the default membership role' do
- it { is_expected.to be_valid }
- end
-
- context 'when the member role base access level does not match the default membership role' do
- before do
- model[model.base_access_level_attr] = Gitlab::Access::GUEST
- end
-
- it 'is invalid' do
- expect(model).not_to be_valid
- expect(model.errors[:member_role_id]).to include(
- _("the custom role's base access level does not match the current access level")
- )
- end
- end
- end
-
- describe 'validate_access_level_locked_for_member_role' do
- before do
- model.save!
- model[model.base_access_level_attr] = Gitlab::Access::MAINTAINER
- end
-
- context 'when no member role is associated' do
- before do
- model.member_role = nil
- end
-
- it { is_expected.to be_valid }
- end
-
- context 'when the member role has changed' do
- before do
- member_role = create(:member_role, namespace: model.group, base_access_level: Gitlab::Access::MAINTAINER)
- model.member_role = member_role
- end
-
- it { is_expected.to be_valid }
- end
-
- context 'when the member role has not changed' do
- it 'is invalid' do
- expect(model).not_to be_valid
- expect(model.errors[model.base_access_level_attr]).to include(
- _('cannot be changed because of an existing association with a custom role')
- )
- end
- end
- end
-
- describe 'validate_member_role_belongs_to_same_root_namespace' do
- context 'when no member role is associated' do
- before do
- model.member_role = nil
- end
-
- it { is_expected.to be_valid }
- end
-
- context "when the member role namespace is the same as the model's group" do
- it { is_expected.to be_valid }
- end
-
- context "when the member role namespace is outside the hierarchy of the model's group" do
- before do
- model.group = create(:group)
- end
-
- it 'is invalid' do
- expect(model).not_to be_valid
- end
- end
- end
- end
-end
diff --git a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
index b2bc502d156df..0f7625713e36f 100644
--- a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
+++ b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
@@ -67,10 +67,8 @@ def github_identifiers
describe '#import', :clean_gitlab_redis_cache do
before do
- expect(worker)
- .to receive(:importer_class)
- .at_least(:once)
- .and_return(importer_class)
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
+ expect(worker).to receive(:importer_class).at_least(:once).and_return(importer_class)
end
it 'imports the object' do
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 6dfab44b2285a..3dc3971385ea2 100644
--- a/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb
+++ b/spec/workers/gitlab/jira_import/import_issue_worker_spec.rb
@@ -22,15 +22,15 @@
describe '#perform', :clean_gitlab_redis_cache do
let(:assignee_ids) { [user.id] }
let(:issue_attrs) do
- build(:issue, project_id: project.id, namespace_id: project.project_namespace_id, title: 'jira issue')
- .as_json.merge(
- 'label_ids' => [jira_issue_label_1.id, jira_issue_label_2.id], 'assignee_ids' => assignee_ids
- ).except('issue_type')
+ build(:issue, project_id: project.id, namespace_id: project.project_namespace_id, title: 'jira issue').as_json
+ .merge('label_ids' => [jira_issue_label_1.id, jira_issue_label_2.id], 'assignee_ids' => assignee_ids)
+ .except('issue_type')
.compact
end
context 'when any exception raised while inserting to DB' do
before do
+ allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK')
allow(subject).to receive(:insert_and_return_id).and_raise(StandardError)
expect(Gitlab::JobWaiter).to receive(:notify)