Commit 6287caa6 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 1926d423
...@@ -6,14 +6,24 @@ module Types ...@@ -6,14 +6,24 @@ module Types
class DetailedStatusType < BaseObject class DetailedStatusType < BaseObject
graphql_name 'DetailedStatus' graphql_name 'DetailedStatus'
field :group, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions field :group, GraphQL::STRING_TYPE, null: false,
field :icon, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions description: 'Group of the pipeline status'
field :favicon, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions field :icon, GraphQL::STRING_TYPE, null: false,
field :details_path, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions description: 'Icon of the pipeline status'
field :has_details, GraphQL::BOOLEAN_TYPE, null: false, method: :has_details? # rubocop:disable Graphql/Descriptions field :favicon, GraphQL::STRING_TYPE, null: false,
field :label, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions description: 'Favicon of the pipeline status'
field :text, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions field :details_path, GraphQL::STRING_TYPE, null: false,
field :tooltip, GraphQL::STRING_TYPE, null: false, method: :status_tooltip # rubocop:disable Graphql/Descriptions description: 'Path of the details for the pipeline status'
field :has_details, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates if the pipeline status has further details',
method: :has_details?
field :label, GraphQL::STRING_TYPE, null: false,
description: 'Label of the pipeline status'
field :text, GraphQL::STRING_TYPE, null: false,
description: 'Text of the pipeline status'
field :tooltip, GraphQL::STRING_TYPE, null: false,
description: 'Tooltip associated with the pipeline status',
method: :status_tooltip
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -9,29 +9,34 @@ module Types ...@@ -9,29 +9,34 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions field :id, GraphQL::ID_TYPE, null: false,
field :iid, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions description: 'ID of the pipeline'
field :iid, GraphQL::STRING_TYPE, null: false,
description: 'Internal ID of the pipeline'
field :sha, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions field :sha, GraphQL::STRING_TYPE, null: false,
field :before_sha, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions description: "SHA of the pipeline's commit"
field :status, PipelineStatusEnum, null: false # rubocop:disable Graphql/Descriptions field :before_sha, GraphQL::STRING_TYPE, null: true,
field :detailed_status, # rubocop:disable Graphql/Descriptions description: "Base SHA of the source branch"
Types::Ci::DetailedStatusType, field :status, PipelineStatusEnum, null: false,
null: false, description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
description: 'Detailed status of the pipeline',
resolve: -> (obj, _args, ctx) { obj.detailed_status(ctx[:current_user]) } resolve: -> (obj, _args, ctx) { obj.detailed_status(ctx[:current_user]) }
field :duration, field :duration, GraphQL::INT_TYPE, null: true,
GraphQL::INT_TYPE,
null: true,
description: "Duration of the pipeline in seconds" description: "Duration of the pipeline in seconds"
field :coverage, field :coverage, GraphQL::FLOAT_TYPE, null: true,
GraphQL::FLOAT_TYPE,
null: true,
description: "Coverage percentage" description: "Coverage percentage"
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions field :created_at, Types::TimeType, null: false,
field :updated_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions description: "Timestamp of the pipeline's creation"
field :started_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions field :updated_at, Types::TimeType, null: false,
field :finished_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions description: "Timestamp of the pipeline's last activity"
field :committed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions field :started_at, Types::TimeType, null: true,
description: 'Timestamp when the pipeline was started'
field :finished_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's completion"
field :committed_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's commit"
# TODO: Add triggering user as a type # TODO: Add triggering user as a type
end end
......
...@@ -5,14 +5,13 @@ ...@@ -5,14 +5,13 @@
## Automatic housekeeping ## Automatic housekeeping
GitLab automatically runs `git gc` and `git repack` on repositories GitLab automatically runs `git gc` and `git repack` on repositories
after Git pushes. If needed you can change how often this happens, or after Git pushes. You can change how often this happens or turn it off in
to turn it off, go to **Admin area > Settings** **Admin area > Settings > Repository** (`/admin/application_settings/repository`).
(`/admin/application_settings`).
## Manual housekeeping ## Manual housekeeping
The housekeeping function will run a `repack` or `gc` depending on the The housekeeping function runs `repack` or `gc` depending on the
"Automatic Git repository housekeeping" settings configured in **Admin area > Settings** **Housekeeping** settings configured in **Admin area > Settings > Repository**.
For example in the following scenario a `git repack -d` will be executed: For example in the following scenario a `git repack -d` will be executed:
......
...@@ -5,8 +5,8 @@ InfluxDB support is scheduled to be removed in GitLab 13.0. ...@@ -5,8 +5,8 @@ InfluxDB support is scheduled to be removed in GitLab 13.0.
You are advised to use [Prometheus](../prometheus/index.md) instead. You are advised to use [Prometheus](../prometheus/index.md) instead.
GitLab Performance Monitoring is disabled by default. To enable it and change any of its GitLab Performance Monitoring is disabled by default. To enable it and change any of its
settings, navigate to the Admin area in **Settings > Metrics** settings, navigate to **Admin Area > Settings > Metrics and profiling**
(`/admin/application_settings`). (`/admin/application_settings/metrics_and_profiling`).
The minimum required settings you need to set are the InfluxDB host and port. The minimum required settings you need to set are the InfluxDB host and port.
Make sure _Enable InfluxDB Metrics_ is checked and hit **Save** to save the Make sure _Enable InfluxDB Metrics_ is checked and hit **Save** to save the
......
...@@ -36,10 +36,9 @@ in `repocheck.log`: ...@@ -36,10 +36,9 @@ in `repocheck.log`:
- `/var/log/gitlab/gitlab-rails` for Omnibus installations - `/var/log/gitlab/gitlab-rails` for Omnibus installations
- `/home/git/gitlab/log` for installations from source - `/home/git/gitlab/log` for installations from source
If for some reason the periodic repository check caused a lot of false If the periodic repository check causes false alarms, you can clear all repository check states by
alarms you can choose to clear *all* repository check states by navigating to **Admin area > Settings > Repository**
clicking "Clear all repository checks" on the **Settings** page of the (`/admin/application_settings/repository`) and clicking **Clear all repository checks**.
admin panel (`/admin/application_settings`).
--- ---
[ce-3232]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/3232 "Auto git fsck" [ce-3232]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/3232 "Auto git fsck"
......
...@@ -957,13 +957,44 @@ type DestroySnippetPayload { ...@@ -957,13 +957,44 @@ type DestroySnippetPayload {
} }
type DetailedStatus { type DetailedStatus {
"""
Path of the details for the pipeline status
"""
detailsPath: String! detailsPath: String!
"""
Favicon of the pipeline status
"""
favicon: String! favicon: String!
"""
Group of the pipeline status
"""
group: String! group: String!
"""
Indicates if the pipeline status has further details
"""
hasDetails: Boolean! hasDetails: Boolean!
"""
Icon of the pipeline status
"""
icon: String! icon: String!
"""
Label of the pipeline status
"""
label: String! label: String!
"""
Text of the pipeline status
"""
text: String! text: String!
"""
Tooltip associated with the pipeline status
"""
tooltip: String! tooltip: String!
} }
...@@ -1693,7 +1724,7 @@ type EpicIssue implements Noteable { ...@@ -1693,7 +1724,7 @@ type EpicIssue implements Noteable {
designCollection: DesignCollection designCollection: DesignCollection
""" """
Deprecated. Use `design_collection`. Deprecated. Use `design_collection`
""" """
designs: DesignCollection @deprecated(reason: "use design_collection") designs: DesignCollection @deprecated(reason: "use design_collection")
...@@ -2508,7 +2539,7 @@ type Issue implements Noteable { ...@@ -2508,7 +2539,7 @@ type Issue implements Noteable {
designCollection: DesignCollection designCollection: DesignCollection
""" """
Deprecated. Use `design_collection`. Deprecated. Use `design_collection`
""" """
designs: DesignCollection @deprecated(reason: "use design_collection") designs: DesignCollection @deprecated(reason: "use design_collection")
...@@ -4312,26 +4343,69 @@ type PageInfo { ...@@ -4312,26 +4343,69 @@ type PageInfo {
} }
type Pipeline { type Pipeline {
"""
Base SHA of the source branch
"""
beforeSha: String beforeSha: String
"""
Timestamp of the pipeline's commit
"""
committedAt: Time committedAt: Time
""" """
Coverage percentage Coverage percentage
""" """
coverage: Float coverage: Float
"""
Timestamp of the pipeline's creation
"""
createdAt: Time! createdAt: Time!
"""
Detailed status of the pipeline
"""
detailedStatus: DetailedStatus! detailedStatus: DetailedStatus!
""" """
Duration of the pipeline in seconds Duration of the pipeline in seconds
""" """
duration: Int duration: Int
"""
Timestamp of the pipeline's completion
"""
finishedAt: Time finishedAt: Time
"""
ID of the pipeline
"""
id: ID! id: ID!
"""
Internal ID of the pipeline
"""
iid: String! iid: String!
"""
SHA of the pipeline's commit
"""
sha: String! sha: String!
"""
Timestamp when the pipeline was started
"""
startedAt: Time startedAt: Time
"""
Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED)
"""
status: PipelineStatusEnum! status: PipelineStatusEnum!
"""
Timestamp of the pipeline's last activity
"""
updatedAt: Time! updatedAt: Time!
""" """
......
...@@ -8148,7 +8148,7 @@ ...@@ -8148,7 +8148,7 @@
}, },
{ {
"name": "designs", "name": "designs",
"description": "Deprecated. Use `design_collection`.", "description": "Deprecated. Use `design_collection`",
"args": [ "args": [
], ],
...@@ -9578,7 +9578,7 @@ ...@@ -9578,7 +9578,7 @@
}, },
{ {
"name": "designs", "name": "designs",
"description": "Deprecated. Use `design_collection`.", "description": "Deprecated. Use `design_collection`",
"args": [ "args": [
], ],
...@@ -12029,7 +12029,7 @@ ...@@ -12029,7 +12029,7 @@
"fields": [ "fields": [
{ {
"name": "beforeSha", "name": "beforeSha",
"description": null, "description": "Base SHA of the source branch",
"args": [ "args": [
], ],
...@@ -12043,7 +12043,7 @@ ...@@ -12043,7 +12043,7 @@
}, },
{ {
"name": "committedAt", "name": "committedAt",
"description": null, "description": "Timestamp of the pipeline's commit",
"args": [ "args": [
], ],
...@@ -12071,7 +12071,7 @@ ...@@ -12071,7 +12071,7 @@
}, },
{ {
"name": "createdAt", "name": "createdAt",
"description": null, "description": "Timestamp of the pipeline's creation",
"args": [ "args": [
], ],
...@@ -12089,7 +12089,7 @@ ...@@ -12089,7 +12089,7 @@
}, },
{ {
"name": "detailedStatus", "name": "detailedStatus",
"description": null, "description": "Detailed status of the pipeline",
"args": [ "args": [
], ],
...@@ -12121,7 +12121,7 @@ ...@@ -12121,7 +12121,7 @@
}, },
{ {
"name": "finishedAt", "name": "finishedAt",
"description": null, "description": "Timestamp of the pipeline's completion",
"args": [ "args": [
], ],
...@@ -12135,7 +12135,7 @@ ...@@ -12135,7 +12135,7 @@
}, },
{ {
"name": "id", "name": "id",
"description": null, "description": "ID of the pipeline",
"args": [ "args": [
], ],
...@@ -12153,7 +12153,7 @@ ...@@ -12153,7 +12153,7 @@
}, },
{ {
"name": "iid", "name": "iid",
"description": null, "description": "Internal ID of the pipeline",
"args": [ "args": [
], ],
...@@ -12171,7 +12171,7 @@ ...@@ -12171,7 +12171,7 @@
}, },
{ {
"name": "sha", "name": "sha",
"description": null, "description": "SHA of the pipeline's commit",
"args": [ "args": [
], ],
...@@ -12189,7 +12189,7 @@ ...@@ -12189,7 +12189,7 @@
}, },
{ {
"name": "startedAt", "name": "startedAt",
"description": null, "description": "Timestamp when the pipeline was started",
"args": [ "args": [
], ],
...@@ -12203,7 +12203,7 @@ ...@@ -12203,7 +12203,7 @@
}, },
{ {
"name": "status", "name": "status",
"description": null, "description": "Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED)",
"args": [ "args": [
], ],
...@@ -12221,7 +12221,7 @@ ...@@ -12221,7 +12221,7 @@
}, },
{ {
"name": "updatedAt", "name": "updatedAt",
"description": null, "description": "Timestamp of the pipeline's last activity",
"args": [ "args": [
], ],
...@@ -12408,7 +12408,7 @@ ...@@ -12408,7 +12408,7 @@
"fields": [ "fields": [
{ {
"name": "detailsPath", "name": "detailsPath",
"description": null, "description": "Path of the details for the pipeline status",
"args": [ "args": [
], ],
...@@ -12426,7 +12426,7 @@ ...@@ -12426,7 +12426,7 @@
}, },
{ {
"name": "favicon", "name": "favicon",
"description": null, "description": "Favicon of the pipeline status",
"args": [ "args": [
], ],
...@@ -12444,7 +12444,7 @@ ...@@ -12444,7 +12444,7 @@
}, },
{ {
"name": "group", "name": "group",
"description": null, "description": "Group of the pipeline status",
"args": [ "args": [
], ],
...@@ -12462,7 +12462,7 @@ ...@@ -12462,7 +12462,7 @@
}, },
{ {
"name": "hasDetails", "name": "hasDetails",
"description": null, "description": "Indicates if the pipeline status has further details",
"args": [ "args": [
], ],
...@@ -12480,7 +12480,7 @@ ...@@ -12480,7 +12480,7 @@
}, },
{ {
"name": "icon", "name": "icon",
"description": null, "description": "Icon of the pipeline status",
"args": [ "args": [
], ],
...@@ -12498,7 +12498,7 @@ ...@@ -12498,7 +12498,7 @@
}, },
{ {
"name": "label", "name": "label",
"description": null, "description": "Label of the pipeline status",
"args": [ "args": [
], ],
...@@ -12516,7 +12516,7 @@ ...@@ -12516,7 +12516,7 @@
}, },
{ {
"name": "text", "name": "text",
"description": null, "description": "Text of the pipeline status",
"args": [ "args": [
], ],
...@@ -12534,7 +12534,7 @@ ...@@ -12534,7 +12534,7 @@
}, },
{ {
"name": "tooltip", "name": "tooltip",
"description": null, "description": "Tooltip associated with the pipeline status",
"args": [ "args": [
], ],
......
...@@ -165,14 +165,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -165,14 +165,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `group` | String! | | | `group` | String! | Group of the pipeline status |
| `icon` | String! | | | `icon` | String! | Icon of the pipeline status |
| `favicon` | String! | | | `favicon` | String! | Favicon of the pipeline status |
| `detailsPath` | String! | | | `detailsPath` | String! | Path of the details for the pipeline status |
| `hasDetails` | Boolean! | | | `hasDetails` | Boolean! | Indicates if the pipeline status has further details |
| `label` | String! | | | `label` | String! | Label of the pipeline status |
| `text` | String! | | | `text` | String! | Text of the pipeline status |
| `tooltip` | String! | | | `tooltip` | String! | Tooltip associated with the pipeline status |
### DiffPosition ### DiffPosition
...@@ -283,7 +283,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -283,7 +283,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | Epic to which this issue belongs | | `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | Weight of the issue | | `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | Deprecated. Use `design_collection`. | | `designs` | DesignCollection | Deprecated. Use `design_collection` |
| `designCollection` | DesignCollection | Collection of design images associated with this issue | | `designCollection` | DesignCollection | Collection of design images associated with this issue |
| `epicIssueId` | ID! | ID of the epic-issue relation | | `epicIssueId` | ID! | ID of the epic-issue relation |
| `relationPath` | String | URI path of the epic-issue relation | | `relationPath` | String | URI path of the epic-issue relation |
...@@ -378,7 +378,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -378,7 +378,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | Epic to which this issue belongs | | `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | Weight of the issue | | `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | Deprecated. Use `design_collection`. | | `designs` | DesignCollection | Deprecated. Use `design_collection` |
| `designCollection` | DesignCollection | Collection of design images associated with this issue | | `designCollection` | DesignCollection | Collection of design images associated with this issue |
### IssuePermissions ### IssuePermissions
...@@ -631,19 +631,19 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -631,19 +631,19 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `userPermissions` | PipelinePermissions! | Permissions for the current user on the resource | | `userPermissions` | PipelinePermissions! | Permissions for the current user on the resource |
| `id` | ID! | | | `id` | ID! | ID of the pipeline |
| `iid` | String! | | | `iid` | String! | Internal ID of the pipeline |
| `sha` | String! | | | `sha` | String! | SHA of the pipeline's commit |
| `beforeSha` | String | | | `beforeSha` | String | Base SHA of the source branch |
| `status` | PipelineStatusEnum! | | | `status` | PipelineStatusEnum! | Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED) |
| `detailedStatus` | DetailedStatus! | | | `detailedStatus` | DetailedStatus! | Detailed status of the pipeline |
| `duration` | Int | Duration of the pipeline in seconds | | `duration` | Int | Duration of the pipeline in seconds |
| `coverage` | Float | Coverage percentage | | `coverage` | Float | Coverage percentage |
| `createdAt` | Time! | | | `createdAt` | Time! | Timestamp of the pipeline's creation |
| `updatedAt` | Time! | | | `updatedAt` | Time! | Timestamp of the pipeline's last activity |
| `startedAt` | Time | | | `startedAt` | Time | Timestamp when the pipeline was started |
| `finishedAt` | Time | | | `finishedAt` | Time | Timestamp of the pipeline's completion |
| `committedAt` | Time | | | `committedAt` | Time | Timestamp of the pipeline's commit |
### PipelinePermissions ### PipelinePermissions
......
...@@ -71,6 +71,7 @@ description: 'Learn how to contribute to GitLab.' ...@@ -71,6 +71,7 @@ description: 'Learn how to contribute to GitLab.'
- [Auto DevOps development guide](auto_devops.md) - [Auto DevOps development guide](auto_devops.md)
- [Mass Inserting Models](mass_insert.md) - [Mass Inserting Models](mass_insert.md)
- [Cycle Analytics development guide](cycle_analytics.md) - [Cycle Analytics development guide](cycle_analytics.md)
- [Issue types vs first-class types](issue_types.md)
## Performance guides ## Performance guides
...@@ -106,6 +107,7 @@ description: 'Learn how to contribute to GitLab.' ...@@ -106,6 +107,7 @@ description: 'Learn how to contribute to GitLab.'
### Debugging ### Debugging
- Tracing the source of an SQL query using query comments with [Marginalia](database_query_comments.md) - Tracing the source of an SQL query using query comments with [Marginalia](database_query_comments.md)
- Tracing the source of an SQL query in Rails console using [Verbose Query Logs](https://guides.rubyonrails.org/debugging_rails_applications.html#verbose-query-logs)
### Best practices ### Best practices
......
# Issue Types
Sometimes when a new resource type is added it's not clear if it should be only an
"extension" of Issue (Issue Type) or if it should be a new first-class resource type
(similar to Issue, Epic, Merge Request, Snippet).
The idea of Issue Types was first proposed in [this
issue](https://gitlab.com/gitlab-org/gitlab/issues/8767) and its usage was
discussed few times since then, for example in [incident
management](https://gitlab.com/gitlab-org/gitlab-foss/issues/55532).
## What is an Issue Type
Issue Type is a resource type which extends the existing Issue type and can be
used anywhere where Issue is used - for example when listing or searching
issues or when linking objects of the type from Epics. It should use the same
`issues` table, additional fields can be stored in a separate table.
## When an Issue Type should be used
- When the new type only adds new fields to the basic Issue type without
removing existing fields (but it's OK if some fields from the basic Issue
type are hidden in user interface/API).
- When the new type can be used anywhere where the basic Issue type is used.
## When a first-class resource type should be used
- When a separate model and table is used for the new resource.
- When some fields of the basic Issue type need to be removed - hiding in the UI
is OK, but not complete removal.
- When the new resource cannot be used instead of the basic Issue type,
for example:
- You can't add it to an epic.
- You can't close it from a commit or a merge request.
- You can't mark it as related to another issue.
If an Issue type can not be used you can still define a first-class type and
then include concerns such as `Issuable` or `Noteable` to reuse functionality
which is common for all our issue-related resources. But you still need to
define the interface for working with the new resource and update some other
components to make them work with the new type.
Usage of the Issue type limits what fields, functionality, or both is available
for the type. However, this functionality is provided by default.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment