Skip to content

Conversation

@leafty
Copy link
Member

@leafty leafty commented Nov 5, 2025

Add a new field platforms returned when checking a session image with GET /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:

curl 'https://<hostname>/api/data/sessions/images?image_url=node:24' | jq
{
  "accessible": true,
  "platforms": [
    {
      "architecture": "amd64",
      "os": "linux"
    },
    {
      "architecture": "arm64",
      "os": "linux",
      "variant": "v8"
    },
    {
      "architecture": "ppc64le",
      "os": "linux"
    },
    {
      "architecture": "s390x",
      "os": "linux"
    }
  ]
}

Implementation notes:

  • The current code related to handling of OCI images is split between renku_data_services.notebooks.api.classes.image and renku_data_services.notebooks.image_check. This will be consolidated in the future inside a single Python module.
  • The new renku_data_services.notebooks.oci may seem redundant at present, but the existing image handling code will be refactored to be contained only in the oci module.

/deploy

@RenkuBot
Copy link
Contributor

RenkuBot commented Nov 6, 2025

You can access the deployment of this PR at https://renku-ci-ds-1101.dev.renku.ch

@coveralls
Copy link

coveralls commented Nov 6, 2025

Pull Request Test Coverage Report for Build 19145569596

Warning: 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

  • 241 of 314 (76.75%) changed or added relevant lines in 12 files are covered.
  • 8 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.03%) to 86.819%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/notebooks/core_sessions.py 1 2 50.0%
components/renku_data_services/notebooks/blueprints.py 8 13 61.54%
components/renku_data_services/notebooks/oci/utils.py 13 46 28.26%
components/renku_data_services/notebooks/image_check.py 8 42 19.05%
Files with Coverage Reduction New Missed Lines %
components/renku_data_services/notebooks/image_check.py 1 41.38%
components/renku_data_services/repositories/utils.py 1 90.91%
components/renku_data_services/connected_services/core.py 3 78.38%
components/renku_data_services/crc/core.py 3 77.42%
Totals Coverage Status
Change from base Build 19133192028: -0.03%
Covered Lines: 23054
Relevant Lines: 26554

💛 - Coveralls

@leafty leafty marked this pull request as ready for review November 6, 2025 14:18
@leafty leafty requested review from a team, SalimKayal and sgaist as code owners November 6, 2025 14:18
user=user,
internal_gitlab_user=internal_gitlab_user,
connected_svcs_repo=connected_svcs_repo,
# connected_svcs_repo=connected_svcs_repo,
Copy link
Collaborator

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)

Copy link
Member Author

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.

@leafty leafty requested a review from sgaist November 6, 2025 18:17
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]:
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants