Skip to content

feat(deps): upgrade pyattest and cbor2 - #274

Merged
subpath merged 2 commits into
mainfrom
upgrade-pyattest-cbor2
Sep 17, 2026
Merged

subpath merged 2 commits into
mainfrom
upgrade-pyattest-cbor2

Conversation

@subpath

@subpath subpath commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bumps pyattest 1.0.2 -> 1.0.5, cbor2 5.7.0 -> 6.1.3.
  • Unblocks the cbor2 6.x bump (chore(deps): bump cbor2 from 5.7.0 to 6.1.3 #207): pyattest 1.0.2 imports cbor2's C extension from a path removed in 6.x. 1.0.5 fixes it.
  • pyattest 1.0.5 made Attestation.verify() a coroutine, updated verify_attest() for that.

Threading

  • run_in_threadpool(attestation.verify) (old code, unchanged) -> runs but verifies nothing: constructs the coroutine in the thread, never drives it.
  • Can't drop run_in_threadpool either: verify() is CPU-bound, so awaiting it directly blocks the event loop for every concurrent request.
  • I think the best option is: run_in_threadpool(asyncio.run, attestation.verify()).

Benchmark: real verify_attest(), main vs this branch

400 concurrent calls, 3 runs each, DB write and GCS cert download mocked:

Throughput (req/s)
main 603 / 589 / 634 (avg 609)
this branch 670 / 697 / 704 (avg 690)

~13% faster, no regressions.

@subpath
subpath requested a review from a team as a code owner September 17, 2026 13:37
Comment thread src/mlpa/core/routers/appattest/appattest.py Outdated

@noahpodgurski noahpodgurski left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

@subpath
subpath merged commit 63a58ff into main Sep 17, 2026
6 checks passed
@subpath
subpath deleted the upgrade-pyattest-cbor2 branch September 17, 2026 14:15
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.

2 participants