[go: up one dir, main page]

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

  1. Verify this default-to-nil-for-missing fields is indeed the papertrail behavior
  2. See if papertrail provides a built-in mechanism to override the default value for missing fields
  3. 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.
  4. 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

Edited by 🤖 GitLab Bot 🤖