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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1180 tests fail with python 3.14 with versions 5.3.0 and 5.4.0

1 participant