Skip to content

Commit 428f805

Browse files
authored
[Snyk and Cloudflare] Fix indefinite pagination (#3651)
* adding fixes for snyk and cloudflare for indefinite pagination * update changelog
1 parent 723c623 commit 428f805

7 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎packages/cloudflare/changelog.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.1.1"
3+
changes:
4+
- description: Fixing possible indefinite pagination
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/3651
27
- version: "2.1.0"
38
changes:
49
- description: Update package to ECS 8.3.0.

‎packages/cloudflare/data_stream/audit/agent/stream/httpjson.yml.hbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ response.split:
2929
response.pagination:
3030
- set:
3131
target: url.params.page
32-
value: '[[add .last_response.page 1]]'
32+
value: '[[if (ne (len .last_response.body.response) 0)]][[add .last_response.page 1]][[end]]'
3333
fail_on_template_error: true
3434

3535
cursor:

‎packages/cloudflare/manifest.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: cloudflare
22
title: Cloudflare
3-
version: "2.1.0"
3+
version: "2.1.1"
44
release: ga
55
description: Collect and parse logs from Cloudflare API with Elastic Agent.
66
type: integration

‎packages/snyk/changelog.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.3.1"
3+
changes:
4+
- description: Fixes possible indefinite pagination
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/3651
27
- version: "1.3.0"
38
changes:
49
- description: Update package to ECS 8.3.0.

‎packages/snyk/data_stream/audit/agent/stream/httpjson.yml.hbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ response.request_body_on_pagination: true
4545
response.pagination:
4646
- set:
4747
target: url.params.page
48-
value: '[[add .last_response.page 1]]'
48+
value: '[[if (ne (len .last_response.body.response) 0)]][[add .last_response.page 1]][[end]]'
4949
fail_on_template_error: true
5050
tags:
5151
{{#if preserve_original_event}}

‎packages/snyk/data_stream/vulnerabilities/agent/stream/httpjson.yml.hbs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ response.request_body_on_pagination: true
6969
response.pagination:
7070
- set:
7171
target: url.params.page
72-
value: '[[add .last_response.page 1]]'
72+
value: '[[if (ne (len .last_response.body.response) 0)]][[add .last_response.page 1]][[end]]'
7373
fail_on_template_error: true
7474

7575
response.split:

‎packages/snyk/manifest.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 1.0.0
22
name: snyk
33
title: "Snyk"
4-
version: "1.3.0"
4+
version: "1.3.1"
55
license: basic
66
description: "Collect logs from Snyk API with Elastic Agent."
77
type: integration

0 commit comments

Comments
 (0)