This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
core/runner: Fix server panic when runner is forgotten #3756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit when Waypoint was determining whether or not to
remove a Runner from boltdb it was possible for runner to be nil at the
time we attempted to determine what type of Runner the Runner was. This
caused the server to panic as soon as the runner became unavailable.
This commit fixes the panic by avoiding the runner from being set to nil
by instead initializing an empty runner variable so that if a runner is
not found the type can still be determined and the runner cleaned up.
Fixes #3448