Skip to content

fix: Dashboard-api module-level aiohttp/httpx clients never closed on shutdown #4198

Description

@patil2001

Summary

Module-level clients created at import; no close on app shutdown.

Impact: Production user/operator failure on Osmantic/ODS main

Files:

  • dashboard-api/helpers.py (:88-122)
  • main.py lifespan

Repro

On a production-like Osmantic/ODS main checkout:

  1. Hit the failure mode described in Summary (severity: Medium).
  2. Observe the broken behavior / incorrect exit / missing guard from the root cause above.
  3. Confirm no overlapping open PR (dedup: No open issue. No open PR.).

Fix

Implement a minimal, distro-/path-correct fix in the listed files (no scope creep).

  • Address the root cause directly (do not paper over with || true / broad catches).
  • Prefer resolving runtime values from the environment/repo (like apt-cache madison) over hardcoding distro-specific version strings when the same bug class applies.
  • Add a regression test under ods/tests/ (or matching suite) that fails without the fix and passes with it.

Context

Filed from Desktop issues.md entry #33 via one-click scout pipeline.
Rationale: Unfiled Desktop issues.md #33 (no GitHub issue yet)

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