Skip to content

feat: add native async provider API - #508

Open
domenkozar wants to merge 1 commit into
mainfrom
feat/async-provider
Open

domenkozar wants to merge 1 commit into
mainfrom
feat/async-provider

Conversation

@domenkozar

@domenkozar domenkozar commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Async libraries currently have to call SecretSpec's synchronous provider interface, even when a backend already uses an async SDK. Add an object-safe AsyncProvider trait and let each backend implement its native storage interface once. The existing Provider, Secrets resolver, and CLI interfaces remain compatible.

  • Async SDK, HTTP, and external IPC backends implement AsyncProvider and shared ProviderBase for configuration, credentials, capabilities, naming, and identity. Their handwritten synchronous storage bridges are removed.
  • Registration exposes native async backends directly to async callers and installs SyncProviderAdapter for the synchronous registry. Existing synchronous backends use AsyncProviderAdapter and Tokio's blocking pool when called asynchronously.
  • Preserve write and deletion policies, expiry and revision metadata, optimized batching, retry ownership, and credential/context setup. Planning stays free of backend I/O; IPC capability negotiation and remote address resolution stay behind the appropriate async boundary.
  • Retain the existing synchronous ExternalProvider facade, with as_async() and into_async() access to its native backend. Document cancellation behavior for started blocking operations.
  • Document the architecture in Adding providers as new in 0.22 and add one Unreleased changelog entry.

Validation:

  • Provider unit tests: 1,018 passed, four ignored; SOPS tests skipped because the executable is unavailable locally.
  • Async integration tests: 24 passed with default features and 24 with --no-default-features.
  • Four direct async IPC tests and three existing IPC conformance tests.
  • Tests cover native factories, both adapter directions, configuration forwarding before I/O, pure planning, batch deduplication and overrides, metadata, current-thread runtime progress, retry budgets, mutation non-replay, and stale IPC capabilities.
  • Rust doctests: 16 passed. Formatting, Clippy, and documentation build passed.

Closes #503.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🔍 Suggested Reviewers

Based on git blame analysis of the changed lines, the following contributors have significant experience with the modified code:

  • @MaxDaten - 30.4% of changed lines (167 lines)
  • @dc-tec - 22.2% of changed lines (122 lines)

Please consider reviewing this PR as you have authored significant portions of the code being modified. Your expertise would be valuable! 🙏

This comment was automatically generated by git-blame-auto-reviewer

Last updated: 2026-10-26T22:42:28.571Z

@domenkozar domenkozar mentioned this pull request Oct 26, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
secretspec 728188d Commit Preview URL

Branch Preview URL
Oct 26 2026, 10:42 PM

This branch has not been deployed

No deployments
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.

Add async provider

1 participant