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

Tool Shed 2.0 fixes #16825

Merged
merged 19 commits into from
Oct 20, 2023
Merged

Tool Shed 2.0 fixes #16825

merged 19 commits into from
Oct 20, 2023

Conversation

nsoranzo
Copy link
Member

@nsoranzo nsoranzo commented Oct 10, 2023

  • toolshed GitHub workflow fixes:
    • Remove duplicated cache key that prevented the tests from being run
    • Expand matrix to test all combinations on Python 3.7 and 3.11
    • Install node from setup-node action
  • Fix issues reported by yarn build
  • Explicitly add playwright to dev dependencies
  • Restore GET /api/categories/<encoded_id> and the deleted field in the response.
  • Add some type annotations.
  • Remove unused functions and re-exports.
  • Misc bug fixes.

A bunch of ToolShed tests are failing, but they were simply not being run previously.
We can either merge this and fix the failing tests in separate PRs, or use this PR to push the fixes, but I don't have time to look into them currently.

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.

@github-actions github-actions bot added this to the 23.2 milestone Oct 10, 2023
@jmchilton
Copy link
Member

Thanks for the fix - this is clearly a John problem and I will endeavor to find some time to fix up these tests.

- test-install-client: 'standalone'
python-version: '3.10'
shed-api: 'v2'
shed-browser: 'playwright'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was "attempting" to only testing a subset of configurations because I thought all against all on the these combinations would be too much testing for such a niche feature. Does this configuration double the number of tool shed tests we're running?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, from 4 to 8. If you think that some of these combinations are not worth to be run on both Python versions, I can redo the matrix to run them only on Python 3.7.

@nsoranzo
Copy link
Member Author

nsoranzo commented Oct 10, 2023

I initially messed up the second commit (fixed now), so the failing TS tests are actually much less.

Edit: The errors are all due to the randomly occurring playwright._impl._api_types.Error: Navigation interrupted by another one

@nsoranzo nsoranzo force-pushed the toolshed_wf_fixes branch 4 times, most recently from 1dbf66f to d6104c6 Compare October 18, 2023 16:15
@nsoranzo nsoranzo changed the title Toolshed GitHub workflow fixes Tool Shed 2.0 fixes Oct 18, 2023
Copy link
Member

@jdavcs jdavcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@jmchilton

This comment was marked as resolved.

@nsoranzo
Copy link
Member Author

nsoranzo commented Oct 19, 2023

@jmchilton Not sure if on purpose, but lib/tool_shed/test/functional/ is currently excluded from mypy testing. After changing:

diff --git a/mypy.ini b/mypy.ini
index fe479abe7d..f9212dbd4e 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -4,7 +4,11 @@ plugins = pydantic.mypy
 show_error_codes = True
 ignore_missing_imports = True
 check_untyped_defs = True
-exclude = lib/galaxy/tools/bundled|test/functional|.*tool_shed/test/test_data/repos
+exclude = (?x)(
+        ^lib/galaxy/tools/bundled
+        | ^test/functional
+        | .*tool_shed/test/test_data/repos
+    )
 pretty = True
 no_implicit_reexport = True
 no_implicit_optional = True

I get more than 800 mypy errors, even after some fixes added here.

Edit: To clarify, not planning to fix them all here, just a heads-up, will open a separate issue unless that was on purpose.

Introduced in commit 3238b21 .
Introduced in commit 70c7f03 .
Introduced in commit 68831dd .
Otherwise a `<GALAXY_ROOT>/database/toolshed_whoosh_indexes` would
be reused, leading to failing tests when running tests locally.
@nsoranzo
Copy link
Member Author

This is ready from my side, the failing TS tests are either:

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks a lot @nsoranzo!

@mvdbeek mvdbeek merged commit 8bac65f into galaxyproject:dev Oct 20, 2023
44 of 49 checks passed
@jmchilton
Copy link
Member

.*tool_shed/test/test_data/repos

These are legacy repo contents used for testing that used be locked in tar balls. The repositories I think shouldn't be updated. This isn't code we're maintaining - it is test data that should remain unchanged so we know we're doing the same things.

But maybe I've excluded too much?

@jmchilton
Copy link
Member

I'm going to go ahead and merge #16872 then - it looks good to me and it is needed for this.

@nsoranzo nsoranzo deleted the toolshed_wf_fixes branch October 20, 2023 14:43
@nsoranzo
Copy link
Member Author

.*tool_shed/test/test_data/repos

These are legacy repo contents used for testing that used be locked in tar balls. The repositories I think shouldn't be updated. This isn't code we're maintaining - it is test data that should remain unchanged so we know we're doing the same things.

But maybe I've excluded too much?

@jmchilton I think you've misread the diff in my comment above, .*tool_shed/test/test_data/repos is not changed, the important bit is adding ^ in front of test/functional, since otherwise that string is matched anywhere in the file path to be checked therefore excluding also lib/tool_shed/test/functional/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants