Ensure workspaces_agent_configs for older versions return the default values of newly introduced fields
MR: Add instruction to backfill versions table of a... (!200608 - merged) • Ashvin Sharma • 18.4
Description
Logs - https://log.gprd.gitlab.net/app/discover#/?_g=h@42b0d52&_a=h@2205dc7
The reconciliation endpoint is retrieving the shared_namespace to nil. This is causing failures in the code because we are type-checking it to a string.
We need to identify why this occurred, reproduce it and fix it for everyone.
Implementation details
- Verify this default-to-nil-for-missing fields is indeed the papertrail behavior
- See if papertrail provides a built-in mechanism to override the default value for missing fields
- If it does not, then add code to the model (as close as possible to the papertrail-version-reifying) which will auto-default older versions of this field to empty string, so we don't have to deal with it anywhere else in the domain code.
- Once that logic is in place in the model, revert the workaround in the domain code: Add nil fix for shared_namespace (!191014 - merged) • Vishal Tak • 18.1
Acceptance criteria
-
The default value for a new field in the paper trail version of agent config should be respected. -
The temporary solution introduced in Add nil fix for shared_namespace (!191014 - merged) • Vishal Tak • 18.1 is removed.
Edited by 🤖 GitLab Bot 🤖