Update rails to send terminated workspace info on reconciliation

Issues:

What does this MR do and why?

Updates Rails to send information about workspaces whose desired state is terminated but actual state is not terminated.

The config to apply sent would be just the inventory config maps for the said workspace.

This information will be send in every reconciliation(partial/full) until the workspaces actual state becomes terminated. This is to fecilitate the new logic of deleting workspaces in a shared namespace which is being tackled as part of Agent: Update workspace creation and terminatio... (#519260 - closed) .

This change is backwards compatible because the existing workspace termination logic in the agent does not rely on the config to apply being sent for the workspace. That field is just ignored. So it does not matter what we send from that perspective.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Setup workspaces on local by following https://gitlab.com/gitlab-org/workspaces/gitlab-workspaces-docs/-/blob/main/doc/local-development-environment-setup.md?ref_type=heads#setup-gdk-gitlab-agent-for-kubernetes-and-workspaces-configuration
  2. Create a workspace from any project by following https://docs.gitlab.com/user/workspace/configuration/#create-a-workspace .
  3. Terminate it.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vishal Tak

Merge request reports

Loading