feat: Allow tedge run all to run multiple mappers#4253
Open
jarhodes314 wants to merge 4 commits into
Open
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:
|
| #[clap(subcommand)] | ||
| pub mapper: Option<MapperName>, | ||
| /// Mappers to run alongside the agent (e.g. `c8y`, `aws`, `c8y@profile`). | ||
| #[clap(trailing_var_arg = true)] |
Contributor
There was a problem hiding this comment.
Out of curiosity, I'm wondering why we have to use trailing args here and not positional args?
As I'm pretty sure with the current option the following won't work due to the flag coming after the positional args.
tedge run all c8y --log-info debugMy preference would be to not care about such ordering by using #[arg(num_args = 1..)] instead.
Contributor
Author
There was a problem hiding this comment.
No good reason, I've updated it to match your suggestion now
Contributor
Robot Results
Failed Tests
|
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
tedge run all to run multiple mapperstedge run all to run multiple mappers
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
Extends the
tedge run allCLI to accept multiple arguments in order to run multiple mappers simultaneously, e.g.A bare
tedge run allcommand now runs all mappers defined in/etc/tedge/mappers.Types of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments