-
Notifications
You must be signed in to change notification settings - Fork 2
feat: indicate supported platforms when checking a session image #1101
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
base: main
Are you sure you want to change the base?
Conversation
|
You can access the deployment of this PR at https://renku-ci-ds-1101.dev.renku.ch |
Pull Request Test Coverage Report for Build 19145569596Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| user=user, | ||
| internal_gitlab_user=internal_gitlab_user, | ||
| connected_svcs_repo=connected_svcs_repo, | ||
| # connected_svcs_repo=connected_svcs_repo, |
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.
Why not just remove it ? (repeat for the same changes below)
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.
Ah yes, I didn't finish cleaning up the code changes.
| return status_code == 200 | ||
|
|
||
| async def image_check(self, image: Image) -> int: | ||
| async def image_check(self, image: Image, include_manifest: bool = False) -> tuple[int, httpx.Response]: |
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.
Might be a silly question but why not return only the httpx.Response ? The code must be extracted from it anyway.
Add a new field
platformsreturned when checking a session image withGET /api/data/sessions/images. The field may be returned when the image is accessible and will contain the list of supported platforms. If gathering this information fails, the field will simply not be present in the response.Example:
{ "accessible": true, "platforms": [ { "architecture": "amd64", "os": "linux" }, { "architecture": "arm64", "os": "linux", "variant": "v8" }, { "architecture": "ppc64le", "os": "linux" }, { "architecture": "s390x", "os": "linux" } ] }Implementation notes:
renku_data_services.notebooks.api.classes.imageandrenku_data_services.notebooks.image_check. This will be consolidated in the future inside a single Python module.renku_data_services.notebooks.ocimay seem redundant at present, but the existing image handling code will be refactored to be contained only in theocimodule./deploy