Skip to content

Fix workers observability needle schema - #2746

Open
FranciscoMaxwell wants to merge 1 commit into
cloudflare:mainfrom
FranciscoMaxwell:fix-workers-observability-needle-schema
Open

FranciscoMaxwell wants to merge 1 commit into
cloudflare:mainfrom
FranciscoMaxwell:fix-workers-observability-needle-schema

Conversation

@FranciscoMaxwell

Copy link
Copy Markdown
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Fixes #2737.

  • Make SharedQueryGetResponse's RunQueryParametersNeedleValue a BaseModel, matching the same type in telemetry_query_response.py.
  • Add a regression test that forces RunQueryParametersNeedle to rebuild its Pydantic schema.

Additional context & links

This avoids the Pydantic schema generation failure reported for the Workers Observability types when newer Pydantic/Python versions eagerly rebuild the model schema.

Tests:

  • .\.venv\Scripts\python.exe -m pytest tests/api_resources/workers/observability/test_shared_queries.py::TestSharedQueries::test_run_query_parameters_needle_schema_rebuilds
  • .\.venv\Scripts\python.exe -m compileall src/cloudflare/types/workers/observability/shared_query_get_response.py tests/api_resources/workers/observability/test_shared_queries.py
  • Manual smoke: RunQueryParametersNeedle.model_rebuild(force=True) and client.workers import/access
jwvdboschHotmail pushed a commit to jwvdboschHotmail/cloudflare-python that referenced this pull request Oct 17, 2026
* chore: skip fraud.update test (HTTP 422 from prism)

Failure observed in CI run 25171503153 on cloudflare-typescript PR cloudflare#2746.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant