Refactor workspaces term config_to_apply to desired_config
MR: Pending
Description
Currently we have two separate terms to refer to the Kubernetes resources which are returned in the Workspaces reconciliation response: desired_config and config_to_apply.
This is confusing, and contrary to the good principle of Ubiquitous Domain Language
We should rename all occurrences of config_to_apply to desired_config, across all codebases (both the gitlab repo and the gitlab-agent repo).
Justifications for going with desired_config:
- It's generally a more readable name for an object/entity - it ends with a noun, rather than a verbal phrase modifier. This is important when it's used in other naming contexts, e.g.
desired_config_generatorvs.config_to_apply_generator. -
desired_configis referenced in the database and GraphQL API, which require long involved processes to deprecate/change. -
config_to_applyis only referenced in thegitlab-agentprotobuf/golang structures. These are easier to deal with (see Implementation Plan).
Acceptance criteria
-
All occurrences of config_to_apply/ConfigToApplyare replaced withdesired_config/DesiredConfig
Implementation plan
- We can add
desired_configas an additional field to thegitlab-agentprotobuf/golang structures - We will continue sending the same data in both of the fields
- Then we can eventually deprecate the
config_to_applyfield according to the documentedgitlab-agentdeprecation policies.