Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 06:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 06:09:23 +0300
commitf098e6d3d2c8eaaec0a228c8a3ae01f770e15dd2 (patch)
tree611a38154ba90341f6c6935a51cf7962f5896790 /doc
parent697d1c4e06d1c232ca8b21805cc889a0991702ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/high_availability/nfs.md62
-rw-r--r--doc/api/graphql/reference/gitlab_schema.graphql12
-rw-r--r--doc/api/graphql/reference/gitlab_schema.json12
-rw-r--r--doc/api/graphql/reference/index.md12
-rw-r--r--doc/development/api_graphql_styleguide.md86
-rw-r--r--doc/user/project/issues/csv_export.md2
-rw-r--r--doc/user/project/issues/img/csv_export_button.pngbin7383 -> 0 bytes
-rw-r--r--doc/user/project/issues/img/csv_export_button_v12_9.pngbin0 -> 34524 bytes
8 files changed, 119 insertions, 67 deletions
diff --git a/doc/administration/high_availability/nfs.md b/doc/administration/high_availability/nfs.md
index 9b83ae581b7..192434f7907 100644
--- a/doc/administration/high_availability/nfs.md
+++ b/doc/administration/high_availability/nfs.md
@@ -52,6 +52,36 @@ management between systems:
- [NetApp instructions](https://library.netapp.com/ecmdocs/ECMP1401220/html/GUID-24367A9F-E17B-4725-ADC1-02D86F56F78E.html)
- For non-NetApp devices, disable NFSv4 `idmapping` by performing opposite of [enable NFSv4 idmapper](https://wiki.archlinux.org/index.php/NFS#Enabling_NFSv4_idmapping)
+### Disable NFS server delegation
+
+We recommend that all NFS users disable the NFS server delegation feature. This
+is to avoid a [Linux kernel bug](https://bugzilla.redhat.com/show_bug.cgi?id=1552203)
+which causes NFS clients to slow precipitously due to
+[excessive network traffic from numerous `TEST_STATEID` NFS messages](https://gitlab.com/gitlab-org/gitlab-foss/issues/52017).
+
+To disable NFS server delegation, do the following:
+
+1. On the NFS server, run:
+
+ ```shell
+ echo 0 > /proc/sys/fs/leases-enable
+ sysctl -w fs.leases-enable=0
+ ```
+
+1. Restart the NFS server process. For example, on CentOS run `service nfs restart`.
+
+#### Important notes
+
+The kernel bug may be fixed in
+[more recent kernels with this commit](https://github.om/torvalds/linux/commit/95da1b3a5aded124dd1bda1e3cdb876184813140).
+
+Red Hat Enterprise 7 [shipped a kernel update](https://access.redhat.com/errata/RHSA-2019:2029)
+on August 6, 2019 that may also have resolved this problem.
+
+You may not need to disable NFS server delegation if you know you are using a version of
+the Linux kernel that has been fixed. That said, GitLab still encourages instance
+administrators to keep NFS server delegation disabled.
+
### Improving NFS performance with GitLab
#### Improving NFS performance with Unicorn
@@ -78,33 +108,7 @@ If the Rugged feature flag is explicitly set to either true or false, GitLab wil
### Known issues
-On some customer systems, we have seen NFS clients slow precipitously due to
-[excessive network traffic from numerous `TEST_STATEID` NFS
-messages](https://gitlab.com/gitlab-org/gitlab-foss/issues/52017). This is
-likely due to a [Linux kernel
-bug](https://bugzilla.redhat.com/show_bug.cgi?id=1552203) that may be fixed in
-[more recent kernels with this
-commit](https://github.com/torvalds/linux/commit/95da1b3a5aded124dd1bda1e3cdb876184813140).
-
-NOTE: **Note** Red Hat Enterprise 7 [shipped a kernel
-update](https://access.redhat.com/errata/RHSA-2019:2029) on August 6,
-2019 that may have resolved this problem. The following instructions may
-not be needed if the latest kernel is updated properly.
-
-GitLab recommends all NFS users disable the NFS server
-delegation feature. To disable NFS server delegations
-on an Linux NFS server, do the following:
-
-1. On the NFS server, run:
-
- ```shell
- echo 0 > /proc/sys/fs/leases-enable
- sysctl -w fs.leases-enable=0
- ```
-
-1. Restart the NFS server process. For example, on CentOS run `service nfs restart`.
-
-## Avoid using AWS's Elastic File System (EFS)
+#### Avoid using AWS's Elastic File System (EFS)
GitLab strongly recommends against using AWS Elastic File System (EFS).
Our support team will not be able to assist on performance issues related to
@@ -120,12 +124,12 @@ stored on a local volume.
For more details on another person's experience with EFS, see this [Commit Brooklyn 2019 video](https://youtu.be/K6OS8WodRBQ?t=313).
-## Avoid using CephFS and GlusterFS
+#### Avoid using CephFS and GlusterFS
GitLab strongly recommends against using CephFS and GlusterFS.
These distributed file systems are not well-suited for GitLab's input/output access patterns because Git uses many small files and access times and file locking times to propagate will make Git activity very slow.
-## Avoid using PostgreSQL with NFS
+#### Avoid using PostgreSQL with NFS
GitLab strongly recommends against running your PostgreSQL database
across NFS. The GitLab support team will not be able to assist on performance issues related to
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql
index 79e9c25c9a5..50d5eeaf9ab 100644
--- a/doc/api/graphql/reference/gitlab_schema.graphql
+++ b/doc/api/graphql/reference/gitlab_schema.graphql
@@ -6093,7 +6093,7 @@ type Project {
): IssueConnection
"""
- (deprecated) Does this project have issues enabled?. Use `issues_access_level` instead
+ Indicates if Issues are enabled for the current user
"""
issuesEnabled: Boolean
@@ -6128,7 +6128,7 @@ type Project {
): JiraImportConnection
"""
- (deprecated) Enable jobs for this project. Use `builds_access_level` instead
+ Indicates if CI/CD pipeline jobs are enabled for the current user
"""
jobsEnabled: Boolean
@@ -6193,7 +6193,7 @@ type Project {
): MergeRequestConnection
"""
- (deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead
+ Indicates if Merge Requests are enabled for the current user
"""
mergeRequestsEnabled: Boolean
@@ -6406,7 +6406,7 @@ type Project {
serviceDeskEnabled: Boolean
"""
- Indicates if shared runners are enabled on the project
+ Indicates if Shared Runners are enabled for the project
"""
sharedRunnersEnabled: Boolean
@@ -6446,7 +6446,7 @@ type Project {
): SnippetConnection
"""
- (deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead
+ Indicates if Snippets are enabled for the current user
"""
snippetsEnabled: Boolean
@@ -6542,7 +6542,7 @@ type Project {
webUrl: String
"""
- (deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead
+ Indicates if Wikis are enabled for the current user
"""
wikiEnabled: Boolean
}
diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json
index 67fc5738a5e..c7281fcc638 100644
--- a/doc/api/graphql/reference/gitlab_schema.json
+++ b/doc/api/graphql/reference/gitlab_schema.json
@@ -18344,7 +18344,7 @@
},
{
"name": "issuesEnabled",
- "description": "(deprecated) Does this project have issues enabled?. Use `issues_access_level` instead",
+ "description": "Indicates if Issues are enabled for the current user",
"args": [
],
@@ -18425,7 +18425,7 @@
},
{
"name": "jobsEnabled",
- "description": "(deprecated) Enable jobs for this project. Use `builds_access_level` instead",
+ "description": "Indicates if CI/CD pipeline jobs are enabled for the current user",
"args": [
],
@@ -18589,7 +18589,7 @@
},
{
"name": "mergeRequestsEnabled",
- "description": "(deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead",
+ "description": "Indicates if Merge Requests are enabled for the current user",
"args": [
],
@@ -19125,7 +19125,7 @@
},
{
"name": "sharedRunnersEnabled",
- "description": "Indicates if shared runners are enabled on the project",
+ "description": "Indicates if Shared Runners are enabled for the project",
"args": [
],
@@ -19220,7 +19220,7 @@
},
{
"name": "snippetsEnabled",
- "description": "(deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead",
+ "description": "Indicates if Snippets are enabled for the current user",
"args": [
],
@@ -19493,7 +19493,7 @@
},
{
"name": "wikiEnabled",
- "description": "(deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead",
+ "description": "Indicates if Wikis are enabled for the current user",
"args": [
],
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 2a1c501e785..d1ddcb6435b 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -901,13 +901,13 @@ Information about pagination in a connection.
| `id` | ID! | ID of the project |
| `importStatus` | String | Status of import background job of the project |
| `issue` | Issue | A single issue of the project |
-| `issuesEnabled` | Boolean | (deprecated) Does this project have issues enabled?. Use `issues_access_level` instead |
+| `issuesEnabled` | Boolean | Indicates if Issues are enabled for the current user |
| `jiraImportStatus` | String | Status of Jira import background job of the project |
-| `jobsEnabled` | Boolean | (deprecated) Enable jobs for this project. Use `builds_access_level` instead |
+| `jobsEnabled` | Boolean | Indicates if CI/CD pipeline jobs are enabled for the current user |
| `lastActivityAt` | Time | Timestamp of the project last activity |
| `lfsEnabled` | Boolean | Indicates if the project has Large File Storage (LFS) enabled |
| `mergeRequest` | MergeRequest | A single merge request of the project |
-| `mergeRequestsEnabled` | Boolean | (deprecated) Does this project have merge_requests enabled?. Use `merge_requests_access_level` instead |
+| `mergeRequestsEnabled` | Boolean | Indicates if Merge Requests are enabled for the current user |
| `mergeRequestsFfOnlyEnabled` | Boolean | Indicates if no merge commits should be created and all merges should instead be fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded. |
| `name` | String! | Name of the project (without namespace) |
| `nameWithNamespace` | String! | Full name of the project with its namespace |
@@ -927,8 +927,8 @@ Information about pagination in a connection.
| `sentryErrors` | SentryErrorCollection | Paginated collection of Sentry errors on the project |
| `serviceDeskAddress` | String | E-mail address of the service desk. |
| `serviceDeskEnabled` | Boolean | Indicates if the project has service desk enabled. |
-| `sharedRunnersEnabled` | Boolean | Indicates if shared runners are enabled on the project |
-| `snippetsEnabled` | Boolean | (deprecated) Does this project have snippets enabled?. Use `snippets_access_level` instead |
+| `sharedRunnersEnabled` | Boolean | Indicates if Shared Runners are enabled for the project |
+| `snippetsEnabled` | Boolean | Indicates if Snippets are enabled for the current user |
| `sshUrlToRepo` | String | URL to connect to the project via SSH |
| `starCount` | Int! | Number of times the project has been starred |
| `statistics` | ProjectStatistics | Statistics of the project |
@@ -938,7 +938,7 @@ Information about pagination in a connection.
| `visibility` | String | Visibility of the project |
| `vulnerabilitySeveritiesCount` | VulnerabilitySeveritiesCount | Counts for each severity of vulnerability of the project. Available only when feature flag `first_class_vulnerabilities` is enabled |
| `webUrl` | String | Web URL of the project |
-| `wikiEnabled` | Boolean | (deprecated) Does this project have wiki enabled?. Use `wiki_access_level` instead |
+| `wikiEnabled` | Boolean | Indicates if Wikis are enabled for the current user |
## ProjectPermissions
diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md
index 3c475639834..7fd158aec04 100644
--- a/doc/development/api_graphql_styleguide.md
+++ b/doc/development/api_graphql_styleguide.md
@@ -45,8 +45,8 @@ For example, `app/graphql/types/issue_type.rb`:
```ruby
graphql_name 'Issue'
-field :iid, GraphQL::ID_TYPE, null: false
-field :title, GraphQL::STRING_TYPE, null: false
+field :iid, GraphQL::ID_TYPE, null: true
+field :title, GraphQL::STRING_TYPE, null: true
# we also have a method here that we've defined, that extends `field`
markdown_field :title_html, null: true
@@ -258,30 +258,78 @@ end
## Feature flags
-Features controlled by feature flags often provide GraphQL functionality. When a feature
-is enabled or disabled by a feature flag, the related GraphQL functionality should also
-be enabled or disabled.
+Developers can add [feature flags](../development/feature_flags/index.md) to GraphQL
+fields in the following ways:
-Fields can be put behind a feature flag so they can conditionally return the value for
-the field depending on if the feature has been enabled or not.
+- Add the `feature_flag` property to a field. This will allow the field to be _hidden_
+ from the GraphQL schema when the flag is disabled.
+- Toggle the return value when resolving the field.
-GraphQL feature flags use the common
-[GitLab feature flag](../development/feature_flags.md) system, and can be added to a
-field using the `feature_flag` property.
+You can refer to these guidelines to decide which approach to use:
-For example:
+- If your field is experimental, and its name or type is subject to
+ change, use the `feature_flag` property.
+- If your field is stable and its definition will not change, even after the flag is
+ removed, toggle the return value of the field instead. Note that
+ [all fields should be nullable](#nullable-fields) anyway.
+
+### `feature_flag` property
+
+The `feature_flag` property allows you to toggle the field's
+[visibility](https://graphql-ruby.org/authorization/visibility.html)
+within the GraphQL schema. This will remove the field from the schema
+when the flag is disabled.
+
+A description is [appended](https://gitlab.com/gitlab-org/gitlab/-/blob/497b556/app/graphql/types/base_field.rb#L44-53)
+to the field indicating that it is behind a feature flag.
+
+CAUTION: **Caution:**
+If a client queries for the field when the feature flag is disabled, the query will
+fail. Consider this when toggling the visibility of the feature on or off on
+production.
+
+The `feature_flag` property does not allow the use of
+[feature gates based on actors](../development/feature_flags/development.md).
+This means that the feature flag cannot be toggled only for particular
+projects, groups, or users, but instead can only be toggled globally for
+everyone.
+
+Example:
```ruby
field :test_field, type: GraphQL::STRING_TYPE,
- null: false,
+ null: true,
description: 'Some test field',
- feature_flag: :some_feature_flag
+ feature_flag: :my_feature_flag
```
-In the above example, the `test_field` field will only be returned if
-the `some_feature_flag` feature flag is enabled.
+### Toggle the value of a field
+
+This method of using feature flags for fields is to toggle the
+return value of the field. This can be done in the resolver, in the
+type, or even in a model method, depending on your preference and
+situation.
-If the feature flag is not enabled, an error will be returned saying the field does not exist.
+When applying a feature flag to toggle the value of a field, the
+`description` of the field must:
+
+- State that the value of the field can be toggled by a feature flag.
+- Name the feature flag.
+- State what the field will return when the feature flag is disabled (or
+ enabled, if more appropriate).
+
+Example:
+
+```ruby
+field :foo, GraphQL::STRING_TYPE,
+ null: true,
+ description: 'Some test field. Will always return `null`' \
+ 'if `my_feature_flag` feature flag is disabled'
+
+def foo
+ object.foo unless Feature.enabled?(:my_feature_flag, object)
+end
+```
## Deprecating fields
@@ -301,7 +349,7 @@ Example:
```ruby
field :token, GraphQL::STRING_TYPE, null: true,
- deprecated: { reason: 'Login via token has been removed', milestone: 10.0 },
+ deprecated: { reason: 'Login via token has been removed', milestone: '10.0' },
description: 'Token for login'
```
@@ -321,7 +369,7 @@ Example:
```ruby
field :designs, ::Types::DesignManagement::DesignCollectionType, null: true,
- deprecated: { reason: 'Use `designCollection`', milestone: 10.0 },
+ deprecated: { reason: 'Use `designCollection`', milestone: '10.0' },
description: 'The designs associated with this issue',
```
@@ -741,7 +789,7 @@ and handles time inputs.
Example:
```ruby
-field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the issue was created'
+field :created_at, Types::TimeType, null: true, description: 'Timestamp of when the issue was created'
```
## Testing
diff --git a/doc/user/project/issues/csv_export.md b/doc/user/project/issues/csv_export.md
index 8de0f038881..c5b048c1d69 100644
--- a/doc/user/project/issues/csv_export.md
+++ b/doc/user/project/issues/csv_export.md
@@ -30,7 +30,7 @@ Among numerous use cases for exporting issues for CSV, we can name a few:
After selecting a project, from the issues page you can narrow down which issues to export using the search bar, along with the All/Open/Closed tabs. All issues returned will be exported, including those not shown on the first page.
-![CSV export button](img/csv_export_button.png)
+![CSV export button](img/csv_export_button_v12_9.png)
You will be asked to confirm the number of issues and email address for the export, after which the email will begin being prepared.
diff --git a/doc/user/project/issues/img/csv_export_button.png b/doc/user/project/issues/img/csv_export_button.png
deleted file mode 100644
index f9fcfd71c2f..00000000000
--- a/doc/user/project/issues/img/csv_export_button.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/issues/img/csv_export_button_v12_9.png b/doc/user/project/issues/img/csv_export_button_v12_9.png
new file mode 100644
index 00000000000..88083cacbfb
--- /dev/null
+++ b/doc/user/project/issues/img/csv_export_button_v12_9.png
Binary files differ