diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:17 +0000 |
commit | c77fda905a8619b756163c10a75171dc9cfe7084 (patch) | |
tree | ffa93b37bfe4b99ba0b8584c7a0bd1a4cd19772a /doc | |
parent | e0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (diff) | |
download | gitlab-ce-c77fda905a8619b756163c10a75171dc9cfe7084.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/monitoring/gitlab_self_monitoring_project/index.md | 2 | ||||
-rw-r--r-- | doc/api/packages.md | 5 | ||||
-rw-r--r-- | doc/api/users.md | 123 | ||||
-rw-r--r-- | doc/development/migration_style_guide.md | 15 | ||||
-rw-r--r-- | doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png | bin | 0 -> 3897 bytes | |||
-rw-r--r-- | doc/user/project/integrations/img/prometheus_dashboard_label_variables.png | bin | 0 -> 8076 bytes | |||
-rw-r--r-- | doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png | bin | 0 -> 3116 bytes | |||
-rw-r--r-- | doc/user/project/integrations/jira.md | 4 | ||||
-rw-r--r-- | doc/user/project/integrations/prometheus.md | 52 |
9 files changed, 133 insertions, 68 deletions
diff --git a/doc/administration/monitoring/gitlab_self_monitoring_project/index.md b/doc/administration/monitoring/gitlab_self_monitoring_project/index.md index b2e44f02ff1..1946e55603c 100644 --- a/doc/administration/monitoring/gitlab_self_monitoring_project/index.md +++ b/doc/administration/monitoring/gitlab_self_monitoring_project/index.md @@ -1,6 +1,6 @@ # GitLab self monitoring project -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/32351) behind a disabled feature flag (`self_monitoring_project`) in GitLab 12.7. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/32351) in GitLab 12.7, behind a disabled feature flag (`self_monitoring_project`). > - The feature flag was removed and the Self Monitoring Project was [made generally available](https://gitlab.com/gitlab-org/gitlab/issues/198511) in GitLab 12.8. GitLab has been adding the ability for administrators to see insights into the health of diff --git a/doc/api/packages.md b/doc/api/packages.md index 5e993dbf5f5..e04cb44538a 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -8,8 +8,8 @@ This is the API docs of [GitLab Packages](../administration/packages/index.md). > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/9259) in GitLab 11.8. -Get a list of project packages. Both Maven and NPM packages are included in results. -When accessed without authentication, only packages of public projects are returned. +Get a list of project packages. All package types are included in results. When +accessed without authentication, only packages of public projects are returned. ``` GET /projects/:id/packages @@ -20,6 +20,7 @@ GET /projects/:id/packages | `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `order_by`| string | no | The field to use as order. One of `created_at` (default), `name`, `version`, or `type`. | | `sort` | string | no | The direction of the order, either `asc` (default) for ascending order or `desc` for descending order. | +| `package_type` | string | no | Filter the returned packages by type. One of `conan`, `maven`, `npm` or `nuget`. (_Introduced in GitLab 12.9_) ```shell curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:id/packages diff --git a/doc/api/users.md b/doc/api/users.md index 2c1d68be964..7952a703e47 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -160,7 +160,7 @@ Users on GitLab [Starter, Bronze, or higher](https://about.gitlab.com/pricing/) ... "shared_runners_minutes_limit": 133, "extra_shared_runners_minutes_limit": 133, - "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123" + "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123", ... } ] @@ -313,7 +313,7 @@ the `shared_runners_minutes_limit`, `extra_shared_runners_minutes_limit`, and `n "username": "john_smith", "shared_runners_minutes_limit": 133, "extra_shared_runners_minutes_limit": 133, - "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123" + "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123", ... } ``` @@ -327,7 +327,7 @@ see the `group_saml` option: "username": "john_smith", "shared_runners_minutes_limit": 133, "extra_shared_runners_minutes_limit": 133, - "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123" + "note": "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123", "identities": [ {"provider": "github", "extern_uid": "2435223452345"}, {"provider": "bitbucket", "extern_uid": "john.smith"}, @@ -364,33 +364,36 @@ POST /users Parameters: -- `email` (required) - Email -- `password` (optional) - Password -- `reset_password` (optional) - Send user password reset link - true or false(default) -- `force_random_password` (optional) - Set user password to a random value - true or false (default) -- `username` (required) - Username -- `name` (required) - Name -- `skype` (optional) - Skype ID -- `linkedin` (optional) - LinkedIn -- `twitter` (optional) - Twitter account -- `website_url` (optional) - Website URL -- `organization` (optional) - Organization name -- `projects_limit` (optional) - Number of projects user can create -- `extern_uid` (optional) - External UID -- `provider` (optional) - External provider name -- `bio` (optional) - User's biography -- `location` (optional) - User's location -- `public_email` (optional) - The public email of the user -- `admin` (optional) - User is admin - true or false (default) -- `can_create_group` (optional) - User can create groups - true or false -- `skip_confirmation` (optional) - Skip confirmation - true or false (default) -- `external` (optional) - Flags the user as external - true or false (default) -- `avatar` (optional) - Image file for user's avatar -- `theme_id` (optional) - The GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) -- `color_scheme_id` (optional) - User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) -- `private_profile` (optional) - User's profile is private - true, false (default), or null (will be converted to false) -- `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user **(STARTER)** -- `extra_shared_runners_minutes_limit` (optional) - Extra pipeline minutes quota for this user **(STARTER)** +| Attribute | Required | Description | +|:-------------------------------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------| +| `admin` | No | User is admin - true or false (default) | +| `avatar` | No | Image file for user's avatar | +| `bio` | No | User's biography | +| `can_create_group` | No | User can create groups - true or false | +| `color_scheme_id` | No | User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) | +| `email` | Yes | Email | +| `extern_uid` | No | External UID | +| `external` | No | Flags the user as external - true or false (default) | +| `extra_shared_runners_minutes_limit` | No | Extra pipeline minutes quota for this user **(STARTER)** | +| `force_random_password` | No | Set user password to a random value - true or false (default) | +| `group_id_for_saml` | No | ID of group where SAML has been configured | +| `linkedin` | No | LinkedIn | +| `location` | No | User's location | +| `name` | No | Name | +| `organization` | No | Organization name | +| `password` | No | Password | +| `private_profile` | No | User's profile is private - true, false (default), or null (will be converted to false) | +| `projects_limit` | No | Number of projects user can create | +| `provider` | No | External provider name | +| `public_email` | No | The public email of the user | +| `reset_password` | No | Send user password reset link - true or false(default) | +| `shared_runners_minutes_limit` | No | Pipeline minutes quota for this user **(STARTER)** | +| `skip_confirmation` | No | Skip confirmation - true or false (default) | +| `skype` | No | Skype ID | +| `theme_id` | No | The GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) | +| `twitter` | No | Twitter account | +| `username` | Yes | Username | +| `website_url` | No | Website URL | ## User modification @@ -402,36 +405,36 @@ PUT /users/:id Parameters: -- `id` (required) - The ID of the user -- `email` (optional) - Email -- `username` (optional) - Username -- `name` (optional) - Name -- `password` (optional) - Password -- `skype` (optional) - Skype ID -- `linkedin` (optional) - LinkedIn -- `twitter` (optional) - Twitter account -- `website_url` (optional) - Website URL -- `organization` (optional) - Organization name -- `projects_limit` (optional) - Limit projects each user can create -- `extern_uid` (optional) - External UID -- `provider` (optional) - External provider name -- `group_id_for_saml` (optional) - ID of group where SAML has been configured -- `bio` (optional) - User's biography -- `location` (optional) - User's location -- `public_email` (optional) - The public email of the user -- `admin` (optional) - User is admin - true or false (default) -- `can_create_group` (optional) - User can create groups - true or false -- `skip_reconfirmation` (optional) - Skip reconfirmation - true or false (default) -- `external` (optional) - Flags the user as external - true or false (default) -- `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user -- `extra_shared_runners_minutes_limit` (optional) - Extra pipeline minutes quota for this user -- `avatar` (optional) - Image file for user's avatar -- `theme_id` (optional) - The GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) -- `color_scheme_id` (optional) - User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) -- `private_profile` (optional) - User's profile is private - true, false (default), or null (will be converted to false) -- `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user **(STARTER)** -- `extra_shared_runners_minutes_limit` (optional) - Extra pipeline minutes quota for this user **(STARTER)** -- `note` (optional) - Admin notes for this user **(STARTER)** +| Attribute | Required | Description | +|:-------------------------------------|:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------| +| `admin` | No | User is admin - true or false (default) | +| `avatar` | No | Image file for user's avatar | +| `bio` | No | User's biography | +| `can_create_group` | No | User can create groups - true or false | +| `color_scheme_id` | No | User's color scheme for the file viewer (see [the user preference docs](../user/profile/preferences.md#syntax-highlighting-theme) for more information) | +| `email` | No | Email | +| `extern_uid` | No | External UID | +| `external` | No | Flags the user as external - true or false (default) | +| `extra_shared_runners_minutes_limit` | No | Extra pipeline minutes quota for this user **(STARTER)** | +| `group_id_for_saml` | No | ID of group where SAML has been configured | +| `id` | Yes | The ID of the user | +| `linkedin` | No | LinkedIn | +| `location` | No | User's location | +| `name` | No | Name | +| `note` | No | Admin notes for this user **(STARTER)** | +| `organization` | No | Organization name | +| `password` | No | Password | +| `private_profile` | No | User's profile is private - true, false (default), or null (will be converted to false) | +| `projects_limit` | No | Limit projects each user can create | +| `provider` | No | External provider name | +| `public_email` | No | The public email of the user | +| `shared_runners_minutes_limit` | No | Pipeline minutes quota for this user **(STARTER)** | +| `skip_reconfirmation` | No | Skip reconfirmation - true or false (default) | +| `skype` | No | Skype ID | +| `theme_id` | No | The GitLab theme for the user (see [the user preference docs](../user/profile/preferences.md#navigation-theme) for more information) | +| `twitter` | No | Twitter account | +| `username` | No | Username | +| `website_url` | No | Website URL | On password update, user will be forced to change it upon next login. Note, at the moment this method does only return a `404` error, diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 7698492b29b..57f8ff36c00 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -89,6 +89,21 @@ be possible to downgrade in case of a vulnerability or bugs. In your migration, add a comment describing how the reversibility of the migration was tested. +Some migrations cannot be reversed. For example, some data migrations can't be +reversed because we lose information about the state of the database before the migration. +You should still create a `down` method with a comment, explaining why +the changes performed by the `up` method can't be reversed, so that the +migration itself can be reversed, even if the changes performed during the migration +can't be reversed: + +```ruby +def down + # no-op + + # comment explaining why changes performed by `up` cannot be reversed. +end +``` + ## Atomicity By default, migrations are single transaction. That is, a transaction is opened diff --git a/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png b/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png Binary files differnew file mode 100644 index 00000000000..15111a97464 --- /dev/null +++ b/doc/user/project/integrations/img/prometheus_dashboard_label_variable_shorthand.png diff --git a/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png b/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png Binary files differnew file mode 100644 index 00000000000..9b94d0c6afa --- /dev/null +++ b/doc/user/project/integrations/img/prometheus_dashboard_label_variables.png diff --git a/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png b/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png Binary files differnew file mode 100644 index 00000000000..d43a890f0fa --- /dev/null +++ b/doc/user/project/integrations/img/prometheus_dashboard_repeated_label.png diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md index 0bfb13ba54f..1af56b79e82 100644 --- a/doc/user/project/integrations/jira.md +++ b/doc/user/project/integrations/jira.md @@ -71,8 +71,8 @@ in the table below. | Field | Description | | ----- | ----------- | -| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. E.g., `https://Jira.example.com`. | -| `Jira API URL` | The base URL to the Jira instance API. Web URL value will be used if not set. E.g., `https://jira-api.example.com`. | +| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. E.g., `https://jira.example.com`. | +| `Jira API URL` | The base URL to the Jira instance API. Web URL value will be used if not set. E.g., `https://jira-api.example.com`. Leave this field blank (or use the same value of `Web URL`) if using **Jira Cloud**. | | `Username/Email` | Created when [configuring Jira step](#configuring-jira). Use `username` for **Jira Server** or `email` for **Jira Cloud**. | | `Password/API token` |Created in [configuring Jira step](#configuring-jira). Use `password` for **Jira Server** or `API token` for **Jira Cloud**. | | `Transition ID` | This is the ID of a transition that moves issues to the desired state. It is possible to insert transition ids separated by `,` or `;` which means the issue will be moved to each state after another using the given order. **Closing Jira issues via commits or Merge Requests won't work if you don't set the ID correctly.** | diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md index 624ab0616c4..2f1be1c2257 100644 --- a/doc/user/project/integrations/prometheus.md +++ b/doc/user/project/integrations/prometheus.md @@ -191,7 +191,7 @@ For example: metrics: - id: metric_of_ages query_range: 'http_requests_total' - label: "Metric of Ages" + label: "Instance: {{instance}}, method: {{method}}" unit: "count" ``` @@ -267,10 +267,56 @@ The following tables outline the details of expected properties. | ------ | ------ | ------ | ------ | | `id` | string | no | Used for associating dashboard metrics with database records. Must be unique across dashboard configuration files. Required for [alerting](#setting-up-alerts-for-prometheus-metrics-ultimate) (support not yet enabled, see [relevant issue](https://gitlab.com/gitlab-org/gitlab-foss/issues/60319)). | | `unit` | string | yes | Defines the unit of the query's return data. | -| `label` | string | no, but highly encouraged | Defines the legend-label for the query. Should be unique within the panel's metrics. | +| `label` | string | no, but highly encouraged | Defines the legend-label for the query. Should be unique within the panel's metrics. Can contain time series labels as interpolated variables. | | `query` | string | yes if `query_range` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. | | `query_range` | string | yes if `query` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query_range` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. | +##### Dynamic labels + +Dynamic labels are useful when multiple time series are returned from a Prometheus query. + +When a static label is used and a query returns multiple time series, then all the legend items will be labeled the same, which makes identifying each time series difficult: + +```yaml +metrics: + - id: metric_of_ages + query_range: 'http_requests_total' + label: "Time Series" + unit: "count" +``` + +This may render a legend like this: + +![repeated legend label chart](img/prometheus_dashboard_repeated_label.png) + +For labels to be more explicit, using variables that reflect time series labels is a good practice. The variables will be replaced by the values of the time series labels when the legend is rendered: + +```yaml +metrics: + - id: metric_of_ages + query_range: 'http_requests_total' + label: "Instance: {{instance}}, method: {{method}}" + unit: "count" +``` + +The resulting rendered legend will look like this: + +![legend with label variables](img/prometheus_dashboard_label_variables.png) + +There is also a shorthand value for dynamic dashboard labels that make use of only one time series label: + +```yaml +metrics: + - id: metric_of_ages + query_range: 'http_requests_total' + label: "Method" + unit: "count" +``` + +This will render into: + +![legend with label shorthand variable](img/prometheus_dashboard_label_variable_shorthand.png) + #### Panel types for dashboards The below panel types are supported in monitoring dashboards. @@ -290,7 +336,7 @@ panel_groups: metrics: - id: area_http_requests_total query_range: 'http_requests_total' - label: "Metric of Ages" + label: "Instance: {{instance}}, Method: {{method}}" unit: "count" ``` |