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

cuesubmit behaviour on bad user input is a bit odd #199

Closed
donalm opened this issue Feb 13, 2019 · 3 comments
Closed

cuesubmit behaviour on bad user input is a bit odd #199

donalm opened this issue Feb 13, 2019 · 3 comments
Assignees

Comments

@donalm
Copy link
Contributor

donalm commented Feb 13, 2019

Not a pressing concern for me, but I wanted to log this:

The "Job Name:" label for the first field in the GUI will turn red when I enter a non-ascii, characters, e.g.:
"Beyoncé"
...but although it seems to recognise this is a problem, it still sends my submission request to the server. It doesn't however turn red when I enter a name containing whitespace.

On these conditions (and maybe others - haven't plumbed this), the job submission fails silently:

  • non-ascii in the job name (as noted above)
  • whitespace in the job name
  • the layer name has less than three characters

In each case I get tracebacks, which I'll add below, but nothing notifies the user that the submission failed, and (as a result) no explanation of what went wrong.

ascii:

Traceback (most recent call last):
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/ui/Submit.py", line 305, in submit
    jobs = Submission.submitJob(jobData)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/Submission.py", line 100, in submitJob
    return cuerun.launch(outline, use_pycuerun=False)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 94, in launch
    return launcher.launch(use_pycuerun)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 208, in launch
    self.setup()
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 200, in setup
    self.__outline.setup()
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/loader.py", line 425, in setup
    self.__session.save()
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/session.py", line 164, in save
    fp.write(self.__name)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 40: ordinal not in range(128)

short layer names:

Traceback (most recent call last):
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/ui/Submit.py", line 305, in submit
    jobs = Submission.submitJob(jobData)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/Submission.py", line 100, in submitJob
    return cuerun.launch(outline, use_pycuerun=False)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 94, in launch
    return launcher.launch(use_pycuerun)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 209, in launch
    return self.__get_backend_module().launch(self, use_pycuerun=use_pycuerun)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/backend/cue.py", line 105, in launch
    jobs = opencue.api.launchSpecAndWait(launcher.serialize(use_pycuerun=use_pycuerun))
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pycue/opencue/util.py", line 51, in _decorator
    .format(details))
opencue.exception.CueInternalErrorException: Server caught an internal exception.Failed to launch and add job: The layer name must be at least 3 characters.

Space in the job name:

Traceback (most recent call last):
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/ui/Submit.py", line 305, in submit
    jobs = Submission.submitJob(jobData)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/cuesubmit/cuesubmit/Submission.py", line 100, in submitJob
    return cuerun.launch(outline, use_pycuerun=False)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 94, in launch
    return launcher.launch(use_pycuerun)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/cuerun.py", line 209, in launch
    return self.__get_backend_module().launch(self, use_pycuerun=use_pycuerun)
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pyoutline/src/outline/backend/cue.py", line 105, in launch
    jobs = opencue.api.launchSpecAndWait(launcher.serialize(use_pycuerun=use_pycuerun))
  File "/mnt/software/dev/dmcmullan/OpenCueRepos/OpenCue/pycue/opencue/util.py", line 51, in _decorator
    .format(details))
opencue.exception.CueInternalErrorException: Server caught an internal exception.Failed to launch and add job: Failed to parse job spec XML, org.jdom.input.JDOMParseException: Error on line 1: Attribute value "name with spaces" of type NMTOKEN must be a name token.

Server side for that:

2019-02-13 13:20:40,512 ERROR grpc-default-executor-210 com.imageworks.spcue.servant.ManageJob - Failed to launch and add job.
com.imageworks.spcue.SpecBuilderException: Failed to parse job spec XML, org.jdom.input.JDOMParseException: Error on line 1: Attribute value "name with spaces" of type NMTOKEN must be a name token.
    at com.imageworks.spcue.service.JobSpec.parse(JobSpec.java:812)
    at com.imageworks.spcue.service.JobLauncher.parse(JobLauncher.java:71)
    at com.imageworks.spcue.servant.ManageJob.launchSpecAndWait(ManageJob.java:250)
    at com.imageworks.spcue.grpc.job.JobInterfaceGrpc$MethodHandlers.invoke(JobInterfaceGrpc.java:2694)
    at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
    at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
    at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
@gregdenton
Copy link
Collaborator

Thanks for logging this. I've run across some similar issues with the submission validation not being fully hooked up. I'll take a look into this.

@gregdenton gregdenton self-assigned this Feb 13, 2019
@gregdenton
Copy link
Collaborator

This same behavior applies the shot and layer name validation.

@gregdenton
Copy link
Collaborator

In PR #207, I've added a few validators and a step to run the field validation when hitting submit. If the fields are invalid, the submission is cancelled and a pop up is shown.
Awaiting review.

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

No branches or pull requests

2 participants