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

Combines legacy qv-pattern and advanced filter pattern in history index endpoint #17368

Merged
merged 6 commits into from
Feb 9, 2024

Conversation

guerler
Copy link
Contributor

@guerler guerler commented Jan 28, 2024

Requires #17282. This PR combines the legacy q/qv and the advanced filter history index endpoints as discussed in the backend group meeting. In a follow-up the q/qv endpoint parameters will be deprecated.

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.

@guerler guerler added kind/refactoring cleanup or refactoring of existing code, no functional changes area/API area/backend labels Jan 28, 2024
@guerler guerler force-pushed the grids_history_endpoint branch from eede752 to 1a4e129 Compare January 28, 2024 21:28
@guerler guerler marked this pull request as ready for review January 29, 2024 20:31
@github-actions github-actions bot added this to the 24.0 milestone Jan 29, 2024
@guerler guerler force-pushed the grids_history_endpoint branch from 26fbc2b to a3d7365 Compare January 30, 2024 20:58
@guerler guerler force-pushed the grids_history_endpoint branch from a3d7365 to 482fae5 Compare February 7, 2024 14:36
client/src/api/histories.ts Outdated Show resolved Hide resolved
Comment on lines +189 to +194
if search is None:
return self.service.index(
trans, serialization_params, filter_query_params, deleted_only=deleted, all_histories=all
)
else:
payload = HistoryIndexQueryPayload.construct(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't love this, I would have preferred an "adapter" step to try to convert those new query parameters to fit in the filter_query_params instead of the complete branching. Although I haven't checked if there is any limitation on this.
Anyway, I guess is better than having the extra route for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you, this is not very pretty. I think we have to decide wether to combine the two code paths or deprecate the legacy path moving forward. I would favor the latter, since this would also streamline the client request, which in the history panel, converts the modern search string to q/qv values as of right now.

Copy link
Member

Choose a reason for hiding this comment

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

If we go ahead with deprecating q/qv, it would be nice if the new syntax still supported queries that we currently expose in BioBlend, e.g.:

https://github.com/galaxyproject/bioblend/blob/main/bioblend/galaxy/histories/__init__.py#L135

Not saying that it doesn't, I just wanted to flag it.
Then BioBlend can transparently use one syntax or the other, depending on the Galaxy version.

lib/galaxy_test/api/test_histories.py Show resolved Hide resolved
@guerler guerler force-pushed the grids_history_endpoint branch from 81d87b2 to 482fae5 Compare February 8, 2024 20:42
@guerler guerler force-pushed the grids_history_endpoint branch from 482fae5 to 1cf5d8b Compare February 8, 2024 20:46
@guerler guerler merged commit 93b1cc4 into galaxyproject:dev Feb 9, 2024
54 of 55 checks passed
@guerler guerler deleted the grids_history_endpoint branch February 9, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API area/backend kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants