diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
commit | 4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch) | |
tree | 5c6bcecbca227e608753a57a9aad19ccfe0567b6 /doc | |
parent | cefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff) | |
download | gitlab-ce-4720b569f0fcbb47e9f1a60e95172ae63b6f065a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.graphql | 75 | ||||
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.json | 192 | ||||
-rw-r--r-- | doc/api/graphql/reference/index.md | 13 | ||||
-rw-r--r-- | doc/ci/pipelines.md | 37 | ||||
-rw-r--r-- | doc/ci/variables/where_variables_can_be_used.md | 1 | ||||
-rw-r--r-- | doc/development/database_debugging.md | 24 | ||||
-rw-r--r-- | doc/development/event_tracking/index.md | 4 | ||||
-rw-r--r-- | doc/development/instrumentation.md | 4 |
8 files changed, 348 insertions, 2 deletions
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index f698db84982..898ad11f450 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -1878,6 +1878,11 @@ type Epic implements Noteable { hasIssues: Boolean! """ + Current health status. Available only when feature flag save_issuable_health_status is enabled. + """ + healthStatus: HealthStatus + + """ ID of the epic """ id: ID! @@ -2253,6 +2258,11 @@ type EpicIssue implements Noteable { epicIssueId: ID! """ + Current health status. Available only when feature flag save_issuable_health_status is enabled. + """ + healthStatus: HealthStatus + + """ Global ID of the epic-issue relation """ id: ID @@ -3060,6 +3070,15 @@ type GroupPermissions { } """ +Health status of an issue or epic +""" +enum HealthStatus { + atRisk + needsAttention + onTrack +} + +""" State of a GitLab issue or merge request """ enum IssuableState { @@ -3180,6 +3199,11 @@ type Issue implements Noteable { epic: Epic """ + Current health status. Available only when feature flag save_issuable_health_status is enabled. + """ + healthStatus: HealthStatus + + """ Internal ID of the issue """ iid: ID! @@ -4667,6 +4691,7 @@ type Mutation { be destroyed during the update, and no Note will be returned """ updateImageDiffNote(input: UpdateImageDiffNoteInput!): UpdateImageDiffNotePayload + updateIssue(input: UpdateIssueInput!): UpdateIssuePayload """ Updates a Note. If the body of the Note contains only quick actions, the Note @@ -7602,6 +7627,11 @@ input UpdateEpicInput { groupPath: ID! """ + The desired health status + """ + healthStatus: HealthStatus + + """ The iid of the epic to mutate """ iid: String! @@ -7698,6 +7728,51 @@ type UpdateImageDiffNotePayload { } """ +Autogenerated input type of UpdateIssue +""" +input UpdateIssueInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The desired health status + """ + healthStatus: HealthStatus + + """ + The iid of the issue to mutate + """ + iid: String! + + """ + The project the issue to mutate is in + """ + projectPath: ID! +} + +""" +Autogenerated return type of UpdateIssue +""" +type UpdateIssuePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Reasons why the mutation failed. + """ + errors: [String!]! + + """ + The issue after mutation + """ + issue: Issue +} + +""" Autogenerated input type of UpdateNote """ input UpdateNoteInput { diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index 38a836acb6b..41872ffa9c2 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -11163,6 +11163,35 @@ "possibleTypes": null }, { + "kind": "ENUM", + "name": "HealthStatus", + "description": "Health status of an issue or epic", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "onTrack", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "needsAttention", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "atRisk", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { "kind": "OBJECT", "name": "DesignConnection", "description": "The connection type for Design.", @@ -19454,6 +19483,33 @@ "deprecationReason": null }, { + "name": "updateIssue", + "description": null, + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateIssueInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateIssuePayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "updateNote", "description": "Updates a Note. If the body of the Note contains only quick actions, the Note will be destroyed during the update, and no Note will be returned", "args": [ @@ -20264,6 +20320,132 @@ }, { "kind": "OBJECT", + "name": "UpdateIssuePayload", + "description": "Autogenerated return type of UpdateIssue", + "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": "Reasons why the mutation failed.", + "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 + }, + { + "name": "issue", + "description": "The issue after mutation", + "args": [ + + ], + "type": { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateIssueInput", + "description": "Autogenerated input type of UpdateIssue", + "fields": null, + "inputFields": [ + { + "name": "projectPath", + "description": "The project the issue to mutate is in", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "iid", + "description": "The iid of the issue to mutate", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "healthStatus", + "description": "The desired health status", + "type": { + "kind": "ENUM", + "name": "HealthStatus", + "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": "MergeRequestSetLabelsPayload", "description": "Autogenerated return type of MergeRequestSetLabels", "fields": [ @@ -23907,6 +24089,16 @@ "defaultValue": null }, { + "name": "healthStatus", + "description": "The desired health status", + "type": { + "kind": "ENUM", + "name": "HealthStatus", + "ofType": null + }, + "defaultValue": null + }, + { "name": "clientMutationId", "description": "A unique identifier for the client performing the mutation.", "type": { diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index c1a5882eb25..19d145a664f 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -293,6 +293,7 @@ Represents an epic. | `group` | Group! | Group to which the epic belongs | | `hasChildren` | Boolean! | Indicates if the epic has children | | `hasIssues` | Boolean! | Indicates if the epic has direct issues | +| `healthStatus` | HealthStatus | Current health status. Available only when feature flag save_issuable_health_status is enabled. | | `id` | ID! | ID of the epic | | `iid` | ID! | Internal ID of the epic | | `parent` | Epic | Parent epic of the epic | @@ -342,6 +343,7 @@ Relationship between an epic and an issue | `dueDate` | Time | Due date of the issue | | `epic` | Epic | Epic to which this issue belongs | | `epicIssueId` | ID! | ID of the epic-issue relation | +| `healthStatus` | HealthStatus | Current health status. Available only when feature flag save_issuable_health_status is enabled. | | `id` | ID | Global ID of the epic-issue relation | | `iid` | ID! | Internal ID of the issue | | `milestone` | Milestone | Milestone of the issue | @@ -461,6 +463,7 @@ Autogenerated return type of EpicTreeReorder | `downvotes` | Int! | Number of downvotes the issue has received | | `dueDate` | Time | Due date of the issue | | `epic` | Epic | Epic to which this issue belongs | +| `healthStatus` | HealthStatus | Current health status. Available only when feature flag save_issuable_health_status is enabled. | | `iid` | ID! | Internal ID of the issue | | `milestone` | Milestone | Milestone of the issue | | `reference` | String! | Internal reference of the issue. Returned in shortened format by default | @@ -1240,6 +1243,16 @@ Autogenerated return type of UpdateImageDiffNote | `errors` | String! => Array | Reasons why the mutation failed. | | `note` | Note | The note after mutation | +## UpdateIssuePayload + +Autogenerated return type of UpdateIssue + +| Name | Type | Description | +| --- | ---- | ---------- | +| `clientMutationId` | String | A unique identifier for the client performing the mutation. | +| `errors` | String! => Array | Reasons why the mutation failed. | +| `issue` | Issue | The issue after mutation | + ## UpdateNotePayload Autogenerated return type of UpdateNote diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md index 2bf5592885b..896097ccd3a 100644 --- a/doc/ci/pipelines.md +++ b/doc/ci/pipelines.md @@ -166,6 +166,43 @@ In the following example: ![Collapsible sections](img/collapsible_log_v12_6.png) +#### Custom collapsible sections + +You can create collapsible sections in job logs by manually outputting special codes +that GitLab will use to determine what sections to collapse: + +- Section start marker: `section_start:UNIX_TIMESTAMP:SECTION_NAME\r\e[0K` + `TEXT_OF_SECTION_HEADER` +- Section end marker: `section_end:UNIX_TIMESTAMP:SECTION_NAME\r\e[0K` + +You must add these codes to the script section of the CI configuration. For example, +using `echo`: + +```yaml +job1: + script: + - echo -e "section_start:`date +%s`:my_first_section\r\e[0KHeader of the 1st collapsible section" + - echo 'this line should be hidden when collapsed' + - echo -e "section_end:`date +%s`:my_first_section\r\e[0K" +``` + +In the example above: + +- `date +%s`: The Unix timestamp (for example `1560896352`). +- `my_first_section`: The name given to the section. +- `\r\e[0K`: Prevents the section markers from displaying in the rendered (colored) + job log, but they are displayed in the raw job log. To see them, in the top right + of the job log, click **{doc-text}** (**Show complete raw**). + - `\r`: carriage return. + - `\e[0K`: clear line ANSI escape code. + +Sample raw job log: + +```plaintext +section_start:1560896352:my_first_section\r\e[0KHeader of the 1st collapsible section +this line should be hidden when collapsed +section_end:1560896353:my_first_section\r\e[0K +``` + ## Configuring pipelines Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci.yml`](yaml/README.md) file for each project. diff --git a/doc/ci/variables/where_variables_can_be_used.md b/doc/ci/variables/where_variables_can_be_used.md index b5296f26269..0c40ac960e5 100644 --- a/doc/ci/variables/where_variables_can_be_used.md +++ b/doc/ci/variables/where_variables_can_be_used.md @@ -23,6 +23,7 @@ There are two places defined variables can be used. On the: |:-------------------------------------------|:-----------------|:-----------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `environment:url` | yes | GitLab | The variable expansion is made by GitLab's [internal variable expansion mechanism](#gitlab-internal-variable-expansion-mechanism).<br/><br/>Supported are all variables defined for a job (project/group variables, variables from `.gitlab-ci.yml`, variables from triggers, variables from pipeline schedules).<br/><br/>Not supported are variables defined in Runner's `config.toml` and variables created in job's `script`. | | `environment:name` | yes | GitLab | Similar to `environment:url`, but the variables expansion doesn't support the following:<br/><br/>- Variables that are based on the environment's name (`CI_ENVIRONMENT_NAME`, `CI_ENVIRONMENT_SLUG`).<br/>- Any other variables related to environment (currently only `CI_ENVIRONMENT_URL`).<br/>- [Persisted variables](#persisted-variables). | +| `resource_group` | yes | GitLab | Similar to `environment:url`, but the variables expansion doesn't support the following:<br/><br/>- Variables that are based on the environment's name (`CI_ENVIRONMENT_NAME`, `CI_ENVIRONMENT_SLUG`).<br/>- Any other variables related to environment (currently only `CI_ENVIRONMENT_URL`).<br/>- [Persisted variables](#persisted-variables). | | `variables` | yes | Runner | The variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) | | `image` | yes | Runner | The variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) | | `services:[]` | yes | Runner | The variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) | diff --git a/doc/development/database_debugging.md b/doc/development/database_debugging.md index 234d6b2518d..d91edba92db 100644 --- a/doc/development/database_debugging.md +++ b/doc/development/database_debugging.md @@ -52,6 +52,30 @@ bundle exec rails db RAILS_ENV=development - `SELECT * FROM schema_migrations WHERE version = '20170926203418';`: Check if a migration was run - `DELETE FROM schema_migrations WHERE version = '20170926203418';`: Manually remove a migration +## Access the GDK database with Visual Studio Code + +Use these instructions for exploring the GitLab database while developing with the GDK: + +1. Install or open [Visual Studio Code](https://code.visualstudio.com/download). +1. Install the [PostgreSQL VSCode Extension](https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres) by Chris Kolkman. +1. In Visual Studio Code click on the PostgreSQL Explorer button in the left toolbar. +1. In the top bar of the new window, click on the `+` to **Add Database Connection**, and follow the prompts to fill in the details: + 1. **Hostname**: the path to the PostgreSQL folder in your GDK directory (for example `/dev/gitlab-development-kit/postgresql`). + 1. **PostgreSQL user to authenticate as**: usually your local username, unless otherwise specified during PostgreSQL installation. + 1. **Password of the PostgreSQL user**: the password you set when installing PostgreSQL. + 1. **Port number to connect to**: `5432` (default). + 1. **Use an ssl connection?** This depends on your installation. Options are: + - **Use Secure Connection** + - **Standard Connection** (default) + 1. **(Optional) The database to connect to**: `gitlabhq_development`. + 1. **The display name for the database connection**: `gitlabhq_development`. + +Your database connection should now be displayed in the PostgreSQL Explorer pane and +you can explore the `gitlabhq_development` database. If you cannot connect, ensure +that GDK is running. For further instructions on how to use the PostgreSQL Explorer +Extension for Visual Studio Code, read the [usage section](https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres#usage) +of the extension documentation. + ## FAQ ### `ActiveRecord::PendingMigrationError` with Spring diff --git a/doc/development/event_tracking/index.md b/doc/development/event_tracking/index.md index 13b08e53768..39714cf4af3 100644 --- a/doc/development/event_tracking/index.md +++ b/doc/development/event_tracking/index.md @@ -1,4 +1,4 @@ -# Event tracking +# Product Analytics At GitLab, we encourage event tracking so we can iterate on and improve the project and user experience. @@ -44,6 +44,8 @@ From the backend, the events that are tracked will likely consist of things like See [Backend tracking guide](backend.md). +Also, see [Application performance metrics](../instrumentation.md) if you are after instrumenting application performance metrics. + ## Enabling tracking Tracking can be enabled at: diff --git a/doc/development/instrumentation.md b/doc/development/instrumentation.md index b22a63621dc..3ce6fda441a 100644 --- a/doc/development/instrumentation.md +++ b/doc/development/instrumentation.md @@ -1,10 +1,12 @@ -# Instrumenting Ruby Code +# Application Performance Metrics for Ruby Code [GitLab Performance Monitoring](../administration/monitoring/performance/index.md) allows instrumenting of both methods and custom blocks of Ruby code. Method instrumentation is the primary form of instrumentation with block-based instrumentation only being used when we want to drill down to specific regions of code within a method. +Please refer to [Product analytics](event_tracking/index.md) if you are after tracking product usage patterns. + ## Instrumenting Methods Instrumenting methods is done by using the `Gitlab::Metrics::Instrumentation` |