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
.compact
needed? When will the entries benil
? Ifworkspace
object itself isnil
, it will throw an error when we accessworkspace.name
a few lines above. In fact, can aworkspace
even be nil?Discussed on sync call with @cwoolley-gitlab -
.compact
will remove nil entries of the hash likepersisted_deployment_resource_version
orconfig_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