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

Propagate data export endpoints to webserver #7244

Conversation

bisgaard-itis
Copy link
Contributor

@bisgaard-itis bisgaard-itis commented Feb 18, 2025

What do these changes do?

  • Connects rpc endpoints in storage for exporting data with rest endpoints in webserver
  • Introduces "async job" terminology for jobs which are handled by the storage worker.
  • Refactors implementation of async jobs so they will be easier to ruse in the future.

Related issue/s

How to test

cd services/web
make install dev
cd tests/unit
python -m pytest with_dbs/03/test_storage_rpc.py

Dev-ops checklist

@bisgaard-itis bisgaard-itis self-assigned this Feb 18, 2025
@bisgaard-itis bisgaard-itis added a:storage issue related to storage service a:webserver issue related to the webserver service labels Feb 18, 2025
@bisgaard-itis bisgaard-itis added this to the Singularity milestone Feb 18, 2025
Copy link

@bisgaard-itis
Copy link
Contributor Author

The listing and start of a job could also be made generic. I think that this would be ideal in our situation.

This way we don't need to write each time a different RPC interface. We just provide a task name and its parameters.

It if cannot be started an error will be raised by the worker (which is fine).

That's a good point. I have moved the list_jobs endpoint to the generic implementation of the async jobs. Then I introduced filtering á la Docker (https://docs.docker.com/reference/api/engine/version/v1.47/#tag/Container/operation/ContainerList) which should be generic enough that we can have a single endpoint for different types of tasks. Concerning the endpoint for triggering a task, I am hesitant to move it to a generic implementation. The reasons are the exception types. I think on the client side (meaning the webserver here) it is useful that exceptions specific to what kind of error is going on can be propagated. That is quite specific to different types of tasks. So if OK with you I will leave it as is for now. We can always move later if you prefer.

There is one challenge which is still not entirely clear to me how to handle: Permission and access rights. From talking with Sylvain I think this should be handled in storage, but for that we might need to propagate more info from the webserver (e.g. project_ids)

@bisgaard-itis bisgaard-itis requested a review from GitHK February 19, 2025 20:47
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

one more thing and it should be all set

@bisgaard-itis bisgaard-itis requested a review from GitHK February 20, 2025 08:27
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

thanks a lot!

Copy link

@bisgaard-itis bisgaard-itis merged commit f7c8b53 into ITISFoundation:master Feb 21, 2025
93 of 95 checks passed
@bisgaard-itis bisgaard-itis deleted the 7197-add-zipping-endpoints-in-storage branch February 21, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:storage issue related to storage service a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support zipping in webserver (for frontend)
5 participants