Skip to content

Conversation

@tanderson-ld
Copy link
Contributor

@tanderson-ld tanderson-ld commented Dec 18, 2025

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions
    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 Recoverable to DataSourceStatus.ErrorInfo and updates polling/streaming (incl. FDv2) to set Interrupted vs Off, centralize shutdown, and conditionally blacklist based on recoverability, with comprehensive test updates.

  • Interfaces:
    • Add ErrorInfo.Recoverable to DataSourceStatus to denote retryable vs terminal errors.
    • Update factories: ErrorInfo.FromException(Exception, bool) and FromHttpError(int, bool).
  • Data sources:
    • Polling/Streaming (v1 & FDv2):
      • Use HttpErrors.IsRecoverable to set Recoverable; mark JSON/store errors as recoverable.
      • Route recoverable errors to DataSourceState.Interrupted; unrecoverable to Off and complete init task with false.
      • Add Shutdown(ErrorInfo?) helpers; ensure Dispose/shutdown updates status to Off.
      • Preserve/propagate FDv1Fallback when present.
    • FDv2 coordinator:
      • On Off, blacklist current source only if newError.Recoverable == false.
  • Tests:
    • Update for new FromHttpError signature and assert Recoverable semantics across HTTP 401/403 vs 5xx/network/invalid-data/store.
    • Verify shutdown updates status to Off and FDv1 fallback flag propagation.

Written by Cursor Bugbot for commit 06e57f1. This will update automatically on new commits. Configure here.

@tanderson-ld tanderson-ld requested a review from a team as a code owner December 18, 2025 22:01
@tanderson-ld tanderson-ld changed the title Ta/unrecoverable blacklisting tweak chore: updates datasources to report recoverability in errors Dec 18, 2025
{
// if client is initializing, make it stop waiting
_initTask.SetResult(true);
_initTask.SetResult(false);
Copy link
Contributor Author

@tanderson-ld tanderson-ld Dec 18, 2025

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();
}
Copy link
Contributor Author

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);
Copy link
Member

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.

Copy link
Member

@kinyoklion kinyoklion left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants