-
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
Add tedge config agent.state.path setting #2492
Add tedge config agent.state.path setting #2492
Conversation
Codecov Report
Additional details and impacted files
|
Robot Results
|
9881063
to
65b9611
Compare
@@ -73,11 +96,18 @@ mod tests { | |||
pub operation: String, | |||
} | |||
|
|||
fn new_test_state_repository(temp_dir: &TempTedgeDir) -> AgentStateRepository<State> { | |||
AgentStateRepository::new( | |||
"/some/unknown/dir".into(), |
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.
It's a bit surprising to see that this relies on the unhappy path to store in {temp_dir}/.agent
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 good to test the happy path too. Will do.
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.
Done
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.
Looks good. I've left a couple of minor comments
This path is used to store the tedge-agent state across restarts. If the given path is not set or doesn't exist, then the tedge-agent use /etc/tedge/.agent as a fallback. Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
65b9611
to
7747a16
Compare
Proposed changes
agent.state.path
then the tedge-agent use
/etc/tedge/.agent
as a fallback.agent.state.path
is/data/tedge/agent
.Types of changes
Paste Link to the issue
#2488
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments