You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. inspect asks us to install 100 releases, we queue them up and before they're finished, user ctrl+c's and inspect asks us to uninstall them all, then we show a bunch of errors. Can we check if the helm releases are in our "tracked" list before attempting uninstall?
The text was updated successfully, but these errors were encountered:
asyncdefinstall(self, release: Release) ->None:
""" Installs a release and tracks it for eventual cleanup. Args: release (Release): The release to install and track. """# Track the release regardless of the install result.self._installed_releases.append(release)
awaitrelease.install()
We add the release to self._installed_releases() before we've actually successfully installed it because:
The install might fail e.g. Helm timeout in which case, an exception will be raised, but the release won't be uninstalled by Helm (unless we passed --atomic flag to helm install)
If the install gets cancelled by Inspect (e.g. user hits ctrl+c or maybe even if there's an eval failure) then an asyncio.CancelledError is raised. We don't really know at what stage the cancellation was at though - was it whilst waiting for the semaphore, or did we actually get as far as starting helm install?
In case 1, it is correct to add it to self._installed_releases.
In case 2, if the cancellation happened before calling helm install we could avoid adding it to the list. But determining that is not trivial.
E.g. inspect asks us to install 100 releases, we queue them up and before they're finished, user ctrl+c's and inspect asks us to uninstall them all, then we show a bunch of errors. Can we check if the helm releases are in our "tracked" list before attempting uninstall?
The text was updated successfully, but these errors were encountered: