Visitar URL original
client: Forward skopeo errors by stgraber · Pull Request #3172 · lxc/incus · GitHub
Skip to content

client: Forward skopeo errors - #3172

Merged
stgraber merged 1 commit into
lxc:mainfrom
stgraber:oci
Apr 13, 2026
Merged

stgraber merged 1 commit into
lxc:mainfrom
stgraber:oci

Conversation

@stgraber

Copy link
Copy Markdown
Member

Closes #3171

Closes lxc#3171

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>

@bensmrs bensmrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So, that works, but it’s really ugly. Approving but still would prefer an approach where GetImageAlias errors are differentiated. You’ll be the judge.

@stgraber

Copy link
Copy Markdown
Member Author

Yeah, I just spent the past 10-15min seeing if we can do something clean there but I don't think so.

For both OCI and SimpleStreams, we can have a clean authoritative error on the client side, so those would be easy to convert into a generic ErrNoSuchImageAlias.

It's the Incus protocol that's more problematic as over there it returns both 404 or 401/403 if an authorizer is used.

In addition, it's the same GetImageAlias which is used for explicit requests (incus image alias show) as well as indirectly within other logic. The indirect case would benefit from the simple error matching, but the explicit call should return the full server-side message back to the user.

Knowing how LXD/Incus is being used today, we really should have not put so much emphasize on the image fingerprints in the first place and build the entire thing around the aliases instead with specific syntax (sha256:FINGERPRINT type thing) to select a specific image but with the CLI effectively then knowing to use a different code path. Would probably also have made it easier to not get so tied to sha256... Anyway, not going to redo that now :)

@stgraber
stgraber merged commit 73675ab into lxc:main Apr 13, 2026
256 of 264 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

incus rebuild error loses detail from skopeo error

2 participants