Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ local-registry: .env ## creates a local docker registry and configure simcore to
--publish 5000:5000 \
--volume $(LOCAL_REGISTRY_VOLUME):/var/lib/registry \
--name $(LOCAL_REGISTRY_HOSTNAME) \
registry:2)
registry:3.0.0)

# WARNING: environment file .env is now setup to use local registry on port 5000 without any security (take care!)...
@echo REGISTRY_AUTH=False >> .env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,23 @@ async def _basic_auth_registry_request(
)

session = get_client_session(app)
# Only accept docker distribution V1 registry protocol ,
# dv0 does not have v2 compatability here, but from registry>=3.0.0
# the v2 scheme is default...
# https://specs.opencontainers.org/image-spec/media-types/?v=v1.0.1
# https://distribution.github.io/distribution/spec/api/
response = await session.request(
method.lower(),
f"{request_url}",
auth=auth,
headers={
"Accept": ", ".join(
[
"application/vnd.oci.image.manifest.v1+json",
"application/vnd.oci.image.index.v1+json",
Comment on lines +86 to +87
Copy link
Contributor

Choose a reason for hiding this comment

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

Not fully convinced about this approach. What about addressing the issue in the code?
I think it's better to use the default version 2 spec instead of requesting the older one I would expect this one to get deprecated at some point.

log_level=ERROR | log_timestamp=2025-08-20 09:01:21,941 | log_source=simcore_service_director.registry_proxy:log_catch(575) | log_uid=None | log_oec=None | log_trace_id=0 | log_span_id=0 | log_msg=Unhandled exception:
Traceback (most recent call last):
  File "/home/scu/.venv/lib/python3.11/site-packages/servicelib/logging_utils.py", line 570, in log_catch
    yield
  File "/home/scu/.venv/lib/python3.11/site-packages/simcore_service_director/registry_proxy.py", line 449, in get_repo_details
    if image_details := await image_details_future:
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/scu/.venv/lib/python3.11/site-packages/simcore_service_director/registry_proxy.py", line 402, in get_image_details
    labels, image_manifest_digest = await get_image_labels(
                                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/scu/.venv/lib/python3.11/site-packages/simcore_service_director/registry_proxy.py", line 384, in get_image_labels
    v1_compatibility_key = json_loads(request_result["history"][0]["v1Compatibility"])
                                      ~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'history'

Copy link
Member Author

@mrnicegyu11 mrnicegyu11 Aug 20, 2025

Choose a reason for hiding this comment

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

The issue is addressed in the code ;) These are code-changes after all. In case you want to do it differently, feel free to take it over in case ;) I interpret your comment as that I should not quickly get this in (I would have done it this way) but wait for some others. Must I wait for Sylvain, or even Pedro?

]
)
},
**session_kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion services/docker-compose-ops-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: "3.7"
services:
registry:
image: registry:2
image: registry:3.0.0
container_name: registry
init: true
environment:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
registry:
image: registry:2
image: registry:3.0.0
restart: always
ports:
- "5000:5000"
Expand Down
Loading