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

E2E Testing for Vector #823

Closed
mjnagel opened this issue Sep 25, 2024 · 6 comments
Closed

E2E Testing for Vector #823

mjnagel opened this issue Sep 25, 2024 · 6 comments
Assignees
Labels
ci Issues pertaining to CI / Pipelines / Testing enhancement New feature or request logging Issues related to the Logging stack (Loki/Promtail)
Milestone

Comments

@mjnagel
Copy link
Contributor

mjnagel commented Sep 25, 2024

E2E testing for Vector should only be run on the all package test only since it focuses on interactions between components - see #211 for some thoughts on this.

Initial thoughts on testing areas:

  • Input handling: Ensure that Vector is picking up the expected files (pod + node logs), possibly via the API?
  • Output handling: Ensure that Vector is able to ship to the destinations, possibly via the API or a test with Vector connected to MinIO and checking bucket contents?
  • Other testing: This is not super well defined but we should evaluate if there are other health endpoints or metrics that would be helpful to look at

Vector's API is not enabled by default so we may need to enable it in CI at minimum and use it to access some of these data points.

@mjnagel mjnagel added enhancement New feature or request ci Issues pertaining to CI / Pipelines / Testing logging Issues related to the Logging stack (Loki/Promtail) labels Sep 25, 2024
@mjnagel mjnagel modified the milestones: 0.29.0, 0.30.0 Sep 25, 2024
@noahpb
Copy link
Contributor

noahpb commented Oct 24, 2024

Evaluating the following:

  • GraphQL API should be healthy
  • Vector should be collecting node logs
  • Vector should be collecting pod logs
  • Loki Host sink should be receiving node logs
  • Loki Pod sink should be receiving pod logs
  • Vector should be able to ship logs to Loki

Noting that I will have to deploy a privileged pod to generate node logs as there are no node logs being generated by the time vector is deployed in CI. I will also have to expose a new zarf var on the vector package to toggle enabling the API.

@mjnagel
Copy link
Contributor Author

mjnagel commented Oct 24, 2024

Noting that I will have to deploy a privileged pod to generate node logs as there are no node logs being generated by the time vector is deployed in CI

This is surprising to me - there should be a very short log file for k3d startup?

@noahpb
Copy link
Contributor

noahpb commented Oct 24, 2024

Noting that I will have to deploy a privileged pod to generate node logs as there are no node logs being generated by the time vector is deployed in CI

This is surprising to me - there should be a very short log file for k3d startup?

There is - about a dozen lines. But from what I found in testing, vector only collects logs that were generated after it starts up. I could be missing something though. Maybe there's a parameter I can add that allows me to search back in time before it was deployed.

@noahpb
Copy link
Contributor

noahpb commented Oct 24, 2024

Discussed offline - found there is no need to manually generate node logs at this time.

@mjnagel
Copy link
Contributor Author

mjnagel commented Oct 24, 2024

Should also note - log generation for testing could be a good path if we want to test additional log scrape targets in the future, I've definitely seen similar tests in other projects where a pod will just generate some noise to ensure there is always something happening.

@noahpb
Copy link
Contributor

noahpb commented Nov 5, 2024

Noting here context - we switched the vector e2e tests to querying loki directly during the loki e2e tests. We noticed that it took a while for vector metrics to populate which was causing tests to fail. Running the tests from loki ensures that same cases are validated and gives vector adequate time to collect logs.

UnicornChance added a commit that referenced this issue Nov 5, 2024
## Description
Add E2E prometheus, loki, and vector testing. 

## Related Issues

Fixes #824 #823 #822 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed

---------

Co-authored-by: Rob Ferguson <[email protected]>
Co-authored-by: Noah <[email protected]>
Co-authored-by: Noah Birrer <[email protected]>
Co-authored-by: Micah Nagel <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@mjnagel mjnagel closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues pertaining to CI / Pipelines / Testing enhancement New feature or request logging Issues related to the Logging stack (Loki/Promtail)
Projects
None yet
Development

No branches or pull requests

2 participants