tenable_io: fix flakey test and timestamp handling - #10940
Merged
Conversation
efd6
force-pushed
the
10626-tenable_io
branch
2 times, most recently
from
August 30, 2024 04:17
62867fb to
a98fc94
Compare
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
cc @efd6 |
|
efd6
marked this pull request as ready for review
August 30, 2024 04:45
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
This was referenced Sep 3, 2024
ShourieG
approved these changes
Sep 13, 2024
|
Package tenable_io - 3.2.1 containing this change is available at https://epr.elastic.co/search?package=tenable_io |
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 4, 2025
The comparison for determining whether the pagination had completed was based on the response's size and the batch size (via state.batch_size, but could also have been the response's params.size without difference in behaviour). This was not correct since the size value is the current response's result set and so may match the batch size even when the pagination is complete, in the case that total size mod batch size is zero. Instead keep a running tally of records returned throughout the pagination and compare this to the total count reported by the API. Also fix the test case so that the response matches the API docs.[1] The timestamps were being examined for their maximum by string comparison. This should approximately always work if the timestamp is formatted as RFC3339, but the timestamps are rendered as variable precision RFC3339, so make sure that the comparisons work by converting to timestamp values to obtain the maximum. [1]https://developer.tenable.com/reference/io-plugins-list
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 5, 2025
The comparison for determining whether the pagination had completed was based on the response's size and the batch size (via state.batch_size, but could also have been the response's params.size without difference in behaviour). This was not correct since the size value is the current response's result set and so may match the batch size even when the pagination is complete, in the case that total size mod batch size is zero. Instead keep a running tally of records returned throughout the pagination and compare this to the total count reported by the API. Also fix the test case so that the response matches the API docs.[1] The timestamps were being examined for their maximum by string comparison. This should approximately always work if the timestamp is formatted as RFC3339, but the timestamps are rendered as variable precision RFC3339, so make sure that the comparisons work by converting to timestamp values to obtain the maximum. [1]https://developer.tenable.com/reference/io-plugins-list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Proposed commit message
I don't now how it was working at all.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots