chore: Prepare 3.1.0 — fix the release pipeline and stop OtlpExporter discarding events - #89
Merged
Merged
Conversation
v3.0.2 is tagged, has a GitHub release, and is not on PyPI. `pip install pyetwkit` has been getting 3.0.1 since December. Two things went wrong, and the second is the dangerous one. The release run failed because the 3.14 wheel build failed, which correctly blocked publishing. Someone then re-ran the workflow manually -- and that run went green with `Publish to PyPI` skipped, because `workflow_dispatch` can never satisfy `if: github.event_name == 'release'`. The recovery path reports success while doing nothing, which is why this went unnoticed for nine months. Give `workflow_dispatch` an explicit `publish` input, default false, so a failed release can be finished without a dispatch ever uploading by accident. Also check the artifact set before uploading. PyPI does not allow a version to be re-uploaded, so publishing four wheels instead of five is not a mistake that can be corrected afterwards; count them and fail instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhPcm483PrDmuQEUSALBFn
`OtlpExporter.flush()` cleared the batch and returned True. There is no HTTP or gRPC client anywhere in the module, so every event was dropped and the caller was told it had been delivered. Against a closed port -- 127.0.0.1:1 -- every `export()` and `flush()` still returned True. README advertised it as a v3.0 feature, "Export events to OTLP (Jaeger, Grafana, Datadog)", with a worked example. #52 was closed as done on this code. Raise NotImplementedError from `flush()` when there is anything buffered. A monitoring pipeline that reports success while sending nothing is worse than one that stops: the failure is at least visible. `shutdown()` stays quiet, since callers reach it from `finally` and a teardown path is the wrong place to learn this. Correct the README and the docstrings to describe what exists. `OtlpFileExporter` does work and writes spans to JSON/JSONL, so the example now uses it. The changelog entry for v3.0.0 keeps its wording, with a note that the transport was never implemented -- rewriting what was announced would hide the same fact twice. The tests could not have caught this: `test_exporter_flush` asserted `hasattr(exporter, "flush")` without calling it, one of ten `hasattr`-only tests in the file. Replaced with tests that exercise the behaviour, plus a regression guard on OtlpFileExporter. Closes #88 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhPcm483PrDmuQEUSALBFn
Since v3.0.1, the last version PyPI actually has, event properties went from a hardcoded guess list of twelve names to whatever the provider's schema declares, which is the substance of this release. Arrays, nested structures and WPP came with it, and `pip install .` was fixed -- it had never worked. Minor rather than patch: the API gains `set_wpp_pdb_path`, `set_wpp_tmf_file`, `set_wpp_tmf_search_path`, `set_property_formatting`, `formatted_properties` and `raw_data`, all additive. 3.0.2 is skipped rather than reused. That version is tagged and has a GitHub release but never reached PyPI, and republishing a version number that already means something to anyone who read the release notes would be worse than leaving a gap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhPcm483PrDmuQEUSALBFn
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.
Summary
Release preparation for 3.1.0, and two things found while checking whether releasing was safe.
v3.0.2 is tagged, has a GitHub release, and is not on PyPI.
pip install pyetwkithas been getting 3.0.1 since December.Changes
1. The release pipeline could not recover from a failure
The re-run went green while publishing nothing, because
workflow_dispatchcan never satisfyif: github.event_name == 'release'. The recovery path reports success and does nothing, which is how this went unnoticed for nine months.workflow_dispatchgains an explicitpublishinput, defaultfalse, so a failed release can be finished without a dispatch ever uploading by accident.2.
OtlpExporterreported success while discarding everything — closes #88flush()now raisesNotImplementedErrorwhen anything is buffered. A monitoring pipeline that reports success while sending nothing is worse than one that stops.shutdown()stays quiet — callers reach it fromfinally, and teardown is the wrong place to learn this.README and docstrings corrected to describe what exists.
OtlpFileExporterworks and the example now uses it.3. Version 3.1.0
Minor, not patch:
set_wpp_pdb_path,set_wpp_tmf_file,set_wpp_tmf_search_path,set_property_formatting,formatted_propertiesandraw_dataare all new. 3.0.2 is skipped rather than reused — republishing a number that already means something to anyone who read its release notes would be worse than a gap.Related Issue
Closes #88
Test Plan
Added/Modified Tests
test_exporter_flushassertedhasattr(exporter, "flush")without calling it — one of tenhasattr-only tests in that file, which is why this shipped. Replaced with five behavioural tests: flush raises,export_batchraises, an empty flush is not an error,shutdowndoes not raise, and a regression guard thatOtlpFileExporterstill writes its spans.Test Results
The
release.ymlchange cannot be exercised by CI — publishing is the thing being fixed. What is verified is that the workflow parses and the job wires up as intended:The artifact check is a plain
find | wc -lagainst known counts, so its failure mode is a wrong count, not a wrong upload.Checklist
Additional Notes
After merging, cutting the release is: tag
v3.1.0, publish a GitHub release, and check PyPI actually received it rather than trusting the green tick. If the run fails partway, re-run withpublish: true— which now works.I have not created the tag or the release; publishing to PyPI is irreversible and yours to trigger.
Still open, deliberately: the OTLP transport itself. #88 is closed by making the failure visible, not by implementing it. Whether to reopen #52 or file a fresh issue for the transport is the one decision left over from that discussion.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HhPcm483PrDmuQEUSALBFn