Skip to content

[Feature]: assigning an output sandbox to a job from the api #92

@aldbr

Description

@aldbr

User Story

As a user, I would like to access the output sandbox of my job without having to search within the sandbox store myself (see hack in https://github.com/DIRACGrid/dirac-cwl/compare/fix_flaky-test-for-good-i-hope?expand=1#diff-88189839261917680737ea6bc2d951e1231c6d3d3b07195b858e77ba1fb31ec3R278), so that I can really get my output sandbox by calling download_sandbox.

Feature Description

This needs design discussion.
We need to associate a given sandbox to a job in the job wrapper when we upload the results in the sandbox. There is already a diracx route for that:

https://github.com/DIRACGrid/diracx/blob/584d4e62a87d1b2ffbf739e80fe44f9c0fb92c9a/diracx-routers/src/diracx/routers/jobs/sandboxes.py#L132

Here are a few elements to take into account:

  • we need to get the job ID from the job wrapper. How do we pass it?
  • there is no diracx-api function to contact the diracx route in order to associate the sandbox to the job (we would need that), so we would need one.
  • there is also no diracx-api function to download a sandbox from a job id. We currently have a download_sandbox function that downloads outputs from a pfn. I am wondering if we should make a new one or simply reuse this one.

Then one would need to adapt the mock sandbox module for local execution.

Definition of Done

  • replace the provided test with the implemented mocked diracx-api functions
  • all other tests are passing
  • diracx-api tests for the new function if possible?

Alternatives Considered

No response

Related Issues

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions