Skip to content

Comments

Make wrap_snap_operations return the actual error.#171

Open
crypticC0der wants to merge 1 commit intocanonical:mainfrom
crypticC0der:main
Open

Make wrap_snap_operations return the actual error.#171
crypticC0der wants to merge 1 commit intocanonical:mainfrom
crypticC0der:main

Conversation

@crypticC0der
Copy link

Currently wrap_snap_operations just returns minimal error messages including only the names of the snaps that failed and not why. This is not particularly useful so I've expanded this to return include the actual error as well.

@crypticC0der crypticC0der force-pushed the main branch 2 times, most recently from 8a06744 to 38a0e34 Compare February 25, 2026 09:40
Currently wrap_snap_operations just returns minimal error messages
including only the names of the snaps that failed and not why. This is
not particularly useful so I've expanded this to return include the
actual error as well.

Signed-off-by: MJ Ponsonby <mj.ponsonby@canonical.com>
@james-garner-canonical
Copy link
Contributor

Hi @crypticC0der, note that the Charmhub-hosted version of this library is deprecated by the charmlibs version. The version of the library in the charmlibs monorepo is identical right now, so your change would apply there. It's funny timing though, as I'm right in the middle of rewriting the library entirely -- and it will be completely dropping this unhelpful wrapping.

Is this an improvement you're hoping to see in charms as soon as possible, or would waiting for the rewrite work?

@crypticC0der
Copy link
Author

Is this an improvement you're hoping to see in charms as soon as possible, or would waiting for the rewrite work?

I'm raising this just as I'm making the change locally in canonical/microovn-operator#55 and i thought I'd pass along the update if you found it useful. I am in no real rush for the change to take place but please let me know when the rewrite is done with the new charm lib and I'll try move our products over

@james-garner-canonical
Copy link
Contributor

Thanks for explaining the context. Patching your vendored copy of the lib like you're doing will no doubt be the fastest way to get this functionality in your charm.

I'll be sure to let you know when the new library version is ready. I didn't have microovn-operator in my collection of reference charms for the rewrite, so thanks for bringing it to my attention :)

If you'd like to switch to the currently supported charmlibs.snap version, feel free to make this PR against charmlibs in the meantime.

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.

2 participants