Improve logging of remote development module of agentk
Currently, all logs are debug. So we have no visibility into the system by default. We cannot convert them to Info logs as it is because they contain a lot of information.
We should clean up the logging such that there are some minimal info logs about
- When an error has occurred
- When partial reconciliation has started
- When full reconciliation has started
For debugging,
- Whenever reconciliation happens, we log the
namespace/name
of the workspace being sent to agentk - We SHOULD NOT log the entire YAML received from rails that we apply
- Currently, whenever there are any state changes in the deployment, we see a lot of debug logs. Reduce the noise of them significantly.
- Should we have a log when we receive an information from informer?
- Other improvements.
In general the goal should be that by default we have some information if things are going good by default(at Info level) and some additional useful information at debug level.
Introducing the debug logs should not result in a plethora of logs.
We are doing a similar effort on Rails - Switch all remote_dev branch log statements to ... (#408783 - closed)
Availability and Testing
Ensure updated test coverage in unit/integration/feature tests.
Relevant MR: gitlab-org/cluster-integration/gitlab-agent!945 (merged)