fix: two silently-inert capabilities found by building a service on 26.07.01 (release 26.09.01) - #160
Merged
Merged
Conversation
…6.07.01 - observability: TracingAutoConfiguration read OTEL_EXPORTER_OTLP_ENDPOINT — a BASE url per the OTel spec — and passed it to OTLPSpanExporter(endpoint=...), which wants the COMPLETE signal url. An operator setting the spec-correct http://collector:4318 got an exporter POSTing to a non-signal path, so every span was dropped with nothing logged. Both spellings now work, from either the env var or pyfly.observability.tracing.otlp.endpoint. - web: collect_route_metadata() looked only at __pyfly_mapping__, so @sse_mapping routes never reached /openapi.json or `pyfly openapi`. SSE is plain HTTP and is now emitted as the GET it is, with a text/event-stream response. WebSocket has no OpenAPI representation, so @websocket_mapping routes are published under the new document-level x-pyfly-websocket-routes extension rather than omitted in silence — a deleted stream used to read as no change in an OpenAPI diff. - dev: opentelemetry-exporter-otlp-proto-http joins the dev group. OTLP is the default exporter yet appeared in no extra, so CI never imported it and the whole OTLP path, endpoint bug included, went unexercised. Also corrects the README version badge, left at 26.06.114 by the v26.07.01 release. Release 26.09.01.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects found while building a production service (dworkers) against
26.07.01. Both are the sameshape: a capability PyFly advertises, wired in a way that silently did nothing.
Fixed
The OTLP endpoint is now built to the OpenTelemetry specification.
OTEL_EXPORTER_OTLP_ENDPOINTis a base url — the SDK appends the per-signal path — whileOTEL_EXPORTER_OTLP_TRACES_ENDPOINTand the exporter's ownendpoint=argument are the complete url,used verbatim.
TracingAutoConfigurationread the base variable and handed it straight toOTLPSpanExporter(endpoint=...), collapsing the two: an operator who set the spec-correcthttp://collector:4318got an exporter POSTing tohttp://collector:4318, which is not a signal endpoint,so every span was dropped and nothing was logged. The only way to make it work was to write a value into
the base variable that the spec says is not a base.
Both spellings work now — a url with no path is treated as a base and gains
/v1/traces, one that alreadyhas a path is left alone — and the same normalisation applies to
pyfly.observability.tracing.otlp.endpoint.@sse_mappingroutes appear in the OpenAPI document.collect_route_metadata()looked only at__pyfly_mapping__, so server-sent-event routes were absent from/openapi.jsonand frompyfly openapiwith nothing said about it. A CI job that exports the document anddiffs it — the standard way to keep an HTTP surface honest — could not see the streaming half of the API at
all, and a deleted stream read as no change. SSE is plain HTTP, so it is now emitted as the GET it is, with a
text/event-streamsuccess response.Added
x-pyfly-websocket-routes. WebSocket has no OpenAPI representation — that is what AsyncAPI is for — butleaving
@websocket_mappingroutes out entirely made the document quietly incomplete in the same way SSEwas.
ControllerRegistrar.collect_websocket_routes()reports them and the generator publishes them underthis document-level extension: still not operations, but visible, diffable, and honest about what the
document does not cover. Wired through
pyfly openapi, the Starlette adapter and the FastAPI adapter alike.opentelemetry-exporter-otlp-proto-httpas a dev dependency. OTLP is the exporterTracingAutoConfigurationselects by default as soon as an endpoint is configured, yet it appears in noextra — so no CI job ever imported it and the entire OTLP path, the endpoint bug above included, went
unexercised. Dev-only: applications still choose and pay for their own exporter.
Changed
The README version badge, which the
v26.07.01release left at26.06.114.Verification
pytest tests/(CI's ignore set)mypy src/pyfly --strictruff check/ruff format --checkuv buildVersion bumped to
26.09.01(PEP 44026.9.1) with a CHANGELOG entry. The tag is deliberately notpushed — pushing
v*publishes, and that is a human decision.