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

Improve surfaced errors to the console when API requests fail or workload is improperly configured #715

Open
IanHoang opened this issue Dec 19, 2024 · 1 comment
Labels
2.0.0 enhancement New feature or request good first issue Good for newcomers

Comments

@IanHoang
Copy link
Collaborator

Is your feature request related to a problem? Please describe

This error commonly occurs when an API request fails or when the workload is improperly configured. This error message is poorly configured and does not provide necessary details to debug. Users have to add logging statements in order to figure out what happened.

2024-12-18 19:56:27,458 -not-actor-/PID:20048 osbenchmark.benchmark ERROR Cannot run subcommand [execute-test].
Traceback (most recent call last):
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/benchmark.py", line 1024, in dispatch_sub_command
    execute_test(cfg, args.kill_running_processes)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/benchmark.py", line 746, in execute_test
    with_actor_system(test_execution_orchestrator.run, cfg)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/benchmark.py", line 773, in with_actor_system
    runnable(cfg)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/test_execution_orchestrator.py", line 381, in run
    raise e
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/test_execution_orchestrator.py", line 378, in run
    pipeline(cfg)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/test_execution_orchestrator.py", line 69, in __call__
    self.target(cfg)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/test_execution_orchestrator.py", line 314, in benchmark_only
    return execute_test(cfg, external=True)
  File "/workplace/mikeovi/opensearch-benchmark/osbenchmark/test_execution_orchestrator.py", line 273, in execute_test
    raise exceptions.BenchmarkError(result.message, result.cause)
osbenchmark.exceptions.BenchmarkError: Error in load generator [0]

Describe the solution you'd like

Add better error handling so that the error gets displayed to the user.

Describe alternatives you've considered

No response

Additional context

No response

@IanHoang IanHoang added enhancement New feature or request untriaged labels Dec 19, 2024
@IanHoang
Copy link
Collaborator Author

Similar to issue #447 but that one is specifically for errors related to Jinja2 formatting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.0 enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant