Explicitly set all fields while responding from rails to agentk
MR: None required
Description
All fields sent from rails to agentk in the reconciliation response payload should be included, even if they are explicitly nil or an empty array/object.
Original description
The following discussion from !116475 (merged) should be addressed:
-
@vtak started a discussion: (+1 comment) question:
Is this
.compactneeded? When will the entries benil? Ifworkspaceobject itself isnil, it will throw an error when we accessworkspace.namea few lines above. In fact, can aworkspaceeven be nil?Discussed on sync call with @cwoolley-gitlab -
.compactwill remove nil entries of the hash likepersisted_deployment_resource_versionorconfig_to_apply.However, we agreed that it is better to be explicit and send all information rather than compacting and skipping those fields. Since that would require changes in the test cases, we'll do it as a followup.
Acceptance Criteria
-
All fields should be explicitly set in rails reconciliation response to agent