Skip to content

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 be nil? If workspace object itself is nil, it will throw an error when we access workspace.name a few lines above. In fact, can a workspace even be nil?

    Discussed on sync call with @cwoolley-gitlab - .compact will remove nil entries of the hash like persisted_deployment_resource_version or config_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
Edited by Chad Woolley