-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix: handle ill-formed profiles created by older rockcraft #588
base: main
Are you sure you want to change the base?
Conversation
Check if the lxd snap is installed by querying the snapd socket instead of looking for an executable in the path, as lxd can use auto-installer stubs. Co-authored-by: Callahan Kovacs <callahan.kovacs@canonical.com> Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Older versions of rockcraft may have created a rockcraft lxd project containing a broken default profile. If this is the case, tell the user to delete the project and start over. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
d6aaf67
to
8b00682
Compare
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
if not devices: | ||
# Project exists but the default profile is ill-formed, tell the user to | ||
# delete the project and start over. | ||
raise LXDError( |
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.
Unfortunately deleting the broken projects ourselves involves deleting everything the project is using first, and this is too risky to implement without better investigation and careful testing.
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.
this you be a good scenario to have a test for, aside from that, I generally approve of the appoach
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.
I agree that this new check should have a test
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.
Is this a duplicate of #436?
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.
I believe there are failing unit tests
It's a similar check, but performed on the specific project's default profile instead of the default project default profile. |
27b62e2
to
18ca5f3
Compare
Older versions of rockcraft may have created a rockcraft lxd project
containing a broken default profile. If this is the case, tell
the user to delete the project and start over.
tox
?