-
Notifications
You must be signed in to change notification settings - Fork 70
feat: Support automated config migration for separate mapper config #3902
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
base: main
Are you sure you want to change the base?
feat: Support automated config migration for separate mapper config #3902
Conversation
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Robot Results
|
didier-wenzek
left a comment
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.
tedge-mapper migrate-config is nicely working, including for cloud profile.
It could be improved a bit to be more explicit when no config is to be migrated (because not set or already migrated).
| #[clap(hide = true)] | ||
| MigrateConfig { | ||
| cloud_name: CloudType, | ||
| }, |
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.
Why use a hidden command for this migration tool?
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.
At the moment, I didn't want to expose the details for undocumented features, particularly one where the user has nothing obvious to gain by using the feature
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
06545ae to
1c97f70
Compare
didier-wenzek
left a comment
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.
The code is clear and the tests comprehensive. There are still some open UX questions, though.
I don't think we need to "Ensure there is a mechanism for changing the default mapper config location for new users" in this PR. We can make the new mapper schema the default, when the feature and the documentation will be complete.
I like that tedge connect displays the path to the mapper configuration file. This is not a problem to have a constant path when the config has not been migrated. This will even be handy to support users during the transition phase.
I noticed that now tedge config set remove unknown properties, while this was not the case before #3889. I'm okay with that, as I don't think it was a documented behavior, but it would be good to consider restoring the former behavior.
I believe this is the existing behaviour for |
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
f324ec4 to
ac295bd
Compare
Proposed changes
Add a migration tool for converting
tedge.tomlbased configs to separate mapper configs.To use the tool, run
tedge-mapper migrate-config c8y(or with the cloud of your choosing).TODO:
tedge connectsummary showing where the mapper is configuredtedge connectconfig summary showing the feature/temporarily hide it if notTypes of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments