Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-11-09 03:09:03 +00:00
parent 66204abcf2
commit 5d066c532d
83 changed files with 570 additions and 112 deletions

View File

@ -73,6 +73,9 @@ module Types
field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue'
field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: false,
method: :project_emails_disabled?,
description: 'Indicates if a project has email notifications disabled'
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Indicates the currently logged in user is subscribed to the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false,

View File

@ -335,7 +335,11 @@ class Commit
strong_memoize(:raw_signature_type) do
next unless @raw.instance_of?(Gitlab::Git::Commit)
@raw.raw_commit.signature_type if defined? @raw.raw_commit.signature_type
if raw_commit_from_rugged? && gpg_commit.signature_text.present?
:PGP
elsif defined? @raw.raw_commit.signature_type
@raw.raw_commit.signature_type
end
end
end
@ -347,7 +351,7 @@ class Commit
strong_memoize(:signature) do
case signature_type
when :PGP
Gitlab::Gpg::Commit.new(self).signature
gpg_commit.signature
when :X509
Gitlab::X509::Commit.new(self).signature
else
@ -356,6 +360,14 @@ class Commit
end
end
def raw_commit_from_rugged?
@raw.raw_commit.is_a?(Rugged::Commit)
end
def gpg_commit
@gpg_commit ||= Gitlab::Gpg::Commit.new(self)
end
def revert_branch_name
"revert-#{short_id}"
end

View File

@ -305,6 +305,10 @@ class Environment < ApplicationRecord
latest_opened_most_severe_alert.present?
end
def has_running_deployments?
all_deployments.running.exists?
end
def metrics
prometheus_adapter.query(:environment, self) if has_metrics_and_can_query?
end

View File

@ -10,6 +10,10 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated
def subscribed?
issue.subscribed?(current_user, issue.project)
end
def project_emails_disabled?
issue.project.emails_disabled?
end
end
IssuePresenter.prepend_if_ee('EE::IssuePresenter')

View File

@ -4,6 +4,11 @@ class EnvironmentEntity < Grape::Entity
include RequestAwareEntity
expose :id
expose :global_id do |environment|
environment.to_global_id.to_s
end
expose :name
expose :state
expose :external_url

View File

@ -40,7 +40,7 @@ module Projects
apply_bfg_object_map!
# Remove older objects that are no longer referenced
GitGarbageCollectWorker.new.perform(project.id, :gc, "project_cleanup:gc:#{project.id}")
GitGarbageCollectWorker.new.perform(project.id, :prune, "project_cleanup:gc:#{project.id}")
# The cache may now be inaccurate, and holding onto it could prevent
# bugs assuming the presence of some object from manifesting for some

View File

@ -27,15 +27,15 @@ class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
task = task.to_sym
if task == :gc
if gc?(task)
::Projects::GitDeduplicationService.new(project).execute
cleanup_orphan_lfs_file_references(project)
end
gitaly_call(task, project.repository.raw_repository)
gitaly_call(task, project)
# Refresh the branch cache in case garbage collection caused a ref lookup to fail
flush_ref_caches(project) if task == :gc
flush_ref_caches(project) if gc?(task)
update_repository_statistics(project) if task != :pack_refs
@ -48,6 +48,10 @@ class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
private
def gc?(task)
task == :gc || task == :prune
end
def try_obtain_lease(key)
::Gitlab::ExclusiveLease.new(key, timeout: LEASE_TIMEOUT).try_obtain
end
@ -64,8 +68,9 @@ class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
::Gitlab::ExclusiveLease.get_uuid(key)
end
## `repository` has to be a Gitlab::Git::Repository
def gitaly_call(task, repository)
def gitaly_call(task, project)
repository = project.repository.raw_repository
client = if task == :pack_refs
Gitlab::GitalyClient::RefService.new(repository)
else
@ -73,8 +78,8 @@ class GitGarbageCollectWorker # rubocop:disable Scalability/IdempotentWorker
end
case task
when :gc
client.garbage_collect(bitmaps_enabled?)
when :prune, :gc
client.garbage_collect(bitmaps_enabled?, prune: task == :prune)
when :full_repack
client.repack_full(bitmaps_enabled?)
when :incremental_repack

View File

@ -0,0 +1,5 @@
---
title: Fix 404 error from Commit Signature API when using Rugged
merge_request: 46736
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Prune loose objects during git garbage collection
merge_request: 39592
author:
type: changed

View File

@ -0,0 +1,5 @@
---
title: Add emailsDisabled field for issue type
merge_request: 46947
author:
type: changed

View File

@ -0,0 +1,5 @@
---
title: Changes limit for lsif artifacts to 100MB
merge_request: 46980
author:
type: changed

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
class ChangeDefaultValueOfCiMaxArtifactSizeLsifOfPlanLimitsFrom20To100 < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
change_column_default :plan_limits, :ci_max_artifact_size_lsif, 100
execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 100 WHERE ci_max_artifact_size_lsif = 20')
end
end
def down
with_lock_retries do
change_column_default :plan_limits, :ci_max_artifact_size_lsif, 20
execute('UPDATE plan_limits SET ci_max_artifact_size_lsif = 20 WHERE ci_max_artifact_size_lsif = 100')
end
end
end

View File

@ -0,0 +1 @@
41cc59ebfeed647b2525191befa43c1faeb1c133a687a5c93124f4b4c745117a

View File

@ -14631,7 +14631,7 @@ CREATE TABLE plan_limits (
offset_pagination_limit integer DEFAULT 50000 NOT NULL,
ci_instance_level_variables integer DEFAULT 25 NOT NULL,
storage_size_limit integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_lsif integer DEFAULT 20 NOT NULL,
ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL,
ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_trace integer DEFAULT 0 NOT NULL,

View File

@ -10,4 +10,4 @@ link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#links
level: error
scope: raw
raw:
- '\[.+\]\((https?:){0}[\w\/\.-]+(\.html).*\)'
- '\[.+\]\((https?:){0}[\w\/\.-]+(\.html).*?\)'

View File

@ -0,0 +1,13 @@
---
# Error: gitlab.InternalLinkFormat
#
# Checks that internal link paths don't start with "./", which is not needed.
#
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
extends: existence
message: 'Link "%s" must not start with "./".'
link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#links-to-internal-documentation
level: error
scope: raw
raw:
- '\[.+\]\(\.\/.+?\)'

View File

@ -177,7 +177,7 @@ successfully, you must replicate their data using some other means.
| [CI job artifacts (other than Job Logs)](../../../ci/pipelines/job_artifacts.md) | **Yes** (10.4) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/8923) | Via Object Storage provider if supported. Native Geo support (Beta) . | Verified only manually using [Integrity Check Rake Task](../../raketasks/check.md) on both nodes and comparing the output between them |
| [Job logs](../../job_logs.md) | **Yes** (10.4) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/8923) | Via Object Storage provider if supported. Native Geo support (Beta). | Verified only on transfer or manually using [Integrity Check Rake Task](../../raketasks/check.md) on both nodes and comparing the output between them |
| [Object pools for forked project deduplication](../../../development/git_object_deduplication.md) | **Yes** | No | No | |
| [Container Registry](../../packages/container_registry.md) | **Yes** (12.3) | No | No | Disabled by default. See [instructions](./docker_registry.md) to enable. |
| [Container Registry](../../packages/container_registry.md) | **Yes** (12.3) | No | No | Disabled by default. See [instructions](docker_registry.md) to enable. |
| [Content in object storage (beta)](object_storage.md) | **Yes** (12.4) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/13845) | No | |
| [Project designs repository](../../../user/project/issues/design_management.md) | **Yes** (12.7) | [No](https://gitlab.com/gitlab-org/gitlab/-/issues/32467) | Via Object Storage provider if supported. Native Geo support (Beta). | |
| [NPM Registry](../../../user/packages/npm_registry/index.md) | **Yes** (13.2) | [No](https://gitlab.com/groups/gitlab-org/-/epics/1817) | Via Object Storage provider if supported. Native Geo support (Beta). | Behind feature flag `geo_package_file_replication`, enabled by default |

View File

@ -25,7 +25,7 @@ To disable Geo, follow these steps:
## Remove all secondary Geo nodes
To disable Geo, you need to first remove all your secondary Geo nodes, which means replication will not happen
anymore on these nodes. You can follow our docs to [remove your secondary Geo nodes](./remove_geo_node.md).
anymore on these nodes. You can follow our docs to [remove your secondary Geo nodes](remove_geo_node.md).
If the current node that you want to keep using is a secondary node, you need to first promote it to primary.
You can use our steps on [how to promote a secondary node](../disaster_recovery/#step-3-promoting-a-secondary-node)

View File

@ -347,7 +347,7 @@ setting is used:
| `ci_max_artifact_size_license_management` | 0 |
| `ci_max_artifact_size_license_scanning` | 0 |
| `ci_max_artifact_size_load_performance` | 0 |
| `ci_max_artifact_size_lsif` | 20 MB ([introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37226) in GitLab 13.3) |
| `ci_max_artifact_size_lsif` | 100 MB ([Introduced at 20 MB](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37226) in GitLab 13.3 and [raised to 100 MB](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46980) in GitLab 13.6.) |
| `ci_max_artifact_size_metadata` | 0 |
| `ci_max_artifact_size_metrics_referee` | 0 |
| `ci_max_artifact_size_metrics` | 0 |

View File

@ -584,7 +584,7 @@ on how to achieve that.
## Use an external container registry with GitLab as an auth endpoint
If you use an external container registry, some features associated with the
container registry may be unavailable or have [inherent risks](./../../user/packages/container_registry/index.md#use-with-external-container-registries).
container registry may be unavailable or have [inherent risks](../../user/packages/container_registry/index.md#use-with-external-container-registries).
**Omnibus GitLab**

View File

@ -858,7 +858,7 @@ Find this content in the [Container Registry troubleshooting docs](../packages/c
## Sidekiq
This content has been moved to the [Troubleshooting Sidekiq docs](./sidekiq.md).
This content has been moved to the [Troubleshooting Sidekiq docs](sidekiq.md).
## Redis

View File

@ -22,7 +22,7 @@ were before.
This change is deployed behind a feature flag that is **enabled by default**.
If you experience any issues with upload,
[GitLab administrators with access to the GitLab Rails console](./feature_flags.md)
[GitLab administrators with access to the GitLab Rails console](feature_flags.md)
can opt to disable it.
To enable it:

View File

@ -842,7 +842,8 @@ Example response if commit is GPG signed:
"gpg_key_primary_keyid": "8254AAB3FBD54AC9",
"gpg_key_user_name": "John Doe",
"gpg_key_user_email": "johndoe@example.com",
"gpg_key_subkey_id": null
"gpg_key_subkey_id": null,
"commit_source": "gitaly"
}
```
@ -865,7 +866,8 @@ Example response if commit is X.509 signed:
"subject_key_identifier": "AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB:AB",
"crl_url": "http://example.com/pki.crl"
}
}
},
"commit_source": "gitaly"
}
```

View File

@ -379,7 +379,7 @@ This API retrieves the list of merge requests shipped with a given deployment:
GET /projects/:id/deployments/:deployment_id/merge_requests
```
It supports the same parameters as the [Merge Requests API](./merge_requests.md#list-merge-requests) and will return a response using the same format:
It supports the same parameters as the [Merge Requests API](merge_requests.md#list-merge-requests) and will return a response using the same format:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/42"

View File

@ -6618,6 +6618,41 @@ Identifier of Environment
"""
scalar EnvironmentID
"""
Autogenerated input type of EnvironmentsCanaryIngressUpdate
"""
input EnvironmentsCanaryIngressUpdateInput {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String
"""
The global ID of the environment to update
"""
id: EnvironmentID!
"""
The weight of the Canary Ingress
"""
weight: Int!
}
"""
Autogenerated return type of EnvironmentsCanaryIngressUpdate
"""
type EnvironmentsCanaryIngressUpdatePayload {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String
"""
Errors encountered during execution of the mutation.
"""
errors: [String!]!
}
"""
Represents an epic
"""
@ -7360,6 +7395,11 @@ type EpicIssue implements CurrentUserTodos & Noteable {
"""
dueDate: Time
"""
Indicates if a project has email notifications disabled
"""
emailsDisabled: Boolean!
"""
Epic to which this issue belongs
"""
@ -9879,6 +9919,11 @@ type Issue implements CurrentUserTodos & Noteable {
"""
dueDate: Time
"""
Indicates if a project has email notifications disabled
"""
emailsDisabled: Boolean!
"""
Epic to which this issue belongs
"""
@ -13208,6 +13253,7 @@ type Mutation {
"""
discussionToggleResolve(input: DiscussionToggleResolveInput!): DiscussionToggleResolvePayload
dismissVulnerability(input: DismissVulnerabilityInput!): DismissVulnerabilityPayload @deprecated(reason: "Use vulnerabilityDismiss. Deprecated in 13.5")
environmentsCanaryIngressUpdate(input: EnvironmentsCanaryIngressUpdateInput!): EnvironmentsCanaryIngressUpdatePayload
epicAddIssue(input: EpicAddIssueInput!): EpicAddIssuePayload
epicSetSubscription(input: EpicSetSubscriptionInput!): EpicSetSubscriptionPayload
epicTreeReorder(input: EpicTreeReorderInput!): EpicTreeReorderPayload

View File

@ -18349,6 +18349,108 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "EnvironmentsCanaryIngressUpdateInput",
"description": "Autogenerated input type of EnvironmentsCanaryIngressUpdate",
"fields": null,
"inputFields": [
{
"name": "id",
"description": "The global ID of the environment to update",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "EnvironmentID",
"ofType": null
}
},
"defaultValue": null
},
{
"name": "weight",
"description": "The weight of the Canary Ingress",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"defaultValue": null
},
{
"name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "EnvironmentsCanaryIngressUpdatePayload",
"description": "Autogenerated return type of EnvironmentsCanaryIngressUpdate",
"fields": [
{
"name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "errors",
"description": "Errors encountered during execution of the mutation.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "Epic",
@ -20316,6 +20418,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "emailsDisabled",
"description": "Indicates if a project has email notifications disabled",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "epic",
"description": "Epic to which this issue belongs",
@ -26955,6 +27075,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "emailsDisabled",
"description": "Indicates if a project has email notifications disabled",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "epic",
"description": "Epic to which this issue belongs",
@ -37454,6 +37592,33 @@
"isDeprecated": true,
"deprecationReason": "Use vulnerabilityDismiss. Deprecated in 13.5"
},
{
"name": "environmentsCanaryIngressUpdate",
"description": null,
"args": [
{
"name": "input",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "INPUT_OBJECT",
"name": "EnvironmentsCanaryIngressUpdateInput",
"ofType": null
}
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "EnvironmentsCanaryIngressUpdatePayload",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "epicAddIssue",
"description": null,

View File

@ -1101,6 +1101,15 @@ Describes where code is deployed for a project.
| `path` | String! | The path to the environment. |
| `state` | String! | State of the environment, for example: available/stopped |
### EnvironmentsCanaryIngressUpdatePayload
Autogenerated return type of EnvironmentsCanaryIngressUpdate.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
| `errors` | String! => Array | Errors encountered during execution of the mutation. |
### Epic
Represents an epic.
@ -1214,6 +1223,7 @@ Relationship between an epic and an issue.
| `discussions` | DiscussionConnection! | All discussions on this noteable |
| `downvotes` | Int! | Number of downvotes the issue has received |
| `dueDate` | Time | Due date of the issue |
| `emailsDisabled` | Boolean! | Indicates if a project has email notifications disabled |
| `epic` | Epic | Epic to which this issue belongs |
| `epicIssueId` | ID! | ID of the epic-issue relation |
| `healthStatus` | HealthStatus | Current health status. Returns null if `save_issuable_health_status` feature flag is disabled. |
@ -1480,6 +1490,7 @@ Represents a recorded measurement (object count) for the Admins.
| `discussions` | DiscussionConnection! | All discussions on this noteable |
| `downvotes` | Int! | Number of downvotes the issue has received |
| `dueDate` | Time | Due date of the issue |
| `emailsDisabled` | Boolean! | Indicates if a project has email notifications disabled |
| `epic` | Epic | Epic to which this issue belongs |
| `healthStatus` | HealthStatus | Current health status. Returns null if `save_issuable_health_status` feature flag is disabled. |
| `humanTimeEstimate` | String | Human-readable time estimate of the issue |

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.5.
This page describes the group iterations API.
There's a separate [project iterations API](./iterations.md) page.
There's a separate [project iterations API](iterations.md) page.
## List group iterations

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12819) in GitLab 9.5.
This page describes the group milestones API.
There's a separate [project milestones API](./milestones.md) page.
There's a separate [project milestones API](milestones.md) page.
## List group milestones

View File

@ -1944,7 +1944,7 @@ GET /projects/:id/issues/:issue_iid/closed_by
| Attribute | Type | Required | Description |
| ----------- | ---------------| -------- | ---------------------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](./README.md#namespaced-path-encoding) owned by the authenticated user |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of a project issue |
```shell
@ -2084,4 +2084,4 @@ Example response:
## List issue state events
To track which state was set, who did it, and when it happened, check out
[Resource state events API](./resource_state_events.md#issues).
[Resource state events API](resource_state_events.md#issues).

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.5.
This page describes the project iterations API.
There's a separate [group iterations API](./group_iterations.md) page.
There's a separate [group iterations API](group_iterations.md) page.
As of GitLab 13.5, we don't have project-level iterations, but you can use this endpoint to fetch the iterations of the project's ancestor groups.

View File

@ -2464,4 +2464,4 @@ For approvals, please see [Merge Request Approvals](merge_request_approvals.md)
## List merge request state events
To track which state was set, who did it, and when it happened, check out
[Resource state events API](./resource_state_events.md#merge-requests).
[Resource state events API](resource_state_events.md#merge-requests).

View File

@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Project milestones API
This page describes the project milestones API.
There's a separate [group milestones API](./group_milestones.md) page.
There's a separate [group milestones API](group_milestones.md) page.
## List project milestones

View File

@ -215,9 +215,9 @@ See [database guidelines](database/index.md).
## Other Development guides
- [Defining relations between files using projections](projections.md)
- [Reference processing](./reference_processing.md)
- [Reference processing](reference_processing.md)
- [Compatibility with multiple versions of the application running at the same time](multi_version_compatibility.md)
- [Features inside `.gitlab/`](./features_inside_dot_gitlab.md)
- [Features inside `.gitlab/`](features_inside_dot_gitlab.md)
## Other GitLab Development Kit (GDK) guides

View File

@ -240,7 +240,7 @@ it's own file in the [`validators`](https://gitlab.com/gitlab-org/gitlab/-/blob/
## Internal API
The [internal API](./internal_api.md) is documented for internal use. Please keep it up to date so we know what endpoints
The [internal API](internal_api.md) is documented for internal use. Please keep it up to date so we know what endpoints
different components are making use of.
## Avoiding N+1 problems
@ -297,7 +297,7 @@ end
## Testing
When writing tests for new API endpoints, consider using a schema [fixture](./testing_guide/best_practices.md#fixtures) located in `/spec/fixtures/api/schemas`. You can `expect` a response to match a given schema:
When writing tests for new API endpoints, consider using a schema [fixture](testing_guide/best_practices.md#fixtures) located in `/spec/fixtures/api/schemas`. You can `expect` a response to match a given schema:
```ruby
expect(response).to match_response_schema('merge_requests')

View File

@ -104,7 +104,7 @@ with [domain expertise](#domain-experts).
- If the license used by the new library hasn't been approved for use in
GitLab, the license must be **approved by a [legal department member](https://about.gitlab.com/handbook/legal/)**.
More information about license compatiblity can be found in our
[GitLab Licensing and Compatibility documentation](./licensing.md).
[GitLab Licensing and Compatibility documentation](licensing.md).
1. If your merge request includes adding a new UI/UX paradigm (*1*), it must be
**approved by a [UX lead](https://about.gitlab.com/company/team/)**.
1. If your merge request includes a new dependency or a filesystem change, it must be

View File

@ -57,7 +57,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
- [Query Count Limits](../query_count_limits.md)
- [Creating enums](../creating_enums.md)
- [Client-side connection-pool](client_side_connection_pool.md)
- [Updating multiple values](./setting_multiple_values.md)
- [Updating multiple values](setting_multiple_values.md)
## Case studies

View File

@ -1042,12 +1042,14 @@ To link to internal documentation:
- Use relative links to Markdown files in the same repository.
- Do not use absolute URLs or URLs from `docs.gitlab.com`.
- Use `../` to navigate to higher-level directories.
- Do not link relative to root. For example, `/ee/user/gitlab_com/index.md`.
- Don't prepend `./` to links to files or directories.
- Don't link relative to root. For example, `/ee/user/gitlab_com/index.md`.
Don't:
- `https://docs.gitlab.com/ee/administration/geo/replication/troubleshooting.html`
- `/ee/administration/geo/replication/troubleshooting.md`
- `./troubleshooting.md`
Do: `../../geo/replication/troubleshooting.md`

View File

@ -234,7 +234,7 @@ which is useful to diagnose why a search might be slow.
### Correlation ID and `X-Opaque-Id`
Our [correlation
ID](./distributed_tracing.md#developer-guidelines-for-working-with-correlation-ids)
ID](distributed_tracing.md#developer-guidelines-for-working-with-correlation-ids)
is forwarded by all requests from Rails to Elasticsearch as the
[`X-Opaque-Id`](https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#_identifying_running_tasks)
header which allows us to track any

View File

@ -53,7 +53,7 @@ of the new feature should be.
The Store and the Service should be imported and initialized in this file and
provided as a prop to the main component.
Be sure to read about [page-specific JavaScript](./performance.md#page-specific-javascript).
Be sure to read about [page-specific JavaScript](performance.md#page-specific-javascript).
### Bootstrapping Gotchas

View File

@ -80,7 +80,7 @@ In order to build a final release and present the feature for self-managed
users, the feature flag should be at least defaulted to **on**. If the feature
is deemed stable and there is confidence that removing the feature flag is safe,
consider removing the feature flag altogether. It's _strongly_ recommended that
the feature flag is [enabled **globally** on **production**](./controls.md#enabling-a-feature-for-gitlabcom) for **at least one day**
the feature flag is [enabled **globally** on **production**](controls.md#enabling-a-feature-for-gitlabcom) for **at least one day**
before making this decision. Unexpected bugs are sometimes discovered during this period.
The process for enabling features that are disabled by default can take 5-6 days

View File

@ -546,7 +546,7 @@ end
The usage of shared temporary storage is required if your intent
is to persistent file for a disk-based storage, and not Object Storage.
[Workhorse direct_upload](./uploads.md#direct-upload) when accepting file
[Workhorse direct_upload](uploads.md#direct-upload) when accepting file
can write it to shared storage, and later GitLab Rails can perform a move operation.
The move operation on the same destination is instantaneous.
The system instead of performing `copy` operation just re-attaches file into a new place.
@ -570,7 +570,7 @@ that implements a seamless support for Shared and Object Storage-based persisten
#### Data access
Each feature that accepts data uploads or allows to download them needs to use
[Workhorse direct_upload](./uploads.md#direct-upload). It means that uploads needs to be
[Workhorse direct_upload](uploads.md#direct-upload). It means that uploads needs to be
saved directly to Object Storage by Workhorse, and all downloads needs to be served
by Workhorse.
@ -582,5 +582,5 @@ can time out, which is especially problematic for slow clients. If clients take
to upload/download the processing slot might be killed due to request processing
timeout (usually between 30s-60s).
For the above reasons it is required that [Workhorse direct_upload](./uploads.md#direct-upload) is implemented
For the above reasons it is required that [Workhorse direct_upload](uploads.md#direct-upload) is implemented
for all file uploads and downloads.

View File

@ -132,12 +132,12 @@ GitLab displays an error or success message, depending on the outcome of your te
In GitLab versions 13.2 and greater, GitLab groups alerts based on their
payload. When an incoming alert contains the same payload as another alert
(excluding the `start_time` and `hosts` attributes), GitLab groups these alerts
together and displays a counter on the [Alert Management List](./incidents.md)
together and displays a counter on the [Alert Management List](incidents.md)
and details pages.
If the existing alert is already `resolved`, GitLab creates a new alert instead.
![Alert Management List](./img/alert_list_v13_1.png)
![Alert Management List](img/alert_list_v13_1.png)
## Link to your Opsgenie Alerts

View File

@ -63,7 +63,7 @@ Alerts contain one of the following icons:
## Alert details page
Navigate to the Alert details view by visiting the [Alert list](./alerts.md)
Navigate to the Alert details view by visiting the [Alert list](alerts.md)
and selecting an alert from the list. You need least Developer [permissions](../../user/permissions.md)
to access alerts.
@ -142,7 +142,7 @@ There are different actions avilable in GitLab to help triage and respond to ale
### Update an alert's status
The Alert detail view enables you to update the Alert Status.
See [Create and manage alerts in GitLab](./alerts.md) for more details.
See [Create and manage alerts in GitLab](alerts.md) for more details.
### Create an incident from an alert
@ -168,11 +168,11 @@ To assign an alert:
1. To display the list of current alerts, navigate to **Operations > Alerts**:
![Alert List View Assignee(s)](./img/alert_list_assignees_v13_1.png)
![Alert List View Assignee(s)](img/alert_list_assignees_v13_1.png)
1. Select your desired alert to display its **Alert Details View**:
![Alert Details View Assignee(s)](./img/alert_details_assignees_v13_1.png)
![Alert Details View Assignee(s)](img/alert_details_assignees_v13_1.png)
1. If the right sidebar is not expanded, select
**{angle-double-right}** **Expand sidebar** to expand it.
@ -180,7 +180,7 @@ To assign an alert:
From the dropdown menu, select each user you want to assign to the alert.
GitLab creates a [to-do item](../../user/todos.md) for each user.
![Alert Details View Assignee(s)](./img/alert_todo_assignees_v13_1.png)
![Alert Details View Assignee(s)](img/alert_todo_assignees_v13_1.png)
After completing their portion of investigating or fixing the alert, users can
unassign themselves from the alert. To remove an assignee, select **Edit** next to the **Assignee** dropdown menu
@ -198,11 +198,11 @@ add a to-do item:
1. Select your desired alert to display its **Alert Management Details View**.
1. Select the **Add a To-Do** button in the right sidebar:
![Alert Details Add a To-Do](./img/alert_detail_add_todo_v13_1.png)
![Alert Details Add a To-Do](img/alert_detail_add_todo_v13_1.png)
Select the **To-Do List** **{todo-done}** in the navigation bar to view your current to-do list.
![Alert Details Added to do](./img/alert_detail_added_todo_v13_1.png)
![Alert Details Added to do](img/alert_detail_added_todo_v13_1.png)
## Link runbooks to alerts
@ -219,8 +219,7 @@ the correct runbook:
## View the environment that generated the alert
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232492) in GitLab 13.5
behind a feature flag, disabled by default.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232492) in GitLab 13.5 behind a feature flag, disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/232492) in GitLab 13.6.
CAUTION: **Warning:**

View File

@ -27,7 +27,7 @@ Incident, you have two options to do this manually.
- Create a new issue using the `incident` template available when creating it.
- Create a new issue and assign the `incident` label to it.
![Incident List Create](./img/incident_list_create_v13_3.png)
![Incident List Create](img/incident_list_create_v13_3.png)
**From the Issues List:**
@ -37,7 +37,7 @@ Incident, you have two options to do this manually.
- Create a new issue using the `type` drop-down and select `Incident`.
- The page refreshes and the page only displays fields relevant to Incidents.
![Incident List Create](./img/new_incident_create_v13_4.png)
![Incident List Create](img/new_incident_create_v13_4.png)
### Create incidents automatically
@ -48,7 +48,7 @@ With Maintainer or higher [permissions](../../user/permissions.md), you can enab
1. Navigate to **Settings > Operations > Incidents** and expand **Incidents**:
![Incident Management Settings](./img/incident_management_settings_v13_3.png)
![Incident Management Settings](img/incident_management_settings_v13_3.png)
1. Check the **Create an incident** checkbox.
1. To customize the incident, select an
@ -71,7 +71,7 @@ in both PagerDuty and GitLab:
1. Navigate to **Settings > Operations > Incidents** and expand **Incidents**.
1. Select the **PagerDuty integration** tab:
![PagerDuty incidents integration](./img/pagerduty_incidents_integration_v13_3.png)
![PagerDuty incidents integration](img/pagerduty_incidents_integration_v13_3.png)
1. Activate the integration, and save the changes in GitLab.
1. Copy the value of **Webhook URL** for use in a later step.
@ -170,7 +170,7 @@ tab, the incident must have been created with a linked alert. Incidents
created automatically from alerts have this
field populated.
![Incident alert details](./img/incident_alert_details_v13_4.png)
![Incident alert details](img/incident_alert_details_v13_4.png)
### Timeline view
@ -180,7 +180,7 @@ To quickly see the latest updates on an incident, click
**{comments}** **Turn timeline view on** in the comment bar to display comments
un-threaded and ordered chronologically, newest to oldest:
![Timeline view toggle](./img/timeline_view_toggle_v13_5.png)
![Timeline view toggle](img/timeline_view_toggle_v13_5.png)
### Service Level Agreement countdown timer

View File

@ -12,11 +12,11 @@ With a GitLab Status Page, you can create and deploy a static website to communi
efficiently to users during an incident. The Status Page landing page displays an
overview of recent incidents:
![Status Page landing page](./img/status_page_incidents_v12_10.png)
![Status Page landing page](img/status_page_incidents_v12_10.png)
Clicking an incident displays a detail page with more information about a particular incident:
![Status Page detail](./img/status_page_detail_v12_10.png)
![Status Page detail](img/status_page_detail_v12_10.png)
- Status on the incident, including when the incident was last updated.
- The incident title, including any emojis.
@ -138,7 +138,7 @@ you provided during setup. As part of publication, GitLab will:
After publication, you can access the incident's details page by clicking the
**Published on status page** button displayed under the Incident's title.
![Status Page detail link](./img/status_page_detail_link_v13_1.png)
![Status Page detail link](img/status_page_detail_link_v13_1.png)
### Update an incident

View File

@ -107,7 +107,7 @@ the scenes. Make sure to switch the toggle to the enabled position before instal
Both logging and blocking modes are available for WAF. While logging mode is useful for
auditing anomalous traffic, blocking mode ensures the traffic doesn't reach past Ingress.
![Cluster applications](./img/guide_waf_ingress_installation_v12_10.png)
![Cluster applications](img/guide_waf_ingress_installation_v12_10.png)
After Ingress is installed, wait a few seconds and copy the IP address that
is displayed in order to add in your base **Domain** at the top of the page. For

View File

@ -162,7 +162,7 @@ page:
1. Enter the custom SAST values.
Custom values are stored in the `.gitlab-ci.yml` file. For variables not in the SAST Configuration page, their values are left unchanged. Default values are inherited from the GitLab SAST template.
1. Optionally, expand the **SAST analyzers** section, select individual [SAST analyzers](./analyzers.md) and enter custom analyzer values.
1. Optionally, expand the **SAST analyzers** section, select individual [SAST analyzers](analyzers.md) and enter custom analyzer values.
1. Click **Create Merge Request**.
1. Review and merge the merge request.

View File

@ -226,7 +226,7 @@ The **Identity** (`extern_uid`) value stored by GitLab is updated by SCIM whenev
This value is also used by SCIM to match users on the `id`, and is updated by SCIM whenever the `id` or `externalId` values change.
It is important that this SCIM `id` and SCIM `externalId` are configured to the same value as the SAML `NameId`. SAML responses can be traced using [debugging tools](./index.md#saml-debugging-tools), and any errors can be checked against our [SAML troubleshooting docs](./index.md#troubleshooting).
It is important that this SCIM `id` and SCIM `externalId` are configured to the same value as the SAML `NameId`. SAML responses can be traced using [debugging tools](index.md#saml-debugging-tools), and any errors can be checked against our [SAML troubleshooting docs](index.md#troubleshooting).
### How do I verify user's SAML NameId matches the SCIM externalId
@ -249,7 +249,7 @@ that provider may create duplicate users.
If the `externalId` for a user is not correct, and also doesn't match the SAML NameID,
you can address the problem in the following ways:
- You can have users unlink and relink themselves, based on the ["SAML authentication failed: User has already been taken"](./index.md#message-saml-authentication-failed-user-has-already-been-taken) section.
- You can have users unlink and relink themselves, based on the ["SAML authentication failed: User has already been taken"](index.md#message-saml-authentication-failed-user-has-already-been-taken) section.
- You can unlink all users simultaneously, by removing all users from the SAML app while provisioning is turned on.
- It may be possible to use the [SCIM API](../../../api/scim.md#update-a-single-saml-user) to manually correct the `externalId` stored for users to match the SAML `NameId`.
To look up a user, you'll need to know the desired value that matches the `NameId` as well as the current `externalId`.
@ -258,7 +258,7 @@ It is important not to update these to incorrect values, since this will cause u
### I need to change my SCIM app
Individual users can follow the instructions in the ["SAML authentication failed: User has already been taken"](./index.md#i-need-to-change-my-saml-app) section.
Individual users can follow the instructions in the ["SAML authentication failed: User has already been taken"](index.md#i-need-to-change-my-saml-app) section.
Alternatively, users can be removed from the SCIM app which will delink all removed users. Sync can then be turned on for the new SCIM app to [link existing users](#user-access-and-linking-setup).

View File

@ -532,7 +532,7 @@ If this snippet was placed on a page at `<your_wiki>/documentation/main`,
it would link to `<your_wiki>/documentation/related`:
```markdown
[Link to Related Page](./related)
[Link to Related Page](related)
```
If this snippet was placed on a page at `<your_wiki>/documentation/related/content`,
@ -546,7 +546,7 @@ If this snippet was placed on a page at `<your_wiki>/documentation/main`,
it would link to `<your_wiki>/documentation/related.md`:
```markdown
[Link to Related Page](./related.md)
[Link to Related Page](related.md)
```
If this snippet was placed on a page at `<your_wiki>/documentation/related/content`,

View File

@ -77,7 +77,7 @@ Prerequisites:
- A [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `api`.
NOTE: **Note:**
[Deploy tokens](./../../project/deploy_tokens/index.md) are
[Deploy tokens](../../project/deploy_tokens/index.md) are
[not yet supported](https://gitlab.com/gitlab-org/gitlab/-/issues/240897) for use with Composer.
To publish the package:
@ -140,7 +140,7 @@ Prerequisites:
- A [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to, at minimum, `read_api`.
NOTE: **Note:**
[Deploy tokens](./../../project/deploy_tokens/index.md) are
[Deploy tokens](../../project/deploy_tokens/index.md) are
[not yet supported](https://gitlab.com/gitlab-org/gitlab/-/issues/240897) for use with Composer.
To install a package:

View File

@ -163,7 +163,7 @@ Example recipe names:
To authenticate to the Package Registry, you need either a personal access token or deploy token.
- If you use a [personal access token](../../../user/profile/personal_access_tokens.md), set the scope to `api`.
- If you use a [deploy token](./../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
- If you use a [deploy token](../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
### Add your credentials to the GitLab remote
@ -237,7 +237,7 @@ conan upload Hello/0.1@mycompany/beta --all
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/11678) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.7.
To work with Conan commands in [GitLab CI/CD](./../../../ci/README.md), you can use
To work with Conan commands in [GitLab CI/CD](../../../ci/README.md), you can use
`CI_JOB_TOKEN` in place of the personal access token in your commands.
You can provide the `CONAN_LOGIN_USERNAME` and `CONAN_PASSWORD` with each

View File

@ -468,7 +468,7 @@ Cleanup policies can be run on all projects, with these exceptions:
```
There are performance risks with enabling it for all projects, especially if you
are using an [external registry](./index.md#use-with-external-container-registries).
are using an [external registry](index.md#use-with-external-container-registries).
- For self-managed GitLab instances, you can enable or disable the cleanup policy for a specific
project.
@ -580,7 +580,7 @@ See the API documentation for further details: [Edit project](../../../api/proje
### Use with external container registries
When using an [external container registry](./../../../administration/packages/container_registry.md#use-an-external-container-registry-with-gitlab-as-an-auth-endpoint),
When using an [external container registry](../../../administration/packages/container_registry.md#use-an-external-container-registry-with-gitlab-as-an-auth-endpoint),
running a cleanup policy on a project may have some performance risks.
If a project runs a policy to remove thousands of tags
the GitLab background jobs may get backed up or fail completely.

View File

@ -90,7 +90,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" \
## Publish a generic package by using CI/CD
To work with generic packages in [GitLab CI/CD](./../../../ci/README.md), you can use
To work with generic packages in [GitLab CI/CD](../../../ci/README.md), you can use
`CI_JOB_TOKEN` in place of the personal access token in your commands.
For example:

View File

@ -189,7 +189,7 @@ published to the GitLab Package Registry.
To authenticate to the Package Registry, you need either a personal access token or deploy token.
- If you use a [personal access token](../../../user/profile/personal_access_tokens.md), set the scope to `api`.
- If you use a [deploy token](./../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
- If you use a [deploy token](../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
### Authenticate with a personal access token in Maven
@ -276,7 +276,7 @@ Read more about [how to create Maven packages using GitLab CI/CD](#create-maven-
To authenticate to the Package Registry, you need either a personal access token or deploy token.
- If you use a [personal access token](../../../user/profile/personal_access_tokens.md), set the scope to `api`.
- If you use a [deploy token](./../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
- If you use a [deploy token](../../project/deploy_tokens/index.md), set the scope to `read_package_registry`, `write_package_registry`, or both.
### Authenticate with a personal access token in Gradle

View File

@ -87,7 +87,7 @@ To authenticate to the Package Registry, you must use one of the following:
- A [personal access token](../../../user/profile/personal_access_tokens.md)
(required for two-factor authentication (2FA)), with the scope set to `api`.
- A [deploy token](./../../project/deploy_tokens/index.md), with the scope set to `read_package_registry`, `write_package_registry`, or both.
- A [deploy token](../../project/deploy_tokens/index.md), with the scope set to `read_package_registry`, `write_package_registry`, or both.
- It's not recommended, but you can use [OAuth tokens](../../../api/oauth2.md#resource-owner-password-credentials-flow).
Standard OAuth tokens cannot authenticate to the GitLab NPM Registry. You must use a personal access token with OAuth headers.
- A [CI job token](#authenticate-with-a-ci-job-token).
@ -227,7 +227,7 @@ a given scope, you get a `403 Forbidden!` error.
## Publish an NPM package by using CI/CD
To work with NPM commands within [GitLab CI/CD](./../../../ci/README.md), you can use
To work with NPM commands within [GitLab CI/CD](../../../ci/README.md), you can use
`CI_JOB_TOKEN` in place of the personal access token or deploy token in your commands.
An example `.gitlab-ci.yml` file for publishing NPM packages:
@ -406,7 +406,7 @@ And the `.npmrc` file should look like:
### `npm install` returns `Error: Failed to replace env in config: ${NPM_TOKEN}`
You do not need a token to run `npm install` unless your project is private. The token is only required to publish. If the `.npmrc` file was checked in with a reference to `$NPM_TOKEN`, you can remove it. If you prefer to leave the reference in, you must set a value prior to running `npm install` or set the value by using [GitLab environment variables](./../../../ci/variables/README.md):
You do not need a token to run `npm install` unless your project is private. The token is only required to publish. If the `.npmrc` file was checked in with a reference to `$NPM_TOKEN`, you can remove it. If you prefer to leave the reference in, you must set a value prior to running `npm install` or set the value by using [GitLab environment variables](../../../ci/variables/README.md):
```shell
NPM_TOKEN=<your_token> npm install

View File

@ -71,7 +71,7 @@ Prerequisites:
- A personal access token or deploy token. For repository authentication:
- You can generate a [personal access token](../../../user/profile/personal_access_tokens.md)
with the scope set to `api`.
- You can generate a [deploy token](./../../project/deploy_tokens/index.md)
- You can generate a [deploy token](../../project/deploy_tokens/index.md)
with the scope set to `read_package_registry`, `write_package_registry`, or
both.
- A name for your source.

View File

@ -68,7 +68,7 @@ package is to be uploaded to. If you set this to any project that you have
access to and update any other configuration similarly depending on the package type,
your packages are published to that project. This means you can publish
multiple packages to one project, even if their code does not exist in the same
place. See the [project registry workflow documentation](./project_registry.md)
place. See the [project registry workflow documentation](project_registry.md)
for more details.
## CI workflows for automating packaging

View File

@ -163,7 +163,7 @@ The following table depicts the various user permission levels in a project.
| Delete wiki pages | | | | ✓ | ✓ |
| View project Audit Events | | | | ✓ | ✓ |
| Manage [push rules](../push_rules/push_rules.md) | | | | ✓ | ✓ |
| Manage [project access tokens](./project/settings/project_access_tokens.md) **(CORE ONLY)** | | | | ✓ | ✓ |
| Manage [project access tokens](project/settings/project_access_tokens.md) **(CORE ONLY)** | | | | ✓ | ✓ |
| Switch visibility level | | | | | ✓ |
| Transfer project to another namespace | | | | | ✓ |
| Rename project | | | | | ✓ |
@ -180,11 +180,11 @@ The following table depicts the various user permission levels in a project.
1. Guest users are able to perform this action on public and internal projects, but not private projects. This doesn't apply to [external users](#external-users) where explicit access must be given even if the project is internal.
1. Guest users can only view the confidential issues they created themselves.
1. If **Public pipelines** is enabled in **Project Settings > CI/CD**.
1. Not allowed for Guest, Reporter, Developer, Maintainer, or Owner. See [Protected Branches](./project/protected_branches.md).
1. If the [branch is protected](./project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings), this depends on the access Developers and Maintainers are given.
1. Not allowed for Guest, Reporter, Developer, Maintainer, or Owner. See [Protected Branches](project/protected_branches.md).
1. If the [branch is protected](project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings), this depends on the access Developers and Maintainers are given.
1. Guest users can access GitLab [**Releases**](project/releases/index.md) for downloading assets but are not allowed to download the source code nor see repository information like tags and commits.
1. Actions are limited only to records owned (referenced) by user.
1. When [Share Group Lock](./group/index.md#share-with-group-lock) is enabled the project can't be shared with other groups. It does not affect group with group sharing.
1. When [Share Group Lock](group/index.md#share-with-group-lock) is enabled the project can't be shared with other groups. It does not affect group with group sharing.
1. For information on eligible approvers for merge requests, see
[Eligible approvers](project/merge_requests/merge_request_approvals.md#eligible-approvers).
1. Owner permission is only available at the group or personal namespace level (and for instance admins) and is inherited by its projects.

View File

@ -86,7 +86,7 @@ From there, you can:
If you don't know your current password, select the 'I forgot my password' link.
![Change your password](./img/change_password_v13_0.png)
![Change your password](img/change_password_v13_0.png)
## Changing your username

View File

@ -30,4 +30,4 @@ for a notification email to be sent.
## Example email
![Unknown sign in email](./img/unknown_sign_in_email_v13_1.png)
![Unknown sign in email](img/unknown_sign_in_email_v13_1.png)

View File

@ -35,7 +35,9 @@ code_navigation:
lsif: dump.lsif
```
The generated LSIF file must be less than 170MiB.
The generated LSIF file size may be limited by
the [artifact application limits (`ci_max_artifact_size_lsif`)](../../administration/instance_limits.md#maximum-file-size-per-type-of-artifact),
default to 100MB (configurable by an instance administrator).
After the job succeeds, code intelligence data can be viewed while browsing the code:

View File

@ -121,7 +121,7 @@ To pull packages in the GitLab package registry, you'll need to:
1. Create a Deploy Token with `read_package_registry` as a scope.
1. Take note of your `username` and `token`.
1. For the [package type of your choice](./../../packages/index.md), follow the authentication instructions for deploy tokens.
1. For the [package type of your choice](../../packages/index.md), follow the authentication instructions for deploy tokens.
### Push or upload packages
@ -131,7 +131,7 @@ To upload packages in the GitLab package registry, you'll need to:
1. Create a Deploy Token with `write_package_registry` as a scope.
1. Take note of your `username` and `token`.
1. For the [package type of your choice](./../../packages/index.md), follow the authentication instructions for deploy tokens.
1. For the [package type of your choice](../../packages/index.md), follow the authentication instructions for deploy tokens.
### Group Deploy Token

View File

@ -62,7 +62,7 @@ To create the `.gitlab/issue_templates` directory:
1. Click the `+` button next to `master` again and select **New directory**.This time, n
1. Name your directory `issue_templates` and commit to your default branch.
To check if this has worked correctly, [create a new issue](./issues/managing_issues.md#create-a-new-issue)
To check if this has worked correctly, [create a new issue](issues/managing_issues.md#create-a-new-issue)
and see if you can choose a description template.
## Creating merge request templates

View File

@ -2,4 +2,4 @@
redirect_to: './burndown_and_burnup_charts.md'
---
This document was moved to [another location](./burndown_and_burnup_charts.md).
This document was moved to [another location](burndown_and_burnup_charts.md).

View File

@ -22,8 +22,8 @@ GitLab.
## Jupyter Hub as a GitLab Managed App
You can deploy [Jupyter Hub as a GitLab managed app](./../../../clusters/applications.md#jupyterhub).
You can deploy [Jupyter Hub as a GitLab managed app](../../../clusters/applications.md#jupyterhub).
## Jupyter Git integration
Find out how to [leverage JupyterLabs Git extension on your Kubernetes cluster](./../../../clusters/applications.md#jupyter-git-integration).
Find out how to [leverage JupyterLabs Git extension on your Kubernetes cluster](../../../clusters/applications.md#jupyter-git-integration).

View File

@ -4,13 +4,28 @@ module API
module Entities
class CommitSignature < Grape::Entity
expose :signature_type
expose :signature, merge: true do |commit, options|
if commit.signature.is_a?(GpgSignature)
::API::Entities::GpgCommitSignature.represent commit.signature, options
if commit.signature.is_a?(GpgSignature) || commit.raw_commit_from_rugged?
::API::Entities::GpgCommitSignature.represent commit_signature(commit), options
elsif commit.signature.is_a?(X509CommitSignature)
::API::Entities::X509Signature.represent commit.signature, options
end
end
expose :commit_source do |commit, _|
commit.raw_commit_from_rugged? ? "rugged" : "gitaly"
end
private
def commit_signature(commit)
if commit.raw_commit_from_rugged?
commit.gpg_commit.signature
else
commit.signature
end
end
end
end
end

View File

@ -33,7 +33,8 @@ module Gitlab
group_import: { threshold: -> { application_settings.group_import_limit }, interval: 1.minute },
group_testing_hook: { threshold: 5, interval: 1.minute },
profile_add_new_email: { threshold: 5, interval: 1.minute },
profile_resend_email_confirmation: { threshold: 5, interval: 1.minute }
profile_resend_email_confirmation: { threshold: 5, interval: 1.minute },
update_environment_canary_ingress: { threshold: 1, interval: 1.minute }
}.freeze
end

View File

@ -26,8 +26,8 @@ module Gitlab
GitalyClient.call(@storage, :repository_service, :cleanup, request, timeout: GitalyClient.fast_timeout)
end
def garbage_collect(create_bitmap)
request = Gitaly::GarbageCollectRequest.new(repository: @gitaly_repo, create_bitmap: create_bitmap)
def garbage_collect(create_bitmap, prune:)
request = Gitaly::GarbageCollectRequest.new(repository: @gitaly_repo, create_bitmap: create_bitmap, prune: prune)
GitalyClient.call(@storage, :repository_service, :garbage_collect, request, timeout: GitalyClient.long_timeout)
end

View File

@ -175,6 +175,16 @@ module Gitlab
end
end
def patch_ingress(*args)
extensions_client.discover unless extensions_client.discovered
if extensions_client.respond_to?(:patch_ingress)
extensions_client.patch_ingress(*args)
else
networking_client.patch_ingress(*args)
end
end
def create_or_update_cluster_role_binding(resource)
update_cluster_role_binding(resource)
end

View File

@ -4814,6 +4814,12 @@ msgstr ""
msgid "Canary Deployments is a popular CI strategy, where a small portion of the fleet is updated to the new version of your application."
msgstr ""
msgid "Canary Ingress does not exist in the environment."
msgstr ""
msgid "Canary weight must be specified and valid range (0..100)."
msgstr ""
msgid "Cancel"
msgstr ""
@ -11380,6 +11386,9 @@ msgstr ""
msgid "Failed to update tag!"
msgstr ""
msgid "Failed to update the Canary Ingress."
msgstr ""
msgid "Failed to update."
msgstr ""
@ -11419,6 +11428,9 @@ msgstr ""
msgid "Feature Flags"
msgstr ""
msgid "Feature flag is not enabled on the environment's project."
msgstr ""
msgid "Feature flag was not removed."
msgstr ""
@ -26766,6 +26778,9 @@ msgstr ""
msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
msgstr ""
msgid "The license for Deploy Board is required to use this feature."
msgstr ""
msgid "The license key is invalid. Make sure it is exactly as you received it from GitLab Inc."
msgstr ""
@ -27048,6 +27063,9 @@ msgstr ""
msgid "There are no variables yet."
msgstr ""
msgid "There are running deployments on the environment. Please retry later."
msgstr ""
msgid "There is a limit of %{ci_project_subscriptions_limit} subscriptions from or to a project."
msgstr ""
@ -27420,6 +27438,9 @@ msgstr ""
msgid "This environment is being re-deployed"
msgstr ""
msgid "This environment's canary ingress has been updated recently. Please retry later."
msgstr ""
msgid "This epic already has the maximum number of child epics."
msgstr ""
@ -30790,6 +30811,9 @@ msgstr ""
msgid "You do not have permission to run the Web Terminal. Please contact a project administrator."
msgstr ""
msgid "You do not have permission to update the environment."
msgstr ""
msgid "You do not have permissions to run the import."
msgstr ""

View File

@ -18,6 +18,11 @@ ALLOWED = [
# Needed to detect Rugged enabled: https://gitlab.com/gitlab-org/gitlab/issues/35371
'lib/gitlab/config_checker/puma_rugged_checker.rb',
# Needed for GPG/X509 commit signature API
#
'app/models/commit.rb',
'lib/api/entities/commit_signature.rb',
# Needed for logging
'config/initializers/peek.rb',
'config/initializers/lograge.rb',

View File

@ -16,6 +16,7 @@
],
"properties": {
"id": { "type": "integer" },
"global_id": { "type": "string" },
"name": { "type": "string" },
"state": { "type": "string" },
"external_url": { "$ref": "types/nullable_string.json" },

View File

@ -16,7 +16,7 @@ RSpec.describe GitlabSchema.types['Issue'] do
it 'has specific fields' do
fields = %i[id iid title description state reference author assignees updated_by participants labels milestone due_date
confidential discussion_locked upvotes downvotes user_notes_count user_discussions_count web_path web_url relative_position
subscribed time_estimate total_time_spent human_time_estimate human_total_time_spent closed_at created_at updated_at task_completion_status
emails_disabled subscribed time_estimate total_time_spent human_time_estimate human_total_time_spent closed_at created_at updated_at task_completion_status
designs design_collection alert_management_alert severity current_user_todos]
fields.each do |field_name|

View File

@ -38,7 +38,7 @@ RSpec.describe Gitlab::GitalyClient::RepositoryService do
.with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash))
.and_return(double(:garbage_collect_response))
client.garbage_collect(true)
client.garbage_collect(true, prune: true)
end
end

View File

@ -19,7 +19,7 @@ RSpec.describe Gitlab::Kubernetes::KubeClient do
case method_name
when /\A(get_|delete_)/
client.public_send(method_name)
when /\A(create_|update_)/
when /\A(create_|update_|patch_)/
client.public_send(method_name, {})
else
raise "Unknown method name #{method_name}"
@ -377,6 +377,34 @@ RSpec.describe Gitlab::Kubernetes::KubeClient do
end
end
describe '#patch_ingress' do
let(:extensions_client) { client.extensions_client }
let(:networking_client) { client.networking_client }
include_examples 'redirection not allowed', 'patch_ingress'
include_examples 'dns rebinding not allowed', 'patch_ingress'
it 'delegates to the extensions client' do
expect(extensions_client).to receive(:patch_ingress)
client.patch_ingress
end
context 'extensions does not have ingress for Kubernetes 1.22+ clusters' do
before do
WebMock
.stub_request(:get, api_url + '/apis/extensions/v1beta1')
.to_return(kube_response(kube_1_22_extensions_v1beta1_discovery_body))
end
it 'delegates to the apps client' do
expect(networking_client).to receive(:patch_ingress)
client.patch_ingress
end
end
end
describe 'istio API group' do
let(:istio_client) { client.istio_client }

View File

@ -982,6 +982,22 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do
end
end
describe '#has_running_deployments?' do
subject { environment.has_running_deployments? }
it 'return false when no deployments exist' do
is_expected.to eq(false)
end
context 'when deployment is running on the environment' do
let!(:deployment) { create(:deployment, :running, environment: environment) }
it 'return true' do
is_expected.to eq(true)
end
end
end
describe '#metrics' do
let(:project) { create(:prometheus_project) }

View File

@ -40,4 +40,20 @@ RSpec.describe IssuePresenter do
expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/-/issues/#{issue.iid}")
end
end
describe '#project_emails_disabled?' do
subject { presenter.project_emails_disabled? }
it 'returns false when emails notifications is enabled for project' do
is_expected.to be(false)
end
context 'when emails notifications is disabled for project' do
before do
allow(project).to receive(:emails_disabled?).and_return(true)
end
it { is_expected.to be(true) }
end
end
end

View File

@ -1991,6 +1991,17 @@ RSpec.describe API::Commits do
expect(json_response['x509_certificate']['x509_issuer']['subject']).to eq(commit.signature.x509_certificate.x509_issuer.subject)
expect(json_response['x509_certificate']['x509_issuer']['subject_key_identifier']).to eq(commit.signature.x509_certificate.x509_issuer.subject_key_identifier)
expect(json_response['x509_certificate']['x509_issuer']['crl_url']).to eq(commit.signature.x509_certificate.x509_issuer.crl_url)
expect(json_response['commit_source']).to eq('gitaly')
end
context 'with Rugged enabled', :enable_rugged do
it 'returns correct JSON' do
get api(route, current_user)
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['signature_type']).to eq('PGP')
expect(json_response['commit_source']).to eq('rugged')
end
end
end
end

View File

@ -25,7 +25,7 @@ RSpec.describe EnvironmentEntity do
end
it 'exposes core elements of environment' do
expect(subject).to include(:id, :name, :state, :environment_path)
expect(subject).to include(:id, :global_id, :name, :state, :environment_path)
end
it 'exposes folder path' do

View File

@ -89,7 +89,7 @@ RSpec.describe Projects::CleanupService do
it 'runs garbage collection on the repository' do
expect_next_instance_of(GitGarbageCollectWorker) do |worker|
expect(worker).to receive(:perform).with(project.id, :gc, "project_cleanup:gc:#{project.id}")
expect(worker).to receive(:perform).with(project.id, :prune, "project_cleanup:gc:#{project.id}")
end
service.execute

View File

@ -33,8 +33,8 @@ module KubernetesHelpers
kube_response(kube_deployments_body)
end
def kube_ingresses_response
kube_response(kube_ingresses_body)
def kube_ingresses_response(with_canary: false)
kube_response(kube_ingresses_body(with_canary: with_canary))
end
def stub_kubeclient_discover_base(api_url)
@ -155,12 +155,12 @@ module KubernetesHelpers
WebMock.stub_request(:get, deployments_url).to_return(response || kube_deployments_response)
end
def stub_kubeclient_ingresses(namespace, status: nil)
def stub_kubeclient_ingresses(namespace, status: nil, method: :get, resource_path: "", response: kube_ingresses_response)
stub_kubeclient_discover(service.api_url)
ingresses_url = service.api_url + "/apis/extensions/v1beta1/namespaces/#{namespace}/ingresses"
ingresses_url = service.api_url + "/apis/extensions/v1beta1/namespaces/#{namespace}/ingresses#{resource_path}"
response = { status: status } if status
WebMock.stub_request(:get, ingresses_url).to_return(response || kube_ingresses_response)
WebMock.stub_request(method, ingresses_url).to_return(response)
end
def stub_kubeclient_knative_services(options = {})
@ -546,10 +546,12 @@ module KubernetesHelpers
}
end
def kube_ingresses_body
def kube_ingresses_body(with_canary: false)
items = with_canary ? [kube_ingress, kube_ingress(track: :canary)] : [kube_ingress]
{
"kind" => "List",
"items" => [kube_ingress]
"items" => items
}
end

View File

@ -272,6 +272,11 @@ RSpec.describe GitGarbageCollectWorker do
expect(before_packs.count).to be >= 1
expect_any_instance_of(Gitlab::GitalyClient::RepositoryService)
.to receive(:garbage_collect)
.with(bitmaps_enabled, prune: false)
.and_call_original
subject.perform(project.id, 'gc', lease_key, lease_uuid)
after_packed_refs = packed_refs(project)
after_packs = packs(project)
@ -292,6 +297,15 @@ RSpec.describe GitGarbageCollectWorker do
subject.perform(project.id, 'gc', lease_key, lease_uuid)
end
it 'prune calls garbage_collect with the option prune: true' do
expect_any_instance_of(Gitlab::GitalyClient::RepositoryService)
.to receive(:garbage_collect)
.with(bitmaps_enabled, prune: true)
.and_return(nil)
subject.perform(project.id, 'prune', lease_key, lease_uuid)
end
end
context 'with bitmaps enabled' do