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

Scripted checks on private probes calling fail() do not result in test execution failure #1059

Open
peterschretlen opened this issue Nov 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@peterschretlen
Copy link
Contributor

peterschretlen commented Nov 22, 2024

Steps to reproduce:

Use this script:

import { fail } from 'k6';
 export default function() {
 fail("");
}

Create a scripted check using this script running on a private probe and a public probe.

Result: the tests running on the private probe will always pass. The tests running on the public probe will always fail (expected).

example logs from public probe

level=error  probe=Ohio  msg="Check failed" duration_seconds=0.08480728
 probe=Ohio  level=error msg="script did not execute successfully" error="fatal error occurred while running the script" errorCode=aborted
 probe=Ohio  time=2024-11-22T01:18:07Z level=error msg="GoError\n\tat go.k6.io/k6/js/modules/k6.(*K6).Fail-fm (native)\n\tat default (file:///script.k6:3:6(4))\n" executor=shared-iterations scenario=default source=stacktrace
 probe=Ohio  time=2024-11-22T01:18:07Z level=info msg="called failure" source=console
level=info  probe=Ohio  msg="Beginning check" type=scripted timeout_seconds=60

example logs from private probe

level=info  probe="nov 21 test"  msg="Check succeeded" duration_seconds=2.257529751
 probe="nov 21 test"  time=2024-11-22T01:17:59Z level=error msg="GoError\n\tat go.k6.io/k6/js/modules/k6.(*K6).Fail-fm (native)\n\tat default (file:///tmp/k6-runner534237818/322124267.js:3:6(4))\n" executor=shared-iterations scenario=default source=stacktrace
 probe="nov 21 test"  time=2024-11-22T01:17:59Z level=info msg="called failure" source=console
level=info  probe="nov 21 test"  msg="Beginning check" type=scripted timeout_seconds=60

Expected. The tests executions should also fail on the private probe.

This was tested on these private probe versions with the same result

  • grafana/synthetic-monitoring-agent:v0.24.0-0-g5e69f42a
  • grafana/synthetic-monitoring-agent:v0.29.5
@peterschretlen peterschretlen added the bug Something isn't working label Nov 22, 2024
@peterschretlen peterschretlen changed the title Scripted checks calling fail() do not result in test execution failure. Scripted checks calling fail() do not result in test execution failure Nov 22, 2024
@peterschretlen peterschretlen changed the title Scripted checks calling fail() do not result in test execution failure Scripted checks on private probes calling fail() do not result in test execution failure Nov 22, 2024
@devtony15
Copy link

hello, when can we expect the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants