Skip to content

Remove support for nil in workspaces_agent_config_version

Zhaochen Li requested to merge zl/493992 into master

Issue - do not support null on workspaces_agent_config_... (#493992 - closed)

What does this MR do and why?

Following the comment here, we will need to remove the support on nil workspaces_agent_config_version on workspaces table.

raise of RuntimeError, and an error message which says something like this:

'#workspaces_agent_config' cannot be called until '#workspaces_agent_config_version' is set by the 'before_validation' hook. To automatically set it, call 'workspace.valid?', which will call '#set_workspaces_agent_config_version'.

We also would like to uncomment the validation on workspaces_agent_config_version after 17.5

MR acceptance checklist

  • Update the code to raise runtime error if nil
  • uncomment validation on workspaces_agent_config_version
  • add/update unit testing

Screenshots or screen recordings

We should be fine with the code change, for reason i described here with danger.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Zhaochen Li

Merge request reports

Loading