-
Notifications
You must be signed in to change notification settings - Fork 30
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
chore: Add new tests for chronicle exporter with http and grpc servers #2049
Merged
Conversation
This file contains 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
djaglowski
force-pushed
the
split-http-grpc-4
branch
from
December 16, 2024 16:05
d286ea1
to
0faa256
Compare
mrsillydog
reviewed
Dec 16, 2024
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.
Looks like some tests are failing, otherwise LGTM
Looks like it was an unrelated flaky test. Passed on a second run though. |
mrsillydog
approved these changes
Dec 16, 2024
dpaasman00
pushed a commit
that referenced
this pull request
Dec 16, 2024
djaglowski
added a commit
that referenced
this pull request
Dec 16, 2024
Caleb-Hurshman
pushed a commit
that referenced
this pull request
Dec 17, 2024
Caleb-Hurshman
pushed a commit
that referenced
this pull request
Dec 17, 2024
Caleb-Hurshman
pushed a commit
that referenced
this pull request
Dec 17, 2024
Caleb-Hurshman
added a commit
that referenced
this pull request
Dec 18, 2024
* chore: Update modules to v1.67.0 * fix: QRadar README typo (#2028) Fix README typo * fix: Shut down zombie goroutine in chronicleexporter (#2029) * Properly shut down chronicleexporter zombie goroutine * Fix lint * Fix the same problem for the GRPC workflow * ssapi mvp * lint * tls * WIP * ticker, other pr feedback * pagination functionality * break if results earlier than earliest_time * fix lint * check for earliest/latest in query * config unit tests * package comment * feat(chronicleexporter): Support dynamic namespace and ingestion labels (#1939) * add namespace and ingenstion logs initial commit * working except ingestion labels * ingestion labels from attributes * use proper log entry batch * namespace and ingestion logs no config overwrite * delete OverrideNamespace and OverrideIngestionLabeles * PR changes * fix unit tests * modify tests again * marshal changes * readme and namespace check * debug logs * rm unnecessary clauses * fix error wording * rm space * wip * client tests * checkpoint methods * WIP * functional checkpoint * debug logs, rm print * loadCheckpoint return error * splunk failure test * WIP * encode req body * stricter query validation * storage config test * lint, tidy * return error on export fail * tidy * receiver tests * receiver tests * lint * fix TestCheckpoint * rename structs * exporter fail test * fix search checkpointing * auth token * lint * fix struct name * rm prints, fix error messages * fix tests * default batch size * log end of export * readme * how-to * how-to example config * change how-to conf values * change test batch size * fix test case * fix client test * fix rebase errors * tidy * feat: Enforce request maximum size and number of logs (#2033) * feat: Enforce request maximum size and number of logs * Fix lint * Refactor to be more go-idiomatic * Update Chronicle exporter readme with new flags * fix: Delete empty values iterates through nested arrays (#2034) * delete empty values processor iterates through slices * log body implementation * pr review * initial feedback * chore: Minor cleanup of chronicle exporter names (#2046) * chore: Save component.TelemetrySettings on chronicle exporter (#2047) * chore: Minor cleanup of chronicle exporter names * chore: Chronicle exporter - save component.TelemetrySettings * safe shutdown() * chore: Localize chronicle exporter's metrics concerns (#2048) chore: Pull metrics-specific concerns into hostMetricsReporter * rm err checkk from time parsing * chore: Add debug logging (#2042) Add debug logging * chore: Add new tests for chronicle exporter with http and grpc servers (#2049) * ctx check, doc notes * chore: Rename to `bindplane-otel-collector` (#2043) * rename to bindplane-otel-collector * fix website links * update report card link * fix: Shut down zombie goroutine in chronicleexporter (#2029) * Properly shut down chronicleexporter zombie goroutine * Fix lint * Fix the same problem for the GRPC workflow * chore: Save component.TelemetrySettings on chronicle exporter (#2047) * chore: Minor cleanup of chronicle exporter names * chore: Chronicle exporter - save component.TelemetrySettings * chore: Localize chronicle exporter's metrics concerns (#2048) chore: Pull metrics-specific concerns into hostMetricsReporter * chore: Add new tests for chronicle exporter with http and grpc servers (#2049) * fix: Rebase cleanup (#2063) rebase cleanup * chore: separate http and grpc exporters (#2050) * fix: Shut down zombie goroutine in chronicleexporter (#2029) * Properly shut down chronicleexporter zombie goroutine * Fix lint * Fix the same problem for the GRPC workflow * ssapi mvp * initial feedback * chore: Save component.TelemetrySettings on chronicle exporter (#2047) * chore: Minor cleanup of chronicle exporter names * chore: Chronicle exporter - save component.TelemetrySettings * chore: Localize chronicle exporter's metrics concerns (#2048) chore: Pull metrics-specific concerns into hostMetricsReporter * chore: Add new tests for chronicle exporter with http and grpc servers (#2049) * chore: Save component.TelemetrySettings on chronicle exporter (#2047) * chore: Minor cleanup of chronicle exporter names * chore: Chronicle exporter - save component.TelemetrySettings * chore: Localize chronicle exporter's metrics concerns (#2048) chore: Pull metrics-specific concerns into hostMetricsReporter * chore: Add new tests for chronicle exporter with http and grpc servers (#2049) * fix: Shut down zombie goroutine in chronicleexporter (#2029) * Properly shut down chronicleexporter zombie goroutine * Fix lint * Fix the same problem for the GRPC workflow * fix rebase stuff --------- Co-authored-by: Dakota Paasman <[email protected]> Co-authored-by: Sam Hazlehurst <[email protected]> Co-authored-by: Ian Adams <[email protected]> Co-authored-by: Justin Voss <[email protected]> Co-authored-by: Daniel Jaglowski <[email protected]>
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.
Follows #2048, another step towards #2044
This PR mostly just adds tests, but a few minor changes are made to allow specific aspects of the code to be swapped out in those tests.
Regardless of protocol, a fake
tokenSource
function can be replaced, allowing us to bypass the loading of google credentials. Likewise, the endpoint is changed to point to the mock server. When using grpc, the dial opts are also changed to indicate no authentication. However, even with these changes the clients are real and actually exercised by the tests.When using http, the exporter correctly returns a permanent error on at least some error codes. More should be done here, but it is a start and can be validated by tests.
Finally, in writing these tests, I found a few error messages which should be simplified.
Overall, test coverage for the exporter is improved from about to 61% to 72%.