-
Notifications
You must be signed in to change notification settings - Fork 30
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: prevent custom config keys being removed when updating resources [WD-9348] #691
Conversation
Demo starting at https://lxd-ui-691.demos.haus |
cb7da4a
to
c2de01d
Compare
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.
QA looks good, we should also handle unknown main keys (not only the nested ones under config). Added an idea for making the code a tiny bit simpler.
7c781f7
to
f0e5ec4
Compare
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, thanks for checking and fixing this!
- Checked edit instances (using getUnhandledKeyValues) - Checked edit profile (using getUnhandledKeyValues) - Checked edit network (using yaml object) - Checked edit network forward (no config keys) - Checked edit storage pool (using PATCH request so it's not a problem) - Checked edit storage volume (updated to use getUnhandledKeyValues) - Checked edit snapshot (no config keys) - Checked edit image (can't edit images so not a problem) - Checked edit project (using getUnhandledKeyValues) Signed-off-by: Mason Hu <mason.hu@canonical.com>
f0e5ec4
to
cbc4c1e
Compare
Done
getUnhandledKeyValues
)getUnhandledKeyValues
)getUnhandledKeyValues
)getUnhandledKeyValues
)QA
lxc [resource-type] set [resource-name] user.foo=bar
, then check its configs usinglxc [resource-type] show [resource-name]
and confirmuser.foo
is present in the resource configs. From there, navigate to the edit page for that resource type, modify anything and then hit save. Runlxc [resource-type] show [resource-name]
again and confirm thatuser.foo
is still present in the configs. NOTE: thelxc
command for setting and showing resource configs can be slightly different depending on the resource type, please check the MAN page relating to each resource type's cli commands.