You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, providing only the changed field like restartPolicy (like in the user doc example) is not possible:
desiredState:
workloads:
nginx:
restartPolicy: NEVER
The command of the user doc fails: ank -k set state desiredState.workloads.nginx.restartPolicy new-state.yaml
It complains about missing fields and apiVersion. The apiVersion is obviously missing, but it shall be possible to provide only the changed fields when providing the correct update mask afterwards without providing agent, runtimeConfig and runtime if the workload already exists.
Current Behavior
The Ank CLI set state command does not accept minimum required information for the new state.
Expected Behavior
Ank CLI shall support providing only the changed field values if the workload exists in the desiredState.
Steps to Reproduce
Execute the Working With CompleteState section's set state command with changing the restartPolicy field on the current main branch. It fails.
Context (Environment)
Logs
Example error message:
error: Failed to set state: 'Could not serialize YAML object: 'missing field `agent`''
Additional Information
The error is thrown from the ank cli: ank/src/cli_error.rs which has to do with the serde_yaml parsing:
CliError::YamlSerialization(message) => {write!(f,"Could not serialize YAML object: '{message}'")}
The regression is fixed, but we still to fix the real problem. @HorjuRares, please link the new issue here. We will take care of it in the next release.
In the user documentation the
ank set state
command providing a new state with only the changed fields (e.g., restartPolicy) fails with:agent
runtimeConfig
runtime
apiVersion
This is in the section Working with CompleteState.
Currently, providing only the changed field like
restartPolicy
(like in the user doc example) is not possible:The command of the user doc fails:
ank -k set state desiredState.workloads.nginx.restartPolicy new-state.yaml
It complains about missing fields and apiVersion. The apiVersion is obviously missing, but it shall be possible to provide only the changed fields when providing the correct update mask afterwards without providing
agent
,runtimeConfig
andruntime
if the workload already exists.Current Behavior
The Ank CLI set state command does not accept minimum required information for the new state.
Expected Behavior
Ank CLI shall support providing only the changed field values if the workload exists in the desiredState.
Steps to Reproduce
Execute the Working With CompleteState section's set state command with changing the restartPolicy field on the current main branch. It fails.
Context (Environment)
Logs
Example error message:
Additional Information
The error is thrown from the ank cli:
ank/src/cli_error.rs
which has to do with the serde_yaml parsing:Potentially related PRs from the past: #340, #383
Final result
To be filled by the one closing the issue.
The text was updated successfully, but these errors were encountered: