Run local galaxy via gravity#1232
Conversation
7d20a94 to
4c2e268
Compare
1e5dd9d to
3eb9ce6
Compare
|
@mvdbeek The unit test failures are legit, I think you mention you already have fixes for them? |
|
I'm working on this, yes. |
|
Q: with this, we are dropping support for serving/testing on Galaxy pre 22.01, right? In that case, we should replace |
No, I will re-introduce the necessary parts. That shouldn't be a big deal, that was just for me to get started. |
d830e7d to
775000b
Compare
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
If a future / thread is in `time.sleep(1)` it can't be joined.
Galaxy will figure this out (dev wheels on dev), and since we don't use run_tests.sh we shouldn't need any dev wheels.
Previously only worked for test run via run_test.sh, should now work anywhere the option is included.
nsoranzo
left a comment
There was a problem hiding this comment.
Maybe we should pass the timeout to _run() as well, even if not used yet? Feel free to discard if it doesn't make sense!
| job_paths.append(test_case.job_path) | ||
| try: | ||
| run_response = self._run(runnable, job_path) | ||
| run_responses = self._run(runnables, job_paths) |
There was a problem hiding this comment.
| run_responses = self._run(runnables, job_paths) | |
| run_responses = self._run(runnables, job_paths, timeout=test_timeout) |
planemo/engine/interface.py
Outdated
| return run_responses | ||
|
|
||
| @abc.abstractmethod | ||
| def _run(self, runnable, job_path): |
There was a problem hiding this comment.
| def _run(self, runnable, job_path): | |
| def _run(self, runnable, job_path, timeout=None): |
| if self._ctx.verbose: | ||
| self._ctx.log("Running Galaxy with API configuration [%s]" % config.user_api_config) | ||
| run_response = execute(self._ctx, config, runnable, job_path, **self._kwds) | ||
| def _run(self, runnables, job_paths): |
There was a problem hiding this comment.
| def _run(self, runnables, job_paths): | |
| def _run(self, runnables, job_paths, timeout=None): |
|
It is used in planemo/planemo/engine/galaxy.py Line 49 in 36eb798 _run but that didn't look much better to me.
|
`problem_log` is an optional property that we only fill if we have galaxy logs.
|
It's green! |
| ) | ||
| action = "Testing tools" | ||
| return_code = run(ctx, cmd, config.env, action) | ||
| if return_code != 0 and kwds.get("update_test_data", False): |
There was a problem hiding this comment.
--update_test_data does not work when I test locally (seems to be no test for it)
There was a problem hiding this comment.
Support for this was always partial (no discovered datasets, breaks for contains, from_work_dir etc). How bad would it be to drop this for now and maybe re-implement later?
There was a problem hiding this comment.
I think it would be pretty bad to drop it permanently tbh. That option is quite useful.
If it can't go in this PR, I can re-implement it in a new PR (hopefully a more comprehensive version), but I think we shouldn't make a new release without it.
| return_code = run(ctx, cmd, config.env, action) | ||
|
|
||
| _check_test_outputs(xunit_report_file_tracker, structured_report_file_tracker) | ||
| test_results = test_structures.GalaxyTestResults( |
There was a problem hiding this comment.
This is no longer used but still in the code base... are we certain the stuff it is doing is being replicated in tool-util? Unfortunately this seems like a question for @jmchilton 😿.
| assert ( | ||
| float(tool_test_json["tests"][0]["data"]["time_seconds"]) <= 10 | ||
| ), "Test needed more than 10 sec but should time out after 1" | ||
| assert "Timed out after" in tool_test_json["tests"][0]["data"]["problem_log"], "Time out did not happen" |
There was a problem hiding this comment.
This scares me - these logs were being cleaned up and merged by code removed? This will cause a degradation in the reports? Again... a question for me...
There was a problem hiding this comment.
FWIW we dump that in https://github.com/mvdbeek/galaxy/blob/3aed09379875dc48610fbe86b897d03c6b74b143/lib/galaxy/tool_util/verify/interactor.py#L1271. So workflow tests or tests against external engines have used this for years at this point.
|
I remember now that one of the concerns I had at the time is that I'm not sure we're always correctly shutting down all processes managed by gravity ... unit tests seemed to leave me with lingering processes IIRC. |
|
Thanks for pushing us forward @mvdbeek - these are really really important changes and simplify things very nicely. |
This drops the
run_tests.shmode completely and leads to a lot of simplification of the code.