[go: nahoru, domu]

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

[21.09] fix JobWrapper: use correct fail method #14235

Draft
wants to merge 9 commits into
base: release_21.09
Choose a base branch
from

Conversation

bernt-matthias
Copy link
Contributor
@bernt-matthias bernt-matthias commented Jun 30, 2022

Add a test case and fix the job wrapper.

Since recently planemo was changed to use outputs_to_working_directory this branch of the code was used which used the wrong fail method. The consequence was that exit code, etc was lost.

fixes #14206

supersedes #14210

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

@github-actions github-actions bot added this to the 22.01 milestone Jun 30, 2022
@bernt-matthias bernt-matthias changed the title [21.09] fix for tools deleting output datasets [21.09] fix JobWrapper: use correct fail method Jul 1, 2022
if the JobWrapper.fail method is called directly exit code (etc)
are lost.

fixes galaxyproject#14206

not sure why this error popped up now, probably a change in
tool verification ..?
@bernt-matthias
Copy link
Contributor Author

I added a branch in the code to check for the existence of the output files in any case (i.e. also if outputs_to_working_directory is not enabled or the extended metadata strategy is not used). So jobs should fail in any case if an output is absent.

Lets see if this has side effects

@bernt-matthias
Copy link
Contributor Author

OK. There are side effects: in a non outputs_to_working setting (like the framework and api tests) the output may also be purged by the user and the job should not fail by this.

So I reverted and removed the test tool from the framework test.

Question: Would something like 131576f with an additional check if the dataset has been purged (no idea how to access the dataset here) be of interest?

@bernt-matthias
Copy link
Contributor Author

Could need some help here.

  • The integration test fails if the tool is not in the test tool config
  • if the tool is included in the tool config file then the framework test fails (see previous commits), because in a non outputs_to_working setting tools deleting outputs are tolerated (one would need to distinguish it from users deleting outputs)

I guess we should have framework and integration tests and something like 131576f.. Also to have the same behavior in both settings (outputs_to_working one outputs to galaxy's files dir).

@bernt-matthias bernt-matthias added the help wanted also "hacktoberfest", beginner friendly set of issues label Aug 7, 2022
@mvdbeek
Copy link
Member
mvdbeek commented Aug 15, 2022

You could access the config settings in $__app__.config.outputs_to_working_directory and set the test outputs as needed, or you can remove the tool test itself and run the test programmatically via the API interactor.

@bernt-matthias
Copy link
Contributor Author
bernt-matthias commented Aug 15, 2022

Thanks @mvdbeek .. but wouldn't it be better to have identical results in both cases (standard / outputs_to_working_directory), i.e. jobs should fail if the output has been purged?

There seem to be so many cases, e.g. what happens if the user purges a dataset during the runtime of a job in a outputs_to_working_directory setting. Will the job finish method restore the file .. but Galaxy does not know about it?

@bernt-matthias
Copy link
Contributor Author

Maybe we should just mere the bugfix, i.e. the use of the correct fail method. And work on the test and everything else in a separate PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing/integration area/testing help wanted also "hacktoberfest", beginner friendly set of issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants