Skip to content

[bugfix] packaging: cap opentelemetry-api<1.46 to avoid FastAPI ASGI TypeError - #691

Merged
FayeSpica merged 1 commit into
ThinkFlowLab:mainfrom
FayeSpica:fix/exclude-broken-fastapi-0-165-1
Dec 4, 2026
Merged

FayeSpica merged 1 commit into
ThinkFlowLab:mainfrom
FayeSpica:fix/exclude-broken-fastapi-0-165-1

Conversation

@FayeSpica

Copy link
Copy Markdown
Collaborator

Summary

  • Cap opentelemetry-api<1.46 in pyproject.toml alongside fastapi>=0.115,<1 to unblock wheel-based CI and desktop runtime builds (checks / frontend scripts/verify_install.py and checks / desktop / macos apps/desktop/scripts/prepare-runtime.mjs).
  • opentelemetry-api==1.46.0 (published on PyPI) changed _logs.get_logger() and breaks fastapi==0.165.1's _native_telemetry ASGI wrapper with TypeError: get_logger() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given on every HTTP request. requirements.txt already pins opentelemetry-api==1.45.1.

Linked issue

No GitHub issue is linked; this is a targeted packaging hotfix restoring CI after the upstream opentelemetry-api==1.46.0 release.

  • Fixes #N or Refs #N is included, or no issue applies

Labels

  • type:bug

  • area:ci

  • area:install

  • area:desktop

  • Labels applied

Test plan

  • Local (2439c6c59cfaeee754eefa7bdf127eddadb34af3):
    • uv pip compile pyproject.toml --quiet | grep -iE '^(fastapi|opentelemetry-api)==' -> fastapi==0.165.1, opentelemetry-api==1.45.3.
    • Failing-before repro (fastapi==0.165.1 + opentelemetry-api==1.46.0): TestClient(app).get('/health') raises TypeError: get_logger() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given (BEFORE_EXIT=1).
    • Passing-after check (fastapi==0.165.1 + opentelemetry-api==1.45.3): TestClient(app).get('/health') returns 200 OK (AFTER_OK 0.165.1 1.45.3).
  • Left to CI:
    • Release checks (.github/workflows/ci.yml), including checks / frontend (scripts/verify_install.py wheel build/install), checks / desktop / macos, checks / desktop / windows, and checks / python.
  • Independent AI pre-review:
    • Score: 93/100 (no blocking findings)
    • Reviewed base: 83b142f02f03cf670dab65ebef12772550f550df
    • Reviewed head: 2439c6c59cfaeee754eefa7bdf127eddadb34af3
    • Material validation gaps: PR-triggered Release checks (wheel install scripts/verify_install.py and packaged macOS/Windows desktop runtime smoke) are pending CI.

Evidence that it works

Visual evidence is N/A because this is a single-line packaging dependency constraint in pyproject.toml with no UI or visual changes.

Non-visual runtime receipts on 2439c6c59cfaeee754eefa7bdf127eddadb34af3:

  • Resolution: uv pip compile pyproject.toml --quiet -> fastapi==0.165.1, opentelemetry-api==1.45.3 (excludes broken 1.46.0).

  • Before (fastapi==0.165.1 + opentelemetry-api==1.46.0): TestClient(app).get('/health') exits 1 with TypeError: get_logger() takes 1 positional argument but 3 positional arguments (and 1 keyword-only argument) were given at fastapi/telemetry/_asgi.py:332.

  • After (fastapi==0.165.1 + opentelemetry-api==1.45.3): TestClient(app).get('/health') exits 0 with AFTER_OK 0.165.1 1.45.3.

  • Applicable evidence attached and any visual N/A explained

Provider verification

No real model provider calls were made.

  • Real-provider calls are described honestly, or none were made

Bilingual UI

No user-facing copy changed.

  • Both locales are updated, or no user-facing copy changed

@FayeSpica FayeSpica added type:bug Something is broken area:install Install, startup and environment support area:ci Continuous integration and checks area:desktop Desktop integration / 桌面集成 labels Dec 4, 2026
@FayeSpica
FayeSpica merged commit 976d4c3 into ThinkFlowLab:main Dec 4, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Continuous integration and checks area:desktop Desktop integration / 桌面集成 area:install Install, startup and environment support type:bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant