Potential race condition when deleting a cluster

Summary

It seems that when removing a cluster there is a small window where the cluster has been destroyed but the associated applications have not. If a call to the cluster_status endpoint is in progress while this happens, an error is raised:

Low impact as I don't think this is actually visible to the user (as the cluster has already been removed).

What is the current bug behavior?

cluster_status endpoint raises undefined method application_jupyter for nil:NilClass

What is the expected correct behavior?

cluster_status endpoint returns without error

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by Tiger Watson