Skip to content
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

feat: Invoking a sub-command from an operation workflow #2792

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ce97c18
Reference documentation for workflow sub-command execution
didier-wenzek Mar 19, 2024
90bf955
Test workflow sub-command execution and data flowing
didier-wenzek Mar 20, 2024
782ae0c
Impl TryFrom<TomlExitHandlers> for AwaitHandlers
didier-wenzek Mar 20, 2024
bfcd349
Trigger a sub-command from a main command
didier-wenzek Mar 21, 2024
ec896b5
Improve GenericCommandState::extract_value signature
didier-wenzek Mar 26, 2024
904a22d
Pass data back and forth from invoking commands to sub-commands
didier-wenzek Mar 26, 2024
39522ae
Test workflow restarting the device with a sub-command
didier-wenzek Mar 26, 2024
2b1f55f
Remove unnecessary to_owned invocation
didier-wenzek Mar 27, 2024
383675a
Log sub-command steps in the invoking command log file
didier-wenzek Mar 27, 2024
3883cca
Add ability to use scripts to compute sub-command init states
didier-wenzek Mar 29, 2024
56fef00
Use `operation` instead of `command` to trigger another operation wor…
didier-wenzek Apr 3, 2024
c7674f9
Log sub-operation input script
didier-wenzek Apr 5, 2024
33cb085
Use early return instead of nested matches
didier-wenzek Apr 10, 2024
497c0ae
Simplify usage of MqttChannel::entity_channel_of
didier-wenzek Apr 11, 2024
3eb4c8b
Represent command clearing message by GenericCommandState with a null…
didier-wenzek Apr 11, 2024
9466f74
Store invoking command topic in sub command state
didier-wenzek Apr 11, 2024
03a9abc
Move topic helper functions under MqttSchema
didier-wenzek Apr 11, 2024
aa18f4e
docs: add construction notice to sub-command execution
reubenmiller Apr 24, 2024
e5bb662
rewording the awaiting sub-command instructions
reubenmiller Apr 24, 2024
021853d
using formal language
reubenmiller Apr 24, 2024
ff106c5
Rewording sub-operation execution doc
albinsuresh Apr 24, 2024
25ca6e6
test: detect reboot via temp file creation
reubenmiller Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/common/mqtt_channel/src/topics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ impl TryInto<TopicFilter> for Vec<String> {
}
}

impl AsRef<str> for Topic {
fn as_ref(&self) -> &str {
&self.name
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/tedge_agent/src/operation_file_cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl FileCacheActor {

let (entity, Channel::Command { cmd_id, .. }) = self
.mqtt_schema
.entity_channel_of(&Topic::new(&topic).unwrap())
.entity_channel_of(&topic)
.expect("only topics targeting config update command should be inserted")
else {
return Ok(());
Expand Down
Loading