Skip to content

ReliableReportingService startup failure suppresses its cause (raise failure from None) #1561

Description

@bokelley

Observed

ReliableReportingLifecycle._open (adcp 9.0.0b4, adcp/reporting/service_lifecycle.py) catches any startup error and re-raises the lifecycle's failure with the cause suppressed:

except BaseException as error:
    failure = await self.fail("startup")
    if isinstance(error, self._configuration_error):
        raise
    raise failure from None

Tracebacks, Sentry and logging integrations then report only ReliableReportingServiceError: reporting service failed (startup). The error that stopped startup survives only as the suppressed __context__.

We hit this in production. adcp 9 refused a reporting ledger without caller ownership (ReportingOwnershipMigrationError from require_owned_schema_or_empty in store.create_schema()), but every Sentry event showed only the wrapper, so the failure couldn't be diagnosed from telemetry.

Expected

The startup failure names its cause. Chaining it is enough:

raise failure from error

ReportingOwnershipMigrationError is an operator-actionable precondition. Its message tells the operator to call replace_empty_legacy_reporting or migrate_legacy_reporting, so it could also be re-raised unwrapped, the way configuration errors are.

Workaround

Adopters read error.__context__ when start() raises.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions