agent code quality improvement
MR: pending
Description
There are two points raised during the agent MR review. And we would like to work on as an improvement in code quality.
- Instead of the current approach, I recommend to define the response, etc as a proto and use the validator to ensure things are within expected bounds to avoid any surprises. See how gitlab/api package does that. This can be done in a follow up if you decide to go down this path. gitlab-org/cluster-integration/gitlab-agent!1495 (comment 1924069413)
- ry to avoid mutable fields where possible. They make it easier to introduce a bug. gitlab-org/cluster-integration/gitlab-agent!1495 (comment 1926240459)
Acceptance Criteria
-
address both comments
Technical Requirements
N/A
Design Requirements
None, no UI impact.
Impact Assessment
- Instance admins may want to override these values to either provide faster update and reconciliation for workspaces, or to reduce load on the monolith.
- Developers may want to override these values so they can have faster feedback when developing features, e.g. have a much faster full reconciliation interval than an hour. Otherwise they have to hack the hardcoded intervals, or restart their agent to force a full reconcile.
Edited by zli