New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pluginhandler: fix stage-snaps for v2 plugins #3211
pluginhandler: fix stage-snaps for v2 plugins #3211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though this indicates we need to expand our stage-snap spread test. I'll do that separately.
Thanks!
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
…nto plugins-v2-unpack-stage-snaps
be8d402
to
9ab7d3e
Compare
9ab7d3e
to
0fe5893
Compare
I merged @cjp256's spread tests in, but still saw failures. I tried some test builds with some extra debugging, which showed that while the snaps were correctly being unpacked to It looks like the culprit was prepare_build(), which clears the install dir when using a v2 plugin. It re-unpacks staged deb packages, but didn't do the same for snaps. |
Co-authored-by: Chris Patterson <chris.patterson@canonical.com>
./runtests.sh static
?./runtests.sh tests/unit
?The
PluginHandler._unpack_stage_snaps
method makes use of an attribute on the plugin object that does not seem to exist on v2 plugins, leading to errors like:The value being substituted into the log message doesn't really match the text of the log message, so I switched it to use
self.part_install_dir
instead.