-
Notifications
You must be signed in to change notification settings - Fork 54
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
refactor: add support to define_tedge_config
for (optionally) multi-value fields
#3126
Merged
jarhodes314
merged 32 commits into
thin-edge:main
from
jarhodes314:feat/poc-multiple-c8ys
Oct 7, 2024
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
a9aad21
Start PoC for named c8ys in tedge config
jarhodes314 1517688
Generate enums that mostly work with multi keys
jarhodes314 5e50c0e
Fix the remaining new compiler errors
jarhodes314 0efaa46
Replace HashMap with Multi enum, to allow unnamed c8ys to persist
jarhodes314 d3ea36e
Add another .get call to fix a compiler error message
jarhodes314 7eb7515
Make multi example compile
jarhodes314 5dcdfaf
Update tedge config API usage so the existing tedge config works
jarhodes314 a879f50
Run formatter and fix some remaining errors
jarhodes314 56525cc
Add a proper example for multi c8y config
jarhodes314 0baeb4c
Refactor some of the ID generation logic
jarhodes314 10ccd17
Refactor reader ID generation
jarhodes314 7d4745e
Rename `get` to `try_get`
jarhodes314 b962d72
Fix clippy and test errors
jarhodes314 66ea8c7
Update `FromStr` implementation to cope with multi-value fields
jarhodes314 e3ee82a
Add support for iterating over readable keys
jarhodes314 8666582
Add support for stringifying multi-value fields correctly
jarhodes314 9c816da
Tidy up code following the new multi-value logic
jarhodes314 615d0f8
Remove dead code
jarhodes314 d923fc3
Tidy up most of the remaining TODOs
jarhodes314 c786ae2
Run formatter
jarhodes314 3860292
Fix doc test
jarhodes314 fdc4751
Fix imports in docs
jarhodes314 d508c90
Run formatter
jarhodes314 edc2d61
Rename map -> map_keys
jarhodes314 acdd944
Improve error messages for multi fields
jarhodes314 582f1f6
Use named fields inside the multi
jarhodes314 63fee73
Allow writing to novel tedge config multi keys
jarhodes314 8bbf918
Update crates/common/tedge_config_macros/src/multi.rs
jarhodes314 64ddb22
Fix tests and add more tests around multi
jarhodes314 85b30f8
Fix issues with normal groups inside multi-value groups
jarhodes314 87da9c3
Refactoring
jarhodes314 3936b7d
Support converting between single and multi fields
jarhodes314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 will have to give a try to that one! This looks pretty helpful!
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.
Yeah, it would be essentially impossible to assert eq for large blocks of code without a line-by-line comparison.