diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 15:08:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 15:08:40 +0300 |
commit | be3e24ea3c9f497efde85900df298ce9bc42fce8 (patch) | |
tree | fd0de9443253a1b21ca9a2741dc34ba3aef795be /doc | |
parent | 001243986195143c395a9811d8254bbf1b9ebfa1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/operations/extra_sidekiq_processes.md | 5 | ||||
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.graphql | 98 | ||||
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.json | 313 | ||||
-rw-r--r-- | doc/api/graphql/reference/index.md | 31 | ||||
-rw-r--r-- | doc/development/fe_guide/graphql.md | 2 | ||||
-rw-r--r-- | doc/development/sidekiq_style_guide.md | 7 | ||||
-rw-r--r-- | doc/user/application_security/sast/index.md | 3 |
7 files changed, 446 insertions, 13 deletions
diff --git a/doc/administration/operations/extra_sidekiq_processes.md b/doc/administration/operations/extra_sidekiq_processes.md index 1be89f759da..acb57debe26 100644 --- a/doc/administration/operations/extra_sidekiq_processes.md +++ b/doc/administration/operations/extra_sidekiq_processes.md @@ -268,8 +268,9 @@ default value can be found in `/opt/gitlab/etc/gitlab-rails/env/RAILS_ENV`. ### Using negation -You're able to run all queues in `sidekiq_queues.yml` file on a single or -multiple processes with exceptions using the `--negate` flag. +You're able to run all queues in the `all_queues.yml` file (or the equivalent EE +file) on a single or multiple processes with exceptions using the `--negate` +flag. For example, say you want to run a single process for all queues, except `process_commit` and `post_receive`: diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index 23ffae3b097..f3bf45b0b3d 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -150,6 +150,15 @@ type BlobEdge { node: Blob } +""" +Types of blob viewers +""" +enum BlobViewersType { + auxiliary + rich + simple +} + type Commit { """ Author of the commit @@ -5934,9 +5943,9 @@ type Snippet implements Noteable { author: User! """ - Content of the snippet + Snippet blob """ - content: String! + blob: SnippetBlob! """ Timestamp this snippet was created @@ -6050,6 +6059,91 @@ type Snippet implements Noteable { } """ +Represents the snippet blob +""" +type SnippetBlob { + """ + Shows whether the blob is binary + """ + binary: Boolean! + + """ + Blob highlighted data + """ + highlightedData: String + + """ + Blob name + """ + name: String + + """ + Blob path + """ + path: String + + """ + Blob raw content endpoint path + """ + rawPath: String! + + """ + Blob content rich viewer + """ + richViewer: SnippetBlobViewer + + """ + Blob content simple viewer + """ + simpleViewer: SnippetBlobViewer! + + """ + Blob size + """ + size: Int! +} + +""" +Represents how the blob content should be displayed +""" +type SnippetBlobViewer { + """ + Shows whether the blob should be displayed collapsed + """ + collapsed: Boolean! + + """ + Content file type + """ + fileType: String! + + """ + Shows whether the blob content is loaded async + """ + loadAsync: Boolean! + + """ + Loading partial name + """ + loadingPartialName: String! + + """ + Error rendering the blob content + """ + renderError: String + + """ + Shows whether the blob too large to be displayed + """ + tooLarge: Boolean! + + """ + Type of blob viewer + """ + type: BlobViewersType! +} + +""" The connection type for Snippet. """ type SnippetConnection { diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index 6239a398c7e..645df8c0184 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -6275,8 +6275,8 @@ "deprecationReason": null }, { - "name": "content", - "description": "Content of the snippet", + "name": "blob", + "description": "Snippet blob", "args": [ ], @@ -6284,8 +6284,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "SnippetBlob", "ofType": null } }, @@ -7005,6 +7005,311 @@ "possibleTypes": null }, { + "kind": "OBJECT", + "name": "SnippetBlob", + "description": "Represents the snippet blob", + "fields": [ + { + "name": "binary", + "description": "Shows whether the blob is binary", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "highlightedData", + "description": "Blob highlighted data", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Blob name", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": "Blob path", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rawPath", + "description": "Blob raw content endpoint path", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "richViewer", + "description": "Blob content rich viewer", + "args": [ + + ], + "type": { + "kind": "OBJECT", + "name": "SnippetBlobViewer", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "simpleViewer", + "description": "Blob content simple viewer", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SnippetBlobViewer", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "size", + "description": "Blob size", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SnippetBlobViewer", + "description": "Represents how the blob content should be displayed", + "fields": [ + { + "name": "collapsed", + "description": "Shows whether the blob should be displayed collapsed", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileType", + "description": "Content file type", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "loadAsync", + "description": "Shows whether the blob content is loaded async", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "loadingPartialName", + "description": "Loading partial name", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "renderError", + "description": "Error rendering the blob content", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tooLarge", + "description": "Shows whether the blob too large to be displayed", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Type of blob viewer", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "BlobViewersType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "BlobViewersType", + "description": "Types of blob viewers", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "rich", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "simple", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "auxiliary", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { "kind": "ENUM", "name": "VisibilityScopesEnum", "description": null, diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 72fc82444ca..6696863faff 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -926,15 +926,44 @@ Represents a snippet entry | `project` | Project | The project the snippet is associated with | | `author` | User! | The owner of the snippet | | `fileName` | String | File Name of the snippet | -| `content` | String! | Content of the snippet | | `description` | String | Description of the snippet | | `visibilityLevel` | VisibilityLevelsEnum! | Visibility Level of the snippet | | `createdAt` | Time! | Timestamp this snippet was created | | `updatedAt` | Time! | Timestamp this snippet was updated | | `webUrl` | String! | Web URL of the snippet | | `rawUrl` | String! | Raw URL of the snippet | +| `blob` | SnippetBlob! | Snippet blob | | `descriptionHtml` | String | The GitLab Flavored Markdown rendering of `description` | +## SnippetBlob + +Represents the snippet blob + +| Name | Type | Description | +| --- | ---- | ---------- | +| `highlightedData` | String | Blob highlighted data | +| `rawPath` | String! | Blob raw content endpoint path | +| `size` | Int! | Blob size | +| `binary` | Boolean! | Shows whether the blob is binary | +| `name` | String | Blob name | +| `path` | String | Blob path | +| `simpleViewer` | SnippetBlobViewer! | Blob content simple viewer | +| `richViewer` | SnippetBlobViewer | Blob content rich viewer | + +## SnippetBlobViewer + +Represents how the blob content should be displayed + +| Name | Type | Description | +| --- | ---- | ---------- | +| `type` | BlobViewersType! | Type of blob viewer | +| `loadAsync` | Boolean! | Shows whether the blob content is loaded async | +| `collapsed` | Boolean! | Shows whether the blob should be displayed collapsed | +| `tooLarge` | Boolean! | Shows whether the blob too large to be displayed | +| `renderError` | String | Error rendering the blob content | +| `fileType` | String! | Content file type | +| `loadingPartialName` | String! | Loading partial name | + ## SnippetPermissions | Name | Type | Description | diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 1639029d193..8c284ae955d 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -312,7 +312,7 @@ function createComponent(props = {}) { `ApolloMutation` component exposes `mutate` method via scoped slot. If we want to test this method, we need to add it to mocks: ```javascript -const mutate = jest.fn(() => Promise.resolve()); +const mutate = jest.fn().mockResolvedValue(); const $apollo = { mutate, }; diff --git a/doc/development/sidekiq_style_guide.md b/doc/development/sidekiq_style_guide.md index 77663b0bb29..062a3e13c39 100644 --- a/doc/development/sidekiq_style_guide.md +++ b/doc/development/sidekiq_style_guide.md @@ -17,8 +17,11 @@ would be `process_something`. If you're not sure what queue a worker uses, you can find it using `SomeWorker.queue`. There is almost never a reason to manually override the queue name using `sidekiq_options queue: :some_queue`. -You must always add any new queues to `app/workers/all_queues.yml` or `ee/app/workers/all_queues.yml` -otherwise your worker will not run. +After adding a new queue, run `bin/rake +gitlab:sidekiq:all_queues_yml:generate` to regenerate +`app/workers/all_queues.yml` or `ee/app/workers/all_queues.yml` so that +it can be picked up by +[`sidekiq-cluster`](../administration/operations/extra_sidekiq_processes.md). ## Queue Namespaces diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md index 2672b0f3461..cd1dabb6ef4 100644 --- a/doc/user/application_security/sast/index.md +++ b/doc/user/application_security/sast/index.md @@ -207,7 +207,8 @@ variables: If your project requires custom build configurations, it can be preferable to avoid compilation during your SAST execution and instead pass all job artifacts from an -earlier stage within the pipeline. +earlier stage within the pipeline. This is the current strategy when requiring +a `before_script` execution to prepare your scan job. To pass your project's dependencies as artifacts, the dependencies must be included in the project's working directory and specified using the `artifacts:path` configuration. |