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

chore: update reqwest client #2249

Conversation

NathanFlurry
Copy link
Member

Changes

Copy link
Member Author

NathanFlurry commented Mar 22, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR centralizes and standardizes HTTP client configuration by introducing a shared reqwest client pool in rivet-pools, affecting multiple services across the codebase.

  • Added new packages/common/pools/src/reqwest.rs with a static OnceCell client configured with 30-second timeout
  • Added reqwest 0.11 as direct dependency in packages/common/pools/Cargo.toml rather than through workspace
  • TODO comments in nomad-util/src/lib.rs indicate async client initialization needs proper implementation
  • Updated Configuration structs across multiple services to use the shared client from rivet_pools::reqwest::client()
  • Potential issue with async/sync mismatch in nomad-util functions that need refactoring

10 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -34,6 +34,7 @@ url = "2.4"
uuid = { version = "1", features = ["v4"] }
scc = "2.3.3"
tokio-native-tls = "0.3.1"
reqwest = "0.11"
Copy link

Choose a reason for hiding this comment

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

style: Consider using workspace version for reqwest like other dependencies to maintain consistency across the project

.build()
})
.await
.cloned()
Copy link

Choose a reason for hiding this comment

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

style: Using clone() on each client request could be inefficient - consider returning a reference instead since Client is already Arc-based

Suggested change
.cloned()
.await

Copy link

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 569b905
Status: ✅  Deploy successful!
Preview URL: https://48cf07cd.rivet.pages.dev
Branch Preview URL: https://03-22-chore-update-reqwest-c.rivet.pages.dev

View logs

Copy link
Contributor

graphite-app bot commented Mar 26, 2025

Merge activity

  • Mar 26, 3:00 AM EDT: NathanFlurry added this pull request to the Graphite merge queue.
  • Mar 26, 3:00 AM EDT: CI is running for this pull request on a draft pull request (#2273) due to your merge queue CI optimization settings.
  • Mar 26, 3:01 AM EDT: A user merged this pull request with the Graphite merge queue via draft PR: #2273.

graphite-app bot pushed a commit that referenced this pull request Mar 26, 2025
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot deleted the branch 03-21-chore_disable_otel March 26, 2025 07:01
@graphite-app graphite-app bot closed this Mar 26, 2025
@graphite-app graphite-app bot closed this Mar 26, 2025
@graphite-app graphite-app bot deleted the 03-22-chore_update_reqwest_client branch March 26, 2025 07: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