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

--list-scenarios should work correctly when multiple templates are chained together #1919

Open
msmygit opened this issue Apr 9, 2024 · 0 comments

Comments

@msmygit
Copy link
Contributor

msmygit commented Apr 9, 2024

Describe the bug
When the scenario it is set as below in the workload file,

...
scenarios:
  default:
    rampup: >-
      run tags==block:rampup errors=counter,warn
      cycles===TEMPLATE(rampup_cycles,TEMPLATE(trainsize))
...

we are receiving an error as below when nb5 --list-scenarios is invoked,

/Users/madhavan.sridharan/Data/Tools/jdk/jdk-21.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -jar /Users/madhavan.sridharan/Data/Tools/nosqlbench/nb5/target/nb5-5.21.1-SNAPSHOT-jar-with-dependencies.jar --list-scenarios --show-stacktraces
    2064 ERROR [main] ERRORHANDLER Error from driver or included library: Error while getting workloads:Error while scanning path '/activities/milvus.yaml':Index 1 out of bounds for length 1
java.lang.RuntimeException: Error while getting workloads:Error while scanning path '/activities/milvus.yaml':Index 1 out of bounds for length 1
	at io.nosqlbench.engine.cli.NBCLIScenarios.printWorkloads(NBCLIScenarios.java:34)
	at io.nosqlbench.engine.cli.NBCLI.applyDirect(NBCLI.java:266)
	at io.nosqlbench.engine.cli.NBCLI.apply(NBCLI.java:123)
	at io.nosqlbench.engine.cli.NBCLI.main(NBCLI.java:103)
Caused by: java.lang.RuntimeException: Error while scanning path '/activities/milvus.yaml':Index 1 out of bounds for length 1
	at io.nosqlbench.engine.api.scenarios.NBCLIScenarioPreprocessor.filterForScenarios(NBCLIScenarioPreprocessor.java:349)
	at io.nosqlbench.engine.api.scenarios.NBCLIScenarioPreprocessor.getWorkloadsWithScenarioScripts(NBCLIScenarioPreprocessor.java:375)
	at io.nosqlbench.engine.cli.NBCLIScenarios.printWorkloads(NBCLIScenarios.java:32)
	... 3 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at io.nosqlbench.engine.api.scenarios.NBCLIScenarioPreprocessor.matchTemplates(NBCLIScenarioPreprocessor.java:425)
	at io.nosqlbench.engine.api.scenarios.NBCLIScenarioPreprocessor.filterForScenarios(NBCLIScenarioPreprocessor.java:326)
	... 5 more
    2071 ERROR [main] ERRORHANDLER cause (see stack trace for details):Error while scanning path '/activities/milvus.yaml':Index 1 out of bounds for length 1
Scenario stopped due to error. See logs for details.

Process finished with exit code 2

To Reproduce
See above.

What was Expected
--list-scenarios should work without any hiccups thereby listing the included driver's workload file to provide the output.

Additional context
Add any other context about the problem here.
OS: Everywhere
environment: Everywhere
version info (./nb --version or java -jar nb.jar --version): 5.21.1-preview

Screenshots, if applicable
n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant