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
agentkside. It's ininternal/module/remote_development/agent/worker.go, theLatestK8sDevWorkspaceInfoentry in theWorkspaceAgentInfostruct, which is just a json string.There's already a
TODOabove 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
agentkside, and be able to more fully understand what fields we can make required and which ones might be missing.