-
Notifications
You must be signed in to change notification settings - Fork 474
[integrations][Cloudflare Logpull] - Fixed invalid time range issue #7726
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
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to bump the stack version to pick up the max
and min
functions.
packages/cloudflare/data_stream/logpull/_dev/test/system/test-default-config.yml
Show resolved
Hide resolved
@andrewkroh I've added a mock service that simulates the api constraints during system tests and resolved rest of the suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock server you added is helpful, but it's hard to prove the httpjson config is working correctly because it does not appear that the min/max range protections get exercised. So I think it would be good if we can find a way to test these cases.
packages/cloudflare/_dev/deploy/docker/logpull-mock-service/main.go
Outdated
Show resolved
Hide resolved
packages/cloudflare/_dev/deploy/docker/logpull-mock-service/main.go
Outdated
Show resolved
Hide resolved
packages/cloudflare/_dev/deploy/docker/logpull-mock-service/main.go
Outdated
Show resolved
Hide resolved
packages/cloudflare/data_stream/logpull/_dev/test/system/test-default-config.yml
Show resolved
Hide resolved
packages/cloudflare/_dev/deploy/docker/logpull-mock-service/main.go
Outdated
Show resolved
Hide resolved
packages/cloudflare/_dev/deploy/docker/logpull-mock-service/main.go
Outdated
Show resolved
Hide resolved
@andrewkroh resolved all the suggested changes, introduced a new test that works over 2 iterations so cursor value is used. Modified the server code to match a specific criteria for the new test case to validate cursor value. |
Package cloudflare - 2.20.0 containing this change is available at https://epr.elastic.co/search?package=cloudflare |
Type of change
What does this PR do?
This PR uses a certain time range constraint discussed here to address the issue. The main concept lies in the following time constraints :
The integration uses the above constraints while calculating the value of the start & end query params.
NOTE:
with a hit_count of 3 responses. The service sends a rolling response similar to elastic stream http servers.
Checklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues
Screenshots