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

Update "local" flow for task collection #668

Closed
tcompa opened this issue Dec 5, 2024 · 2 comments · Fixed by #669
Closed

Update "local" flow for task collection #668

tcompa opened this issue Dec 5, 2024 · 2 comments · Fixed by #669

Comments

@tcompa
Copy link
Collaborator

tcompa commented Dec 5, 2024

With the next fractal-server release, we are introducing a breaking change in the POST /api/v2/task/collect/pip/ endpoint.

  1. In general, the endpoint will expect data instead of json, and it will be a multipart/form-data endpoint.
  2. For the case of a "pypi-based" collection (namely the one with e.g. `package="fractal-tasks-core") nothing else changes.
  3. For the case of a "local-wheel-file" based collection, there are other changes:
    • The package property of the request body must be unset, instead of pointing to the absolute path of the wheel file
    • The packge_version property of the request body must be unset (this was already a requirement)
    • The wheel file should be uploaded as part of the files object. An example (in Python) would be files = {"file": (wheel_file_name, wheel_file_contents, "application/zip")}

Currently available in https://github.com/fractal-analytics-platform/fractal-server/tree/2045-support-uploading-a-wheel-file-directly-for-task-collection

@tcompa
Copy link
Collaborator Author

tcompa commented Dec 5, 2024

A small addition:

When pinned_package_versions is set, it must be sent to the API as a JSON string, and not as a JSON object. This holds for both the pypi-based and the local-wheel-based collections.

@tcompa
Copy link
Collaborator Author

tcompa commented Dec 5, 2024

New docs, for the record
image

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

Successfully merging a pull request may close this issue.

1 participant