Backend: Agent activity event for configuration changes
Proposal
Any time an agent loads new configuration, KAS should send an activity event (table, model), including
- The agent ID
- Optional: The agent pod
- Optional: The agent pod namespace
- Optional: The configuration project ID (not technically needed because we can retrieve via agent ID)
- The configuration commit SHA
- The time of the event
- The level, kind and details of the event:
-
level=info, kind=get_configuration_success, details="": Means that configuration loaded successfully. No need for details -
level=warn, kind=get_configuration_with_warnings, details=<warning message>: Means the configuration loaded but there were warnings -
level=error, kind=get_configuration_errors, details=<error message>: The configuration failed to load.
-
KAS may send the same (id, sha) twice if the agent has more than one pod.
Rails:
- is not required to persist the pod and namespace for now
- if rails receives the receives the same
(agent_id, kind, sha)a second time, a new event should not be generated.
Background
- Design issue #277323 (closed)
- Split out of #350269 (closed)
Edited by Hordur Freyr Yngvason