-
Couldn't load subscription status.
- Fork 130
fix: parallelize runner config endpoints #3253
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
fix: parallelize runner config endpoints #3253
Conversation
|
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.
How to use the Graphite Merge QueueAdd 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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Pull Request Review: Parallelize Runner Config EndpointsSummaryThis PR successfully parallelizes datacenter operations in runner config endpoints ( Code Quality ✅Strengths
Refactoring QualityThe transformation from sequential to parallel follows a clean pattern:
Potential Issues 🔍1. Error Handling Inconsistency (Minor)Location: The error handling differs between branches: // In upsert.rs:123 (with runner_config)
anyhow::Ok(response.endpoint_config_changed)
// In upsert.rs:148 (without runner_config)
Ok(false)While both work, using Recommendation: Use 2. Unnecessary Cloning in upsert.rs (Performance)Location: let dcs = ctx
.config()
.topology()
.datacenters
.iter()
.map(|dc| (dc.clone(), body.datacenters.remove(&dc.name)))
.collect::<Vec<_>>();This creates an intermediate futures_util::stream::iter(
ctx.config()
.topology()
.datacenters
.iter()
.map(|dc| (dc.clone(), body.datacenters.remove(&dc.name)))
)However, there's a subtle issue: 3. Context vs with_context Usage (Style)Location: Changed from: return Err(res).with_context(|| "all datacenter requests failed");to: return Err(res).context("all datacenter requests failed");This is an improvement! Using Performance Considerations ✅Positive Impact
Considerations
Security Concerns 🔒No Issues Found
Test Coverage
|
Merge activity
|

No description provided.