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

feat: k6runner: improve error handling for k6 output #1063

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roobre
Copy link
Member

@roobre roobre commented Nov 25, 2024

Closes #1060

This pull requests brings a number of improvements to how the local k6 runner, mostly used in private probe context, handles errors from k6. Most prominently:

  • For errors that we can attribute to the script contents (user errors), it no longer returns nil, err (understood as "k6 could not be run"), but rather a response with a textual representation of the error, and the k6 output. This still causes the test to be marked as failed, but the error is reported to Loki and thus made visible.
  • Logs are now parsed and searched for specific strings that, in SM context, are considered fatal errors.
  • Limits are imposed on how many bytes will be read for log and metrics output. These are last-resort measures to prevent the whole payload to be rejected by mimir or loki if it is too big.

Based on #1061 as I want CI/CD to be able to run.

@roobre roobre force-pushed the port-runner branch 2 times, most recently from 41eaa1f to 856e47e Compare November 25, 2024 14:52
@roobre roobre changed the base branch from main to dockerfile-chromium-alpine November 25, 2024 14:52
Base automatically changed from dockerfile-chromium-alpine to main November 26, 2024 14:09
An error occurred while trying to automatically change base from dockerfile-chromium-alpine to main November 26, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backport cloud k6 runner improvements to k6 local runner
1 participant