Workspace hangs on restart after being stopped

Description

Workspaces in a stopped state do not restart until after a full reconciliation occurs.

This might be a result of a bug where we omit the secrets that have the inventory annotation but include the configmap with the secret label in a partial reconciliation.

If this is the case, this may cause Kubernetes to delete the secret resources on apply.

  • Current behaviour: Workspace restart after stop hangs till full reconciliation

  • Expected behaviour: Workspace restart does not hang independent of when full reconciliation occurs

  • Steps to reproduce: create a workspace, stop it and attempt to start it again (If you have access to kubectl, you can describe the pod to see error of missing secret resource)

  • Additional information: please include VSCode version, browser dev tool logs, etc that might be helpful to debug the issue!

Root cause analysis

From Fix workspaces reconciliation to send inventory... (!187261 - merged) • Vishal Tak • 17.11:

This was introduced primarily in Update rails to send terminated workspace info ... (!185872 - merged) . The reason it was not caught in the unit tests is because the specs were incorrect changed here before Update rails to send terminated workspace info ... (!185872 - merged) was merged.

References

Acceptance criteria

  • workspaces do not hang on restart irrespective of full reconciliation interval

Implementation plan

Edited by Chad Woolley