Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v2 migration Cloudflare KV #81

Merged
merged 9 commits into from
Jun 27, 2024
Merged

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented Jun 24, 2024

Description

Prepares for the Verify Server V2 migration by mirroring all attestation writes to Cloudflare KV. Also reads attestations from Cloudflare KV if not found in Redis.

Remaining work:

How Has This Been Tested?

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

Copy link
Member

@xDarksome xDarksome left a comment

Choose a reason for hiding this comment

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

No need to fix any of this, just for the future

Liking the composability of the abstractions already? 😄

#[derive(Clone)]
pub struct CloudflareKv {
pub endpoint: Url,
pub token_manager: TokenManager,
Copy link
Member

Choose a reason for hiding this comment

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

attestation_store -> http_server dependency really stinks, but oh well it's going to be deprecated anyway 😄

src/attestation_store/cf_kv.rs Outdated Show resolved Hide resolved
src/attestation_store/migration.rs Outdated Show resolved Hide resolved
@chris13524
Copy link
Member Author

Liking the composability of the abstractions already?

Actually they constrained what I wanted to implement: I wanted to call the regular get attestation endpoint from the worker, but this did an additional lookup on the data lake API which would've added latency and be redundant with the lookup that's being done here. If the abstraction wasn't so strong it probably would've been easier to use the response from the worker exclusively and disable the redundant lookup here.

Instead I made a new endpoint on the worker that didn't do the data lake call so that it would fit into the AttestationStore abstraction.

@chris13524 chris13524 merged commit 527987e into main Jun 27, 2024
16 checks passed
@chris13524 chris13524 deleted the feat/v2-migration-cf-kv branch June 27, 2024 17:01
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