galaxyproject / pulsar

Distributed job execution application built for Galaxy
https://pulsar.readthedocs.io
Apache License 2.0
37 stars 50 forks source link

Remote staging does not respect paths #293

Closed gmauro closed 1 year ago

gmauro commented 2 years ago

Circos tool needs to use a file in the karyotype directory, Pulsar prepare correctly the path in the command line:

circos --version > /data/share/staging/33761204/outputs/COMMAND_VERSION 2>&1; mkdir -p circos/conf/ circos/data/ &&   cp '/data/share/staging/33761204/tool_files/karyotype/karyotype.mouse.mm9.txt' ...

but fails at the remote staging step, because it's not considering the karyotype folder:

{
  "remote_staging": {
    "setup": [
      {
        "name": "karyotype.mouse.mm9.txt",
        "type": "tool",
        "action": {
          "path": "/opt/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/iuc/circos/7f13dc906cb9/circos/karyotype/karyotype.mouse.mm9.txt",
          "source": {
            "path": "/opt/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/iuc/circos/7f13dc906cb9/circos/karyotype/karyotype.mouse.mm9.txt"
          },
          "action_type": "remote_transfer",
          "url": "https://usegalaxy.eu/_job_files?job_id=11ac94870d0bb33ab848c86c299a7d6a&job_key=b269333ccac1e914130a3c7906c59a4f&path=/opt/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/iuc/circos/7f13dc906cb9/circos/karyotype/karyotype.mouse.mm9.txt&file_type=tool"
        }
      },
      ...

in the end, the file karyotype.mouse.mm9.txt is copied into the tool_files directory without the karyotype folder

[centos@vgcn-it01-central-manager 33761204]$ ll tool_files/
total 24
-rw-r--r--. 1 centos centos   242 Nov 10 11:31 karyotype-colors.py
-rw-r--r--. 1 centos centos 17799 Nov 10 11:31 karyotype.mouse.mm9.txt

I am using pulsar-app==0.14.11

gmauro commented 2 years ago

this is the error message:

[centos@vgcn-it01-central-manager 33761204]$ cat stderr 
cp: can't stat '/data/share/staging/33761204/tool_files/karyotype/karyotype.mouse.mm9.txt': No such file or directory
mvdbeek commented 1 year ago

That should be fixed by https://github.com/galaxyproject/pulsar/pull/261 and https://github.com/mvdbeek/galaxy/blob/2f9b7212e076a5e19c43892c099f2118e4df2a97/lib/galaxy/tools/__init__.py#L236