Skip to content

Commit

Permalink
Merge pull request #2557 from kuzzleio/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
rolljee authored Oct 21, 2024
2 parents dbc5168 + 1df5267 commit 7c0afc7
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .ci/scripts/check-error-codes-documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

echo "Checking error codes.."

mkdir codes
mkdir codes || true
npm run doc-error-codes -- --output codes

for f in doc/2/api/errors/error-codes/*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ index-dump/*
#doc framework
doc/framework
frontmatter-errors.json
codes/

#vscode
.vscode
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/create-my-credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Body:
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me/_create
Method: POST
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/credentials-exists/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer <authentication token>"
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me/_exists
Method: GET
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/delete-my-credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Headers: Authorization: "Bearer <authentication token>"
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me
Method: DELETE
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/get-current-user/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer <authentication token>"
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/users/_me
Method: GET
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/get-my-credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Headers: Authorization: "Bearer <authentication token>"
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me
Method: GET
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/get-my-rights/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Headers: Authorization: "Bearer <authentication token>"
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/users/_me/_rights
Method: GET
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/update-my-credentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Body:
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me/_update
Method: PUT
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/auth/update-self/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Body:
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/_updateSelf[?refresh=wait_for][?retryOnConflict=10]
Method: PUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Body:
```

<DeprecatedBadge version="2.4.0">

```http
URL: http://kuzzle:7512/credentials/<strategy>/_me/_validate
Method: POST
Expand Down
2 changes: 2 additions & 0 deletions doc/2/api/controllers/collection/update/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Body:
- `mappings`: [collection mappings](/core/2/guides/main-concepts/data-storage#mappings-properties)
- `reindexCollection`: boolean, if `true`, the collection will be reindexed after the update

<SinceBadge version="2.33.0"/>

---

## Response
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/document/m-update/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Body:
```

<DeprecatedBadge version="2.11.0">

```http
URL: http://kuzzle:7512/<index>/<collection>/_mUpdate[?refresh=wait_for][&retryOnConflict=<retries>][&silent]
Method: PUT
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/document/update/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Body:
```

<DeprecatedBadge version="2.11.0">

```http
URL: http://kuzzle:7512/<index>/<collection>/<_id>/_update[?refresh=wait_for][&retryOnConflict=<int>][&source][&silent]
Method: PUT
Expand Down
1 change: 1 addition & 0 deletions doc/2/api/controllers/document/upsert/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Body:
```

<DeprecatedBadge version="2.11.0">

```http
URL: http://kuzzle:7512/<index>/<collection>/<_id>/_upsert[?refresh=wait_for][&retryOnConflict=<int>][&source][&silent]
Method: PUT
Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/api/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x02: api | API | Core "
title: "0x02: api | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/cluster/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x08: cluster | API | Core "
title: "0x08: cluster | API | Core "
description: Error codes definitions
---

Expand Down
3 changes: 2 additions & 1 deletion doc/2/api/errors/error-codes/core/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x00: core | API | Core "
title: "0x00: core | API | Core "
description: Error codes definitions
---

Expand Down Expand Up @@ -66,6 +66,7 @@ description: Error codes definitions
### Subdomain: 0x0004: sandbox

<DeprecatedBadge version="2.0.0">

| id / code | class / status | message | description |
| --------- | -------------- | --------| ----------- |
| core.sandbox.process_already_running<br/><pre>0x00040001</pre> | [InternalError](/core/2/api/errors/error-codes#internalerror) <pre>(500)</pre> | A process is already running for this sandbox | A process is already running for this sandbox |
Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/network/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x03: network | API | Core "
title: "0x03: network | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/plugin/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x04: plugin | API | Core "
title: "0x04: plugin | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/protocol/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x06: protocol | API | Core "
title: "0x06: protocol | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/security/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x07: security | API | Core "
title: "0x07: security | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/services/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x01: services | API | Core "
title: "0x01: services | API | Core "
description: Error codes definitions
---

Expand Down
2 changes: 1 addition & 1 deletion doc/2/api/errors/error-codes/validation/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
code: true
type: page
title: "0x05: validation | API | Core "
title: "0x05: validation | API | Core "
description: Error codes definitions
---

Expand Down
14 changes: 7 additions & 7 deletions doc/2/framework/classes/backend-subscription/add/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ add(

<br/>

| Argument | Type | Description |
| ------------ | --------------------- | ------------------------------------------------------ |
| `connection` | <pre>Connection<pre> | Connection to register the subscription on |
| `index` | <pre>string</pre> | Index name |
| `collection` | <pre>string</pre> | Collection name |
| `filters` | <pre>JSONObject</pre> | Subscription filters |
| `options` | <pre>JSONObject</pre> | Subscription options (`volatile`, `scope` and `users`) |
| Argument | Type | Description |
| ------------ | ------------ | ------------------------------------------------------ |
| `connection` | `Connection` | Connection to register the subscription on |
| `index` | `string` | Index name |
| `collection` | `string` | Collection name |
| `filters` | `JSONObject` | Subscription filters |
| `options` | `JSONObject` | Subscription options (`volatile`, `scope` and `users`) |

## Usage

Expand Down
4 changes: 2 additions & 2 deletions doc/2/guides/elasticsearch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
code: false
type: branch
order: 400
title: Develop on Kuzzle | Guide | Core
title: Elasticsearch | Guide | Core
meta:
- name: description
content: Write custom backend code for Kuzzle
content: Explore how Kuzzle works with Elasticsearch
- name: keywords
content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, opensource, Develop on Kuzzle
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
code: false
type: page
order: 50
title: Elasticsearch 8 | Develop on Kuzzle | Guide | Core
title: Migrate to Elasticsearch 8 | Elasticsearch | Guide | Core
meta:
- name: description
content: Extend Kuzzle API with controllers and actions
content: Migrate your Kuzzle project from Elasticsearch 7 to Elasticsearch 8
- name: keywords
content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, iot, backend, opensource, API Controllers
---

# Migrate a project from Elasticsearch 7 to Elasticsearch 8

<SinceBadge version="2.30.0"/>
<SinceBadge version="2.32.0"/>

Kuzzle relies on Elasticsearch as a [NoSQL document store](/core/2/guides/main-concepts/data-storage).

Expand All @@ -26,12 +26,12 @@ The default major version of Elasticsearch will be 7 until the next major versio

## How to setup your project to use Elasticsearch 8

### Setup Kuzzle to use Elasticsearch 8
### Setup Kuzzle to use Elasticsearch 8

#### Upgrade the npm package
First you need to upgrade you Kuzzle package to version `>= 2.30.0-es8` in the `package.json` file. Then run `npm install` to upgrade the packages for you application.

### Configure Kuzzle
### Configure Kuzzle
A new configuration key `majorVersion` has been introduced ine the `storageEngine` section to allow the selection of the Eleasticsearch version you want to support for your project.

When not specified, it will be considered to be version 7, specify 8 if you want to switch Kuzzle to support Elasticasearch 8.
Expand All @@ -53,7 +53,7 @@ You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle
:::

:::info
Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time.
Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time.
:::

Once the version is set to 8, Kuzzle will use the Elasticsearch 8 API to communicate with the database.
Expand Down
14 changes: 7 additions & 7 deletions doc/2/guides/elasticsearch/v8/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
code: false
type: page
order: 100
title: Elasticsearch 8 | Develop on Kuzzle | Guide | Core
title: Elasticsearch 8 | Elasticsearch | Guide | Core
meta:
- name: description
content: Extend Kuzzle API with controllers and actions
content: Configure Kuzzle to use Elasticsearch 8
- name: keywords
content: Kuzzle, Documentation, kuzzle write pluggins, General purpose backend, iot, backend, opensource, API Controllers
---

# Elasticsearch 8

<SinceBadge version="2.30.0"/>
<SinceBadge version="2.32.0"/>

Kuzzle uses Elasticsearch as a [NoSQL document store](/core/2/guides/main-concepts/data-storage).

Expand All @@ -22,13 +22,13 @@ Kuzzle exposes the [Elasticsearch Query Language](/core/2/guides/main-concepts/q

The support of Elasticsearch 8 has been introduced in Kuzzle 2.30.0.

The choice has been made to keep Kuzzle compatible to avoid breaking changes around the support of ES8.
The choice has been made to keep Kuzzle compatible to avoid breaking changes around the support of ES8.

We wanted to allow the user to **opt-in** for this feature, so no modification is needed on your behalf if you want to keep using Elasticsearch 7.

The default major version of Elasticsearch will be 7 until Kuzzle v3.

The new configuration key to change the version supported is available under:
The new configuration key to change the version supported is available under:

```json
{
Expand All @@ -41,11 +41,11 @@ The new configuration key to change the version supported is available under:
```

:::warning
You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle that does not support it.
You can not set the `majorVersion` key to 8 if you are using a version of Kuzzle that does not support it.
:::

:::info
Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time.
Kuzzle cannot connect to both Elasticsearch 7 and Elasticsearch 8 at the same time.
:::

Once the version is set to 8, Kuzzle will use the Elasticsearch 8 API to communicate with the database.
Expand Down
7 changes: 4 additions & 3 deletions doc/2/guides/write-plugins/old-guides/pipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
code: false
type: page
order: 300
title: Pipes | Old Guides | Write plugins | Guide
title: Pipes | Old Guides | Write plugins | Guide
meta:
- name: description
content: Pipes are functions plugged to events, called synchronously by Kuzzle, and receiving information regarding that event.
Expand All @@ -24,8 +24,9 @@ Pipes can:
- Decide to abort a task. If a pipe throws an error, Kuzzle interrupts the task, and forwards a standardized version of the thrown error to the originating user
- Change the received information. Kuzzle will use the updated information upon resuming the task

<DeprecatedBadge version="2.2.0"/>
Before Kuzzle 2.2.0, if a pipe takes too long to respond, Kuzzle will eventually abort the user request with a [GatewayTimeout](/core/2/api/errors/types) error.
<DeprecatedBadge version="2.2.0">

Before Kuzzle 2.2.0, if a pipe takes too long to respond, Kuzzle will eventually abort the user request with a [GatewayTimeout](/core/2/api/errors/types) error.

Note that while Kuzzle respond early with a Timeout error to users, the pipe task is still continuing.

Expand Down
4 changes: 2 additions & 2 deletions doc/build-error-codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getHeader (title) {
return `---
code: true
type: page
title: "${title} | API | Core "
title: "${title} | API | Core "
description: Error codes definitions
---
Expand Down Expand Up @@ -122,7 +122,7 @@ function buildErrorCodes (name) {
doc += `\n\n### Subdomain: 0x${buffer.toString('hex', 2)}: ${subname}\n\n`;

if (subdomain.deprecated) {
doc += `<DeprecatedBadge version="${subdomain.deprecated}">\n`;
doc += `<DeprecatedBadge version="${subdomain.deprecated}">\n\n`;
}

doc += '| id / code | class / status | message | description |\n';
Expand Down

0 comments on commit 7c0afc7

Please sign in to comment.