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

[23.0] Fix upload paramfile handling (for real user setups) #16504

Merged

Conversation

bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Aug 2, 2023

the paramfile is created by galaxy.tools.actions.upload_common.create_paramfile() and stored in database/tmp/upload_params_TMPNAME with mode 600 (it's created with tmpfile, i.e. the mode is independent of the used umask).

galaxy.jobs.MinimalJobWrapper.__prepare_upload_paramfile() copies this file to the jow working dir.

Without the change ToolEvaluator.build_param_dict() sets the paramfile to the file in the jow working dir, but it is overwritten immediately by the value in incoming.

The original implementation should make no difference for non-real user setups, but real user setups break because the users can't read the paramfile in database/tmp/.

I noticed this for an upload to a library (which apparently still uses the old upload tool and not data fetch).

Was thinking if its possible to fix the value in incoming, or just use a config file from the start. But I was unsure how and went for the quick and dirty fix.

I'm targeting 23.0 because it's the release I'm currently using.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

the paramfile is created by `galaxy.tools.actions.upload_common.create_paramfile()`
and stored in `database/tmp/upload_params_TMPNAME` with mode 600 (it's
created with tmpfile, i.e. the mode is independent of the used umask).

`galaxy.jobs.MinimalJobWrapper.__prepare_upload_paramfile()` copies this
file to the jow working dir.

Without the change `ToolEvaluator.build_param_dict()` sets the paramfile
to the file in the jow working dir, but it is overwritten immediately
by the value in `incoming`.
@mvdbeek mvdbeek merged commit 1ad4986 into galaxyproject:release_23.0 Aug 9, 2023
34 of 36 checks passed
@bernt-matthias bernt-matthias deleted the fix/upload-param-file branch August 21, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants