Null check safety in actual state calculate of remote development

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !112906 (merged) should be addressed:

  • @cwoolley-gitlab started a discussion:

    question: Is it possible for any of these nested entries in the workspace info object to be missing? If not, then we should be null-safe/type-safe and do a fetch with a non-default value, and allow it to blow up with a runtime error. This will help us identify problems sooner.

    I don't know what the answer to this is, it's currently not typed on the agentk side. It's in internal/module/remote_development/agent/worker.go, the LatestK8sDevWorkspaceInfo entry in the WorkspaceAgentInfo struct, which is just a json string.

    There's already a TODO above that struct:

    // TODO: revisit all request and response types, and make more strongly typed if possible

    We should probably capture an issue to look into this.

    Then, we can have more type-safety on the agentk side, and be able to more fully understand what fields we can make required and which ones might be missing.

Edited by 🤖 GitLab Bot 🤖