fix: wrong message being shown on system.toml parse error#3668
Merged
Bravo555 merged 1 commit intothin-edge:mainfrom Jun 10, 2025
Merged
fix: wrong message being shown on system.toml parse error#3668Bravo555 merged 1 commit intothin-edge:mainfrom
system.toml parse error#3668Bravo555 merged 1 commit intothin-edge:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
system.toml parse errorsystem.toml parse error
jarhodes314
reviewed
Jun 5, 2025
| Self::Start(service) => ExecCommand::try_new_with_placeholder( | ||
| service_manager.init_config.start.clone(), | ||
| ServiceCommand::Enable(service), | ||
| ServiceCommand::Start(service), |
Contributor
There was a problem hiding this comment.
I believe the following should work since ServiceCommand: Copy. Assuming it does, that will do a better job of preventing these errors.
Suggested change
| ServiceCommand::Start(service), | |
| self, |
Contributor
There was a problem hiding this comment.
It works. Indeed less error prone.
Member
Author
There was a problem hiding this comment.
Went a step further and shortened the whole thing in 23bc247.
b67edf8 to
23bc247
Compare
Contributor
Robot Results
|
A wrong variant of ServiceCommand was used which caused an error message to wrongly report that `ServiceCommand::Enable` instead of `ServiceCommand::Start` failed when `start` command in `system.toml` did not contain a placeholder for an argument. Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
23bc247 to
a5eac7b
Compare
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
A wrong variant of ServiceCommand was used which caused an error message to wrongly report that
ServiceCommand::Enableinstead ofServiceCommand::Startfailed whenstartcommand insystem.tomldid not contain a placeholder for an argument.Types of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments
Some of the service manager code could be further improved:
system.tomlfile and why handling it takes quite a bit of code