-
Notifications
You must be signed in to change notification settings - Fork 7
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
Jobsub subcomand parser and API interface #594
base: master
Are you sure you want to change the base?
Conversation
So this looks like a HUGE change, because code moved from the various jobsub_xxx scripts into lib/mains.py |
At this stage, lots of things work, but I need to run and clean up from the whole test suite. It's looking like around 10 test failures. So look for a few more changes before this is ready for prime time. |
Do you want to move the PR into draft status until it passes the tests, or do you think it's close enough at this point? |
I think it's about ready. The only test I don't see why it's failing is |
I'm not sure why the pylint is now failing though - it looks like import errors, but those worked before. I'll check that out as well. |
Well, I've gotten completely sidetracked here on to this condor_submit test; I'm going to leave it broken for now; its having trouble copying the output files back to where jobsub_fetchlog wants to find them, and then it's finding the wrong flavor of ifdhc, and getting lbrary link errors... I'm going to leave that broken for now and redo the submit files for that test separately. |
Alright - so should we go ahead and start reviewing this PR with an eye to fixing the condor_submit test before the next release? |
Yes please. The problems with the condor_submit test are longstanding; it was passing for the wrong reasons previously, and there are several issues to debug so that the job submitted by condor_submit is retrievable by jobsub_fetchlog without reusing the same file output directory, etc. |
So this latest push gets you the split-out mains/cmd.py, mains/submit.py and mains/fetchlog.py with the |
Subcommand Parser
You can now say "jobsub submit ..." instead of "jobsub_submit ..." and jobsub gives help for all the commands.
There is also a jobsub_api which you use by saying:
jobsub_call( [argv] , collect_ouput)
Which if you pass collect_ouput = True will return the commands output as a string, otherwise the output goes to stdout. There are some utility regexes to parse said output;a simple example follows: