Skip to content

Commit 49fa95b

Browse files
authored
fix: dryrun api (#2237)
Signed-off-by: shuiyisong <[email protected]>
1 parent 57f0e74 commit 49fa95b

File tree

12 files changed

+30
-18
lines changed

12 files changed

+30
-18
lines changed

docs/reference/http-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Refer to the original Prometheus documentation for more information on the [Prom
224224
- **Paths**:
225225
- `/v1/ingest`
226226
- `/v1/pipelines/{pipeline_name}`
227-
- `/v1/pipelines/dryrun`
227+
- `/v1/pipelines/_dryrun`
228228
- **Methods**:
229229
- `POST` for ingesting logs and adding pipelines.
230230
- `DELETE` for deleting pipelines.

docs/user-guide/logs/manage-pipelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ transform:
233233
- field: time
234234
type: time
235235
index: timestamp
236+
'
236237
```
237238

238239
The pipeline configuration contains an error. The `gsub` Processor expects the `replacement` field to be a string, but the current configuration provides an array. As a result, the pipeline creation fails with the following error message:
@@ -268,6 +269,7 @@ transform:
268269
- field: time
269270
type: time
270271
index: timestamp
272+
'
271273
```
272274

273275
Now that the Pipeline has been created successfully, you can test the Pipeline using the `dryrun` interface.
@@ -280,7 +282,7 @@ We can test the Pipeline using the `dryrun` interface. We will test it with erro
280282

281283

282284
```bash
283-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
285+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
284286
-H "Content-Type: application/json" \
285287
-H "Authorization: Basic {{authentication}}" \
286288
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -292,7 +294,7 @@ The output indicates that the pipeline processing failed because the `gsub` Proc
292294
Let's change the value of the message field to a string type and test the pipeline again.
293295

294296
```bash
295-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
297+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
296298
-H "Content-Type: application/json" \
297299
-H "Authorization: Basic {{authentication}}" \
298300
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

i18n/zh/docusaurus-plugin-content-docs/current/reference/http-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ is_strict_mode = false
224224
- **路径**:
225225
- `/v1/ingest`
226226
- `/v1/pipelines/{pipeline_name}`
227-
- `/v1/pipelines/dryrun`
227+
- `/v1/pipelines/_dryrun`
228228
- **方法**:
229229
- `POST` 写入日志和添加 Pipeline。
230230
- `DELETE` 用于删除 Pipeline。

i18n/zh/docusaurus-plugin-content-docs/current/user-guide/logs/manage-pipelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ transform:
233233
- field: time
234234
type: time
235235
index: timestamp
236+
'
236237
```
237238

238239
Pipeline 配置存在错误。`gsub` processor 期望 `replacement` 字段为字符串,但当前配置提供了一个数组。因此,该 Pipeline 创建失败,并显示以下错误消息:
@@ -268,6 +269,7 @@ transform:
268269
- field: time
269270
type: time
270271
index: timestamp
272+
'
271273
```
272274

273275
此时 Pipeline 创建成功,可以使用 `dryrun` 接口测试该 Pipeline。
@@ -279,7 +281,7 @@ transform:
279281
**此接口仅仅用于测试 Pipeline 的处理结果,不会将日志写入到 GreptimeDB 中。**
280282

281283
```bash
282-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
284+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
283285
-H "Content-Type: application/json" \
284286
-H "Authorization: Basic {{authentication}}" \
285287
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -291,7 +293,7 @@ curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
291293
我们再将 message 字段的值修改为字符串类型,然后再次测试该 Pipeline。
292294

293295
```bash
294-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
296+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
295297
-H "Content-Type: application/json" \
296298
-H "Authorization: Basic {{authentication}}" \
297299
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

i18n/zh/docusaurus-plugin-content-docs/version-0.17/reference/http-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ is_strict_mode = false
224224
- **路径**:
225225
- `/v1/ingest`
226226
- `/v1/pipelines/{pipeline_name}`
227-
- `/v1/pipelines/dryrun`
227+
- `/v1/pipelines/_dryrun`
228228
- **方法**:
229229
- `POST` 写入日志和添加 Pipeline。
230230
- `DELETE` 用于删除 Pipeline。

i18n/zh/docusaurus-plugin-content-docs/version-0.17/user-guide/logs/manage-pipelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ transform:
233233
- field: time
234234
type: time
235235
index: timestamp
236+
'
236237
```
237238

238239
Pipeline 配置存在错误。`gsub` processor 期望 `replacement` 字段为字符串,但当前配置提供了一个数组。因此,该 Pipeline 创建失败,并显示以下错误消息:
@@ -268,6 +269,7 @@ transform:
268269
- field: time
269270
type: time
270271
index: timestamp
272+
'
271273
```
272274

273275
此时 Pipeline 创建成功,可以使用 `dryrun` 接口测试该 Pipeline。
@@ -279,7 +281,7 @@ transform:
279281
**此接口仅仅用于测试 Pipeline 的处理结果,不会将日志写入到 GreptimeDB 中。**
280282

281283
```bash
282-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
284+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
283285
-H "Content-Type: application/json" \
284286
-H "Authorization: Basic {{authentication}}" \
285287
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -291,7 +293,7 @@ curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
291293
我们再将 message 字段的值修改为字符串类型,然后再次测试该 Pipeline。
292294

293295
```bash
294-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
296+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
295297
-H "Content-Type: application/json" \
296298
-H "Authorization: Basic {{authentication}}" \
297299
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/http-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ is_strict_mode = false
224224
- **路径**:
225225
- `/v1/ingest`
226226
- `/v1/pipelines/{pipeline_name}`
227-
- `/v1/pipelines/dryrun`
227+
- `/v1/pipelines/_dryrun`
228228
- **方法**:
229229
- `POST` 写入日志和添加 Pipeline。
230230
- `DELETE` 用于删除 Pipeline。

i18n/zh/docusaurus-plugin-content-docs/version-1.0/user-guide/logs/manage-pipelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ transform:
233233
- field: time
234234
type: time
235235
index: timestamp
236+
'
236237
```
237238

238239
Pipeline 配置存在错误。`gsub` processor 期望 `replacement` 字段为字符串,但当前配置提供了一个数组。因此,该 Pipeline 创建失败,并显示以下错误消息:
@@ -268,6 +269,7 @@ transform:
268269
- field: time
269270
type: time
270271
index: timestamp
272+
'
271273
```
272274

273275
此时 Pipeline 创建成功,可以使用 `dryrun` 接口测试该 Pipeline。
@@ -279,7 +281,7 @@ transform:
279281
**此接口仅仅用于测试 Pipeline 的处理结果,不会将日志写入到 GreptimeDB 中。**
280282

281283
```bash
282-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
284+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
283285
-H "Content-Type: application/json" \
284286
-H "Authorization: Basic {{authentication}}" \
285287
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -291,7 +293,7 @@ curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
291293
我们再将 message 字段的值修改为字符串类型,然后再次测试该 Pipeline。
292294

293295
```bash
294-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
296+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
295297
-H "Content-Type: application/json" \
296298
-H "Authorization: Basic {{authentication}}" \
297299
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

versioned_docs/version-0.17/reference/http-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Refer to the original Prometheus documentation for more information on the [Prom
224224
- **Paths**:
225225
- `/v1/ingest`
226226
- `/v1/pipelines/{pipeline_name}`
227-
- `/v1/pipelines/dryrun`
227+
- `/v1/pipelines/_dryrun`
228228
- **Methods**:
229229
- `POST` for ingesting logs and adding pipelines.
230230
- `DELETE` for deleting pipelines.

versioned_docs/version-0.17/user-guide/logs/manage-pipelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ transform:
233233
- field: time
234234
type: time
235235
index: timestamp
236+
'
236237
```
237238

238239
The pipeline configuration contains an error. The `gsub` Processor expects the `replacement` field to be a string, but the current configuration provides an array. As a result, the pipeline creation fails with the following error message:
@@ -268,6 +269,7 @@ transform:
268269
- field: time
269270
type: time
270271
index: timestamp
272+
'
271273
```
272274

273275
Now that the Pipeline has been created successfully, you can test the Pipeline using the `dryrun` interface.
@@ -280,7 +282,7 @@ We can test the Pipeline using the `dryrun` interface. We will test it with erro
280282

281283

282284
```bash
283-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
285+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
284286
-H "Content-Type: application/json" \
285287
-H "Authorization: Basic {{authentication}}" \
286288
-d $'{"message": 1998.08,"time":"2024-05-25 20:16:37.217"}'
@@ -292,7 +294,7 @@ The output indicates that the pipeline processing failed because the `gsub` Proc
292294
Let's change the value of the message field to a string type and test the pipeline again.
293295

294296
```bash
295-
curl -X "POST" "http://localhost:4000/v1/pipelines/dryrun?pipeline_name=test" \
297+
curl -X "POST" "http://localhost:4000/v1/pipelines/_dryrun?pipeline_name=test" \
296298
-H "Content-Type: application/json" \
297299
-H "Authorization: Basic {{authentication}}" \
298300
-d $'{"message": "1998.08","time":"2024-05-25 20:16:37.217"}'

0 commit comments

Comments
 (0)