Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Test adding oras command for shpc #17

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Test adding oras command for shpc #17

wants to merge 6 commits into from

Conversation

vsoch
Copy link
Contributor

@vsoch vsoch commented Jan 30, 2022

@alecbcs SHPC recently had the oras directive added to the container.yaml, meaning that a user can pull a singularity SIF directly from an OCI registry! Since it's an OCI registry entry and just a different artifact type, I'm thinking we can first try parsing it the same as docker. If that does not work we can skip for now. Should I use this branch to test shpc and verify if this works or not (I think this would be a good idea over blindly merging it!)

Signed-off-by: vsoch vsoch@users.noreply.github.com

This is an OCI registry entry, just a different artifact type, so I think
we can try parsing it the same as docker. If that does not work we can
skip for now

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@vsoch
Copy link
Contributor Author

vsoch commented Jan 30, 2022

okay I've tested:

  1. treating oras like Docker hoping it would use the same OCI registry API (did not work)
  2. current implementation - allowing return of an empty string result given no match (assuming passing on to lookout will return found false)

This turned out not to work - lookout (or cuppa?) seemed to try and look for the reference and exit on error:

[Parsing Container Blueprints]
2022/01/30 23:36:48 reference not found
Error

I couldn't find anywhere in either lookout or cuppa with this error message so I suspect it's coming from a dependency library. I tried returning false for found and an empty result, but that didn't work. @alecbcs what would you suggest? We likely want to get in a quick fix here so oras isn't removed from the recipe, but we also don't want the entire parsing to fail. Does oras need to be added to lookout?

@vsoch
Copy link
Contributor Author

vsoch commented Jan 30, 2022

okay I'm debugging and testing in autamus/cuppa now (I always forgot about this fork!) and I'll update if I learn anything! It does look like the code here would have trouble parsing oras.

@vsoch
Copy link
Contributor Author

vsoch commented Jan 31, 2022

okay I got pretty close - the registry (GitHub packages) will return tags for an oras artifact, but it doesn't seem to be able to return the image config, e.g., https://crane.ggcr.dev/config/ghcr.io/singularityhub/github-ci is empty.

@vsoch
Copy link
Contributor Author

vsoch commented Jan 31, 2022

huzzah! I got the manifest to work! So this might work - going to take a break for dinner and back after.

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

Successfully merging this pull request may close these issues.

None yet

1 participant