Project

General

Profile

Actions

Bug #3822

closed

[Crunch] 'arv pipeline run ...' generates 'ERROR: duplicate key value violates unique constraint...' when submitting identical pipeline instance

Added by Abram Connelly over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
1.0

Description

When submitting a pipeline instance that hasn't changed, on a job that was successfull, with the --no-reuse flag, 'arv pipeline run..' gives an error. Here is the output:

abram@shell.9tee4:~/git/0-simple-pipeline/crunch_scripts$ ./register_and_run.sh 
pipline instance: 9tee4-d1hrv-z0g9bk4ufmj8dc3

2014-09-05 15:29:34 +0000 -- pipeline_instance 9tee4-d1hrv-z0g9bk4ufmj8dc3
housekeeper 9tee4-8i9sb-0d5tk145g7ruq9u queued 2014-09-05T15:29:34Z

2014-09-05 15:29:44 +0000 -- pipeline_instance 9tee4-d1hrv-z0g9bk4ufmj8dc3
housekeeper 9tee4-8i9sb-0d5tk145g7ruq9u {:done=>0, :running=>1, :failed=>0, :todo=>0}
arv-run-pipeline-instance 27160: names: Premeditated Jointing Mass Premeditated Jointing Mass
arv-run-pipeline-instance 27160: Creating collection {:owner_uuid=>"9tee4-tpzed-2l9nsfm4mgltv4c", :name=>"Output of housekeeper of Premeditated Jointing Mass at 2014-09-05T15:29:47Z", :portable_data_hash=>"578d963a442fb74245041510e4752a37+56", :manifest_text=>". 81bf5f50b0b4e661efe4f67f1394b45c+1641+Ab9b1c1afe0278ad845a7f8e71c4ced96c8d3cdf9@541c4bf2 0:1641:info.log\n"}

2014-09-05 15:29:55 +0000 -- pipeline_instance 9tee4-d1hrv-z0g9bk4ufmj8dc3
housekeeper 9tee4-8i9sb-0d5tk145g7ruq9u 578d963a442fb74245041510e4752a37+56
abram@shell.9tee4:~/git/0-simple-pipeline/crunch_scripts$ ./register_and_run.sh 
pipline instance: 9tee4-d1hrv-vdehm4nqjn59mxp
arv-run-pipeline-instance 27183: names: Premeditated Jointing Mass Premeditated Jointing Mass
arv-run-pipeline-instance 27183: Creating collection {:owner_uuid=>"9tee4-tpzed-2l9nsfm4mgltv4c", :name=>"Output of housekeeper of Premeditated Jointing Mass at 2014-09-05T15:29:47Z", :portable_data_hash=>"578d963a442fb74245041510e4752a37+56", :manifest_text=>". 81bf5f50b0b4e661efe4f67f1394b45c+1641+A97fc55f9cf4f78ea0dfdff10ecc2b30a60bbece4@541c4bf6 0:1641:info.log\n"}
/usr/local/rvm/gems/ruby-2.1.2/gems/arvados-0.1.20140905091847/lib/arvados.rb:243:in `api_exec': ["#<PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint \"collection_owner_uuid_name_unique\"\nDETAIL:  Key (owner_uuid, name)=(9tee4-tpzed-2l9nsfm4mgltv4c, Output of housekeeper of Premeditated Jointing Mass at 2014-09-05T15:29:47Z) already exists.\n>"] (Arvados::TransactionFailedError)
        from /usr/local/rvm/gems/ruby-2.1.2/gems/arvados-0.1.20140905091847/lib/arvados.rb:82:in `block (4 levels) in initialize'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/arvados-cli-0.1.20140905091847/bin/arv-run-pipeline-instance:588:in `block in run'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/arvados-cli-0.1.20140905091847/bin/arv-run-pipeline-instance:501:in `each'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/arvados-cli-0.1.20140905091847/bin/arv-run-pipeline-instance:501:in `run'
        from /usr/local/rvm/gems/ruby-2.1.2/gems/arvados-cli-0.1.20140905091847/bin/arv-run-pipeline-instance:748:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/arv-run-pipeline-instance:23:in `load'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/arv-run-pipeline-instance:23:in `<main>'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
        from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

The effective pipeline instance JSON is:

{
  "name": "Premeditated Jointing Mass",
  "state" : "RunningOnClient",
  "components": {
    "housekeeper": {
      "script_parameters": { "dummy" : "value" },
      "script_version": "0-simple-pipeline",
      "repository": "abram",
      "script": "systemInfo.py",
      "runtime_constraints" : { "docker_image" : "arvados/jobs-java-bwa-samtools" }
    }
  }
}

For completeness, here is the (relevant parts of the) 'register_and_run.sh' script:

#!/bin/bash
#

pt="systemInfo_instance.pipeline" 

template=` cat $pt | sed 's/"repository" *: *".*"/ "repository" : "'$USER'"/' `
ARVUUID=`arv pipeline_instance create --pipeline-instance "$template" | jq .uuid | sed 's/"//g' `
echo "pipline instance:" $ARVUUID
arv pipeline run --run-here --instance $ARVUUID
Actions #1

Updated by Peter Amstutz over 9 years ago

  • Target version set to 2014-09-17 sprint
Actions #2

Updated by Peter Amstutz over 9 years ago

  • Status changed from New to Resolved
  • Assigned To set to Peter Amstutz
Actions #3

Updated by Ward Vandewege over 9 years ago

  • Subject changed from 'arv pipeline run ...' generates 'ERROR: duplicate key value violates unique constraint...' when submitting identical pipeline instance to [Crunch] 'arv pipeline run ...' generates 'ERROR: duplicate key value violates unique constraint...' when submitting identical pipeline instance
  • Story points set to 1.0
Actions

Also available in: Atom PDF