Skip to content

feat(oauth): caching, shareable authenticator #19

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

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented Nov 8, 2024

Implements a shareable Authenticator which periodically refreshes the token it holds through a spawnable task. The interval for refreshing the token is configurable.

We share this authenticator across all the builder tasks that need it, and spawn the refresh task along with all other handles.

Closes ENG-633

@Evalir Evalir self-assigned this Nov 11, 2024
Copy link
Contributor

@dylanlott dylanlott left a comment

Choose a reason for hiding this comment

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

:shipit:

@Evalir Evalir merged commit 4f8ebc6 into dylan/bundle-poller Nov 12, 2024
4 checks passed
@Evalir Evalir deleted the evalir/caching-authenticator branch November 12, 2024 17:08
Evalir added a commit that referenced this pull request Nov 12, 2024
* WIP: adding bundle fetcher support

* WIP: separating auth out into authenticator

* WIP: fixing the cannot drop a runtime in a blocking context error

* WIP: Fixes tokio runtime drop bug

* wip: cleanup and remove imports

* chore: fix dep error

* chore: mark bundle poller test as it

* feat: spawn bundle poller and handle exits

* feat: ingest bundle transactions, drop bundle on failure

This implements ingesting bundle transactions naively. It does not take into account the bundle "rules", so to say, which would make it a bit more complex. If a transaction fails to decode, the bundle is considered "invalid", and dropped.

* chore: clippy

* chore: comments

* chore: clarify comment on signed orders

* chore: dedup oauth, do not use spawn blocking

* chore: remove unneeded async

* chore: clean up authenticator

* feat: track seen bundles to dedup

* feat(`oauth`): caching, shareable authenticator (#19)

* feat: caching, shareable authenticator

* fix: actually spawn builder task lmao

* chore: remove unnecesary mut selfs

---------

Co-authored-by: evalir <e@evalir.xyz>
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