{"record":{"id":"bd88342ba43d9df0","repo":"apache/superset","slug":"report-schedule-executor-user-username-s-was-not-bd8834","errorCode":null,"errorMessage":"Report Schedule executor user %(username)s was not found.","messagePattern":"Report Schedule executor user (.+?) was not found\\.","errorType":"exception","errorClass":"ReportScheduleExecutorNotFoundError","httpStatus":500,"severity":"error","filePath":"superset/commands/report/execute.py","lineNumber":136,"sourceCode":"    Resolve the executor user for a report schedule.\n\n    Determines the configured executor username via ``get_executor`` and looks up\n    the corresponding user. A deleted/disabled user or a misconfigured\n    ``ALERT_REPORTS_EXECUTORS`` makes ``security_manager.find_user`` return\n    ``None``; rather than passing ``None`` into the webdriver/auth flow (which\n    fails with an opaque NoneType error), raise a dedicated, actionable error.\n\n    :returns: the ``(user, username)`` pair — the username is returned alongside\n        the user because several call sites log it after resolution.\n    :raises ReportScheduleExecutorNotFoundError: if the executor user is missing.\n    \"\"\"\n    _, username = get_executor(\n        executors=app.config[\"ALERT_REPORTS_EXECUTORS\"],\n        model=model,\n    )\n    user = security_manager.find_user(username)\n    if user is None:\n        raise ReportScheduleExecutorNotFoundError(username)\n    return user, username\n\n\ndef log_report_delivery_phase(\n    report_context: ReportExecutionContext | None,\n    recipient_type: ReportRecipientType | None,\n    phase: str,\n    *,\n    enforce_budget: bool,\n) -> None:\n    \"\"\"Enforce and log a notification phase when executing a report.\"\"\"\n\n    if report_context is None:\n        return\n    deadline = report_context.deadline\n    if enforce_budget:\n        deadline.timeout_seconds(\n            \"notification_delivery\",","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/report/execute.py#L118-L154","documentation":"ReportScheduleExecutorNotFoundError: during execution the command resolves which user runs the report via get_executor(ALERT_REPORTS_EXECUTORS, model) and then security_manager.find_user(username). If the resolved username no longer maps to a user (deleted, renamed, or a bad value in the config list), find_user returns None and this dedicated error replaces an opaque NoneType crash.","triggerScenarios":"ALERT_REPORTS_EXECUTORS contains a username of a removed user and the report falls back to it; the report's owner/creator user row was deleted from the ABUser table; user renamed in an external auth store synced back to Superset.","commonSituations":"Offboarding deletes users who own reports; LDAP/OAuth sync renames accounts; misconfigured ALERT_REPORTS_EXECUTORS listing stale service accounts.","solutions":["Set ALERT_REPORTS_EXECUTORS in superset_config.py to usernames that exist and will remain (a dedicated service account)","Reassign ownership of affected reports to an active user (PUT owners on /api/v1/report/{id})","Recreate or restore the missing user, then re-run the schedule"],"exampleFix":"# before\nALERT_REPORTS_EXECUTORS = ['former_employee']  # user deleted -> executor not found\n\n# after\nALERT_REPORTS_EXECUTORS = ['report_executor_svc']  # durable service account","handlingStrategy":"validation","validationCode":"from superset import security_manager, app\n\nfor username in app.config['ALERT_REPORTS_EXECUTORS'] or ['ScheduledReports']:\n    if security_manager.find_user(username) is None:\n        raise ConfigError(f'ALERT_REPORTS_EXECUTORS references unknown user {username!r}')","typeGuard":"def executor_exists(username: str) -> bool:\n    return security_manager.find_user(username) is not None","tryCatchPattern":"try:\n    user, username = resolve_executor(model)\nexcept ReportScheduleExecutorNotFoundError as ex:\n    # reassign report ownership / fix executor config, then re-run\n    logger.warning('executor %s missing; skipping run', ex.username)","preventionTips":["Pin ALERT_REPORTS_EXECUTORS to durable service accounts","Add a startup/config check that every configured executor resolves via find_user","Include report ownership transfer in your user-offboarding checklist"],"tags":["alerts-reports","configuration","users","scheduling"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}