Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filebeat] Fix httpjson page number initialization and docs #33400

Merged
merged 5 commits into from
Oct 19, 2022

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented Oct 19, 2022

What does this PR do?

Fixes an issue with the page number of .last_response.page that was making page numbers inconsistent between intervals.

First interval page numbers would go as: 0,1,2..., Subsequent calls would always be 1,2,3... instead, which caused issues when using conditions based on this value for some configurations.

This sets the defined behavior as 0,1,2... for all intervals and documents it as such, since is the assumption that was made in all affected integrations.

Why is it important?

Fixes pagination errors for Google Workspace integrations and others.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@marc-gr marc-gr added bug Filebeat Filebeat Team:Security-External Integrations backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport with mergify labels Oct 19, 2022
@marc-gr marc-gr requested a review from a team as a code owner October 19, 2022 07:59
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 19, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 19, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-19T08:53:18.170+0000

  • Duration: 70 min 14 sec

Test stats 🧪

Test Results
Failed 0
Passed 2281
Skipped 166
Total 2447

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@marc-gr marc-gr requested a review from efd6 October 19, 2022 08:53
@marc-gr marc-gr merged commit 229690b into elastic:main Oct 19, 2022
mergify bot pushed a commit that referenced this pull request Oct 19, 2022
(cherry picked from commit 229690b)

# Conflicts:
#	x-pack/filebeat/input/httpjson/input_test.go
#	x-pack/filebeat/input/httpjson/pagination.go
#	x-pack/filebeat/input/httpjson/request_test.go
@marc-gr marc-gr deleted the fix-httpjson-page branch October 19, 2022 10:42
mergify bot pushed a commit that referenced this pull request Oct 19, 2022
marc-gr added a commit that referenced this pull request Oct 19, 2022
marc-gr added a commit that referenced this pull request Oct 19, 2022
…ation and docs (#33401)

* [filebeat] Fix httpjson page number initialization and docs (#33400)

(cherry picked from commit 229690b)

Co-authored-by: Marc Guasch <[email protected]>
Co-authored-by: Marc Guasch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.5.0 Automated backport with mergify bug Filebeat Filebeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat google_workspace module uses same 'startTime' url param forever when response is paginated.
3 participants