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
It looks like the container exit code may not be properly persisted in the agent's state file, leading to data loss potentially impacting the call to submit state changes to ECS.
Description
Container data is stored in an api.Container struct, which is then serialized to JSON and stored in a file. During agent restarts, this file is read and the api.Container structs are rebuilt based on the serialized data. With Go's default JSON marshaling library (encoding/json), only visible fields (public) are serialized. In fee2053, KnownExitCode was changed to knownExitCode which resulted in the field being a non-visible, private field.
Expected Behavior
Exit code should be serialized and saved in the agent state file.
Observed Behavior
Exit code is not present in the agent state file.
The text was updated successfully, but these errors were encountered:
Fixing knownExitCode is fine, but then there is all that other state in Container that is exposed only because we need it marshaled. Should we just write a custom JSON marshaler instead and make all that "*unsafe" state private?
Summary
It looks like the container exit code may not be properly persisted in the agent's state file, leading to data loss potentially impacting the call to submit state changes to ECS.
Description
Container data is stored in an
api.Container
struct, which is then serialized to JSON and stored in a file. During agent restarts, this file is read and theapi.Container
structs are rebuilt based on the serialized data. With Go's default JSON marshaling library (encoding/json
), only visible fields (public) are serialized. In fee2053,KnownExitCode
was changed toknownExitCode
which resulted in the field being a non-visible, private field.Expected Behavior
Exit code should be serialized and saved in the agent state file.
Observed Behavior
Exit code is not present in the agent state file.
The text was updated successfully, but these errors were encountered: