ThePrez / ServiceCommander-IBMi

Service Commander for IBM i
Apache License 2.0
41 stars 13 forks source link

[BUG] Doesn't allow job names with underscores #106

Closed JDubbTX closed 2 years ago

JDubbTX commented 2 years ago

Describe the bug won't allow sbmjob_jobname with underscore.

To Reproduce Had these options in my *.yml file:

check_alive: jobname check_alive_criteria: kafka_poc1

batch_mode: yes sbmjob_jobname: kafka_poc1 sbmjob_opts: JOBQ(QUSRNOMAX)

Expected behavior should submit the job with kafka_poc1, since kafka_poc1 is a valid job name.

Verbose output Run the command with the -v option and share the output here.

`~/oss/camel/borrower-history-service$ sc -v start camel Verbose mode enabled

Initializing service camel Loading yaml service definition from file /home/JWEIRIC9/.sc/services/camel.yml Performing operation 'START' on service 'camel' database says current time is 2022-02-09-08.02.51 using custom batch job name: kafka_poc1 Invalid custom job name 'KAFKA_POC1' specified java.lang.RuntimeException at jesseg.ibmi.opensource.SCException.(SCException.java:26) at jesseg.ibmi.opensource.OperationExecutor.validateJobName(OperationExe cutor.java:697) at jesseg.ibmi.opensource.OperationExecutor.startService(OperationExecut or.java:493) at jesseg.ibmi.opensource.OperationExecutor.execute(OperationExecutor.ja va:138) at jesseg.ibmi.opensource.ServiceCommander.performOperationsOnServices(S erviceCommander.java:217) at jesseg.ibmi.opensource.ServiceCommander.main(ServiceCommander.java:17 5)

jesseg.ibmi.opensource.SCException: Invalid custom job name 'KAFKA_POC1' specifi ed at jesseg.ibmi.opensource.OperationExecutor.validateJobName(OperationExe cutor.java:697) at jesseg.ibmi.opensource.OperationExecutor.startService(OperationExecut or.java:493) at jesseg.ibmi.opensource.OperationExecutor.execute(OperationExecutor.ja va:138) at jesseg.ibmi.opensource.ServiceCommander.performOperationsOnServices(S erviceCommander.java:217) at jesseg.ibmi.opensource.ServiceCommander.main(ServiceCommander.java:17 5) Caused by: java.lang.RuntimeException at jesseg.ibmi.opensource.SCException.(SCException.java:26) ... 5 more` Additional context

changing job name to kafkapoc1 resolved the issue

Add any other context about the problem here.

ThePrez commented 2 years ago

I'll work on this for the v1.1.1 release. Thanks!!