Repository navigation
Vendor BufferingWrapper with flush() from bluesky - #77
Merged
Merged
Conversation
danielballan
approved these changes
Nov 2, 2026
Member
|
Merge at will. |
tiled 0.2.21 migrated its client from httpx to httpx2, changing the exception family raised through it: ClientError now subclasses httpx2.HTTPStatusError, so our `except httpx.HTTPStatusError` clauses silently stopped matching. Concretely, the remote-validation 404 fallbacks in BlueskyRun.validate and TiledWriter raised instead of falling back to local validation. Pin tiled >=0.2.21 (runtime and test group) and switch both sites to httpx2, declared as a direct dependency since we import it. A small test guards the contract (ClientError is catchable via httpx2.HTTPStatusError) so the next migration fails loudly instead of silently.
tiled 0.2.21 (the httpx2 generation) dropped Python 3.10, which made the dependency resolution unsatisfiable for the 3.10 split of the supported range and failed CI on every job, including 3.13 and the docs build. - Bump `requires-python` to >=3.11 and drop the 3.10 classifier - Update mypy `python_version` and pylint `py-version` to 3.11 - Test on 3.11 (new floor) and 3.13 in CI - Update the Python version requirement in the installation tutorials - Use `itertools.pairwise` in StreamDatum batching, resolving an old TODO
SQLAlchemy 2.1 deprecates the `noload` loader strategy, which tiled's catalog ORM uses for the `Webhook.node` relationship. With warnings raised as errors, the deprecation fails `configure_mappers()` and with it every test that starts the in-process server. This is a third-party issue, to be fixed in tiled.
Vendor bluesky.callbacks.buffer.BufferingWrapper (following the _dispatcher precedent) with the addition of the flush() method, contributed upstream on the bluesky add-buffer-flush branch but not yet released. This lets beamline profiles adopt the read-after-write synchronization barrier via a bluesky-tiled-plugins release: documents are processed in a background thread, so code that reads a run back immediately after RE(plan) returns (e.g. db[uid]) must call flush() first or it may observe a missing or incomplete run, or silently pick up the previous one. The vendored module is self-contained (standard library only) and exported from the package root, so profiles can import TiledInserter/TiledWriter and BufferingWrapper from one place. It can be replaced by a re-export once a bluesky release includes flush().
genematx
force-pushed
the
blocking-buffer
branch
from
November 2, 2026 23:21
6308615 to
7c95b46
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 78.78% 78.98% +0.20%
==========================================
Files 16 17 +1
Lines 2432 2498 +66
==========================================
+ Hits 1916 1973 +57
- Misses 516 525 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Vendor bluesky.callbacks.buffer.BufferingWrapper (following the _dispatcher precedent) with the addition of the flush() method, contributed upstream on the bluesky add-buffer-flush branch but not yet released. This lets beamline profiles adopt the read-after-write synchronization barrier via a bluesky-tiled-plugins release: documents are processed in a background thread, so code that reads a run back immediately after RE(plan) returns (e.g. db[uid]) must call flush() first or it may observe a missing or incomplete run, or silently pick up the previous one.
The vendored module is self-contained (standard library only) and exported from the package root, so profiles can import TiledInserter/TiledWriter and BufferingWrapper from one place. It can be replaced by a re-export once a bluesky release includes flush().