Fail permamently in re-save entity action when entity doesn't exist #2492
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.
Our logs are getting gummed up with an indefinitely failing and retrying task to re-save a prober domain that doesn't exist (likely because it was hard-deleted by delete prober data action), so this makes the re-save action resilient to that failure case so that it stops assuming every enqueued re-save actually corresponds to an entity that exists, thus allowing it to fail permanently if the entity doesn't exist. Failing permanently is the right thing to do as if the entity doesn't exist now there's no reason to think it will in the future, plus all re-saves are optimistic rather than guaranteed anyway.
This should fix http://b/350530720
This change is