-
Notifications
You must be signed in to change notification settings - Fork 8
chore: updates datasources to report recoverability in errors #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| { | ||
| // if client is initializing, make it stop waiting | ||
| _initTask.SetResult(true); | ||
| _initTask.SetResult(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Twas the night before bugmas
| if (newError != null && !newError.Value.Recoverable) | ||
| { | ||
| _actionable.BlacklistCurrent(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now if a datasource decides to shutdown for a recoverable reason (who knows what that will be in the future), we don't blacklist too agressively.
| { | ||
| _canceller?.Cancel(); | ||
| _featureRequestor.Dispose(); | ||
| _dataSourceUpdates.UpdateStatus(DataSourceState.Off, errorInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emits events during dispose feels like something we shouldn't be doing. Because the thing we are emitting to could already be disposed/finalized.
kinyoklion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer no data source updates triggered by dispose. But everything else looks good.
Requirements
Didn't do yet, going to do as part of overall benchtesting before release.
Adds tracking of Recover-ability on data source ErrorInfo so that can be communicated outward by datasources. Then the FDv2 datasource can blacklist conditionally on the recover-ability of the error. This now allows data sources to report Off (intentional shutdown) without getting blacklisted.
Note
Adds
RecoverabletoDataSourceStatus.ErrorInfoand updates polling/streaming (incl. FDv2) to set Interrupted vs Off, centralize shutdown, and conditionally blacklist based on recoverability, with comprehensive test updates.ErrorInfo.RecoverabletoDataSourceStatusto denote retryable vs terminal errors.ErrorInfo.FromException(Exception, bool)andFromHttpError(int, bool).HttpErrors.IsRecoverableto setRecoverable; mark JSON/store errors as recoverable.DataSourceState.Interrupted; unrecoverable toOffand complete init task withfalse.Shutdown(ErrorInfo?)helpers; ensureDispose/shutdown updates status toOff.FDv1Fallbackwhen present.Off, blacklist current source only ifnewError.Recoverable == false.FromHttpErrorsignature and assertRecoverablesemantics across HTTP 401/403 vs 5xx/network/invalid-data/store.Offand FDv1 fallback flag propagation.Written by Cursor Bugbot for commit 06e57f1. This will update automatically on new commits. Configure here.