-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add task-based history export tracking #14839
Add task-based history export tracking #14839
Conversation
d9c61df
to
39f3ce7
Compare
53aee09
to
452ef8b
Compare
452ef8b
to
0c170c7
Compare
0c170c7
to
b796f09
Compare
9186a4d
to
2a63069
Compare
cb66ca7
to
1bf07b6
Compare
b5cb932
to
cb19bd4
Compare
This one should be ready for review now 😃 I will keep it in draft mode because the integration test I plan to follow up too with some reactivity improvements once #15108 is ready, to refresh the state when the associated history changes but I would appreciate feedback on the UI and backend changes 🙏 |
cb19bd4
to
3489de7
Compare
8ea31bc
to
e35db6d
Compare
This is utterly wonderful - you're amazing! |
Thank you so much @jmchilton, you are the amazing one! :D |
1b510ad
to
59e9a1f
Compare
This is more explicit and consistent, also plays nicely with the client generated code. - Remove redundant docstring in service. - Update client generated schema.
And use the generated OpenAPI types.
Unfortunately the response is always inferred from the default content type 'application/json' so we need to change it to 'unknown' and the cast it to the expected type manually.
This selenium test is for testing the previous history export UI that is based on jobs and not tasks. Since Celery is enabled by default in the test instance it is more consistent to convert it into an integration selenium test to modify the config and disable Celery.
59e9a1f
to
e857985
Compare
This is finally green! :) Let me know if there is something I can further improve or fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely amazing work, thanks so much @davelopez!
Requires #15090 (To pass the remaining integration test failure)
Fixes #14511
Related to #14771
TLDR
This PR enables the tracking of every history export (and potentially any other exportable object) in the database by adding a new table containing structured metadata about the export context.
It also creates a new
HistoryExport
component in the UI that is based on the asynchronous task (Celery) system instead of the regular job system for handling exports and short-term downloads (#14511).Backend Changes
Adds a new
store_export_association
table to track any object export associated with a task. This table has anexport_metadata
column containing information about the export context (request and result) in a structured JSON (modeled with Pydantic objects).Adds a new
StoreExportTracker
class to associate export metadata with any exportable object.Refactors the
HistoryExportView
toHistoryExportManager
for managing the exports associated with histories.Adapts the
model_stores
to generate and associate the export metadata to history downloads and remote exports.Refactors the Tasks API to use an abstract
AsyncTaskManager
and the correspondingCeleryAsyncTaskManager
implementation to query tasks status.Modifies the
/api/histories/{id}/exports
endpoint to accept a new typeapplication/vnd.galaxy.task.export+json
that will return the new task-based export associations. It will continue returning the previous "JEHAs" using the default request accept type so it's backward compatible.Some other small refactorings for the schemas, removing unused code, etc.
Frontend Changes
Added several new components to display information on the last export and previous ones along with actions to download them again or re-import them from remote sources, or even choose the preferred archive format. They provide similar functionality as the previous components (that still are used when Celery is not enabled) and include a bit more related to the export tracking.
Choose Export Options
Now you can decide which export format and dataset files want to include in the archive.
Direct Download (Temporal)
When you use the direct download option, it will be reused (the package won't be regenerated) whenever you try to download it again until:
The download link expires
The history changes
The export parameter change
Export to Remote File Source (Long term)
When you export your history to a remote file source a reference will be stored in the record and you can reimport it later as long as the remote file source maintains the exported package.
![image](https://user-images.githubusercontent.com/46503462/203846392-6b9e8cad-ab1a-4709-9fbd-880a792a6cf5.png)
List of previous exports
You can download or reimport copies (snapshots) of previous versions of the history as long as they have not expired or the remote source maintains them.
![image](https://user-images.githubusercontent.com/46503462/203847316-3fc0b0c4-2cb6-44b0-a242-47431fc25e20.png)
TODO
How to test the changes?
(Select all options that apply)
License