Bug #3124

[API] Job creation 'filters' chokes on invalid commit hash

Added by Peter Amstutz almost 6 years ago. Updated almost 6 years ago.

Assigned To:
Brett Smith
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


I went to run a job which had an invalid commit hash in "minimum_script_version". Instead of reporting the error directly or ignoring the invalid hash, it fails downstream because the commit hash resolves to 'nil':

2014-06-30_15:02:13.08383 arv-run-pipeline-instance 4399: create job: ["#<ArgumentError: Invalid operand type 'NilClass' fo
r 'in' operator in filters>"] with attributes {:script=>"run-command", :script_parameters=>{:command=>["java", "-Xmx8g", "-
jar", "$(dir $(picard))/CreateSequenceDictionary.jar", "R=$(file $(fasta))", "O=$(basename $(fasta)).dict"], :fasta=>"27793
0109b2dfec9412d489332784605+2009/human_g1k_v37.fasta", :picard=>"88447c464574ad7f79e551070043f9a9+1970"}, :script_version=>
"master", :repository=>"arvados", :nondeterministic=>nil, :output_is_persistent=>false, :runtime_constraints=>{:docker_imag
e=>"arvados/jobs-bwa-samtools"}, :owner_uuid=>"4xphq-tpzed-d6gnynp5uioqnxo", :minimum_script_version=>"96023b1eb656979a4e0e
87f80818f23d23511c1e", :exclude_script_versions=>nil, :no_reuse=>nil}


#1 Updated by Peter Amstutz almost 6 years ago

  • Description updated (diff)

#2 Updated by Tom Clegg almost 6 years ago

  • Target version set to 2014-08-06 Sprint

#3 Updated by Tom Clegg almost 6 years ago

  • Subject changed from Job creation 'filters' chokes on invalid commit hash to [API] Job creation 'filters' chokes on invalid commit hash

#4 Updated by Tom Clegg almost 6 years ago

  • Category set to API

#5 Updated by Tom Clegg almost 6 years ago

  • Story points set to 1.0

#6 Updated by Brett Smith almost 6 years ago

  • Assigned To set to Brett Smith

The fix for #3195 (5c5cb0a2) may already address this. I'll redo the input to see what is currently reported and check in.

#7 Updated by Brett Smith almost 6 years ago

  • Status changed from New to Resolved

The fix from #3195 means the API server now ignores the invalid hash and creates the job. From the staging server:

>>> body = json.loads("""{"script":"run-command","script_parameters":{"command":["java","-Xmx8g","-jar","$(dir $(picard))/CreateSequenceDictionary.jar","R=$(file $(fasta))","O=$(basename $(fasta)).dict"],"fasta":"277930109b2dfec9412d489332784605+2009/human_g1k_v37.fasta","picard":"88447c464574ad7f79e551070043f9a9+1970"},"script_version":"master","repository":"arvados","nondeterministic":null,"output_is_persistent":false,"runtime_constraints":{"docker_image":"arvados/jobs-bwa-samtools"},"minimum_script_version":"96023b1eb656979a4e0e87f80818f23d23511c1e","exclude_script_versions":null,"no_reuse":null}""")
>>> try:
...     api.jobs().create(body=body).execute()
... except apiclient.errors.HttpError as error:
...     print error.content
{u'finished_at': None, u'runtime_constraints': {u'docker_image': u'arvados/jobs-bwa-samtools'}, u'nondeterministic': None, u'href': u'/jobs/4xphq-8i9sb-w6lecwflphizvxg', u'started_at': None, u'output_is_persistent': False, u'uuid': u'4xphq-8i9sb-w6lecwflphizvxg', u'script_version': u'b501fc456ccfe1d4b36107b8b10f43c91fa841b2', u'script': u'run-command', u'modified_by_user_uuid': u'4xphq-tpzed-oq7e2svcef4x7t0', u'modified_by_client_uuid': u'4xphq-ozdt8-7sfww9tghj44cc3', u'submit_id': None, u'priority': None, u'supplied_script_version': u'master', u'etag': u'c08xxlvqbaxnz2d9anlg3wpl', u'tasks_summary': {}, u'cancelled_at': None, u'repository': u'arvados', u'script_parameters': {u'picard': u'88447c464574ad7f79e551070043f9a9+1970', u'fasta': u'277930109b2dfec9412d489332784605+2009/human_g1k_v37.fasta', u'command': [u'java', u'-Xmx8g', u'-jar', u'$(dir $(picard))/CreateSequenceDictionary.jar', u'R=$(file $(fasta))', u'O=$(basename $(fasta)).dict']}, u'running': None, u'owner_uuid': u'4xphq-tpzed-oq7e2svcef4x7t0', u'log': None, u'cancelled_by_client_uuid': None, u'cancelled_by_user_uuid': None, u'docker_image_locator': u'9ba06cd09508ba03254f3e2e225fe297+882', u'kind': u'arvados#job', u'is_locked_by_uuid': None, u'success': None, u'created_at': u'2014-07-17T17:59:37Z', u'modified_at': u'2014-07-17T17:59:37Z', u'dependencies': [u'88447c464574ad7f79e551070043f9a9+1970', u'277930109b2dfec9412d489332784605+2009/human_g1k_v37.fasta'], u'output': None}

Since this was named as an acceptable outcome (and the chosen script_version is what you would expect from current arvados master), I'm closing this ticket.

Also available in: Atom PDF