Skip to content

Conversation

@MasterPtato
Copy link
Contributor

Changes

Copy link
Contributor Author

MasterPtato commented Jun 4, 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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 4, 2025

Deploying rivet-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: fec69e4
Status: ✅  Deploy successful!
Preview URL: https://1200a1e4.rivet-studio.pages.dev
Branch Preview URL: https://06-04-feat-clusters-add-marg.rivet-studio.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 4, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: fec69e4
Status: ✅  Deploy successful!
Preview URL: https://c3a49a51.rivet-hub-7jb.pages.dev
Branch Preview URL: https://06-04-feat-clusters-add-marg.rivet-hub-7jb.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 4, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: fec69e4
Status: ✅  Deploy successful!
Preview URL: https://5769caf4.rivet.pages.dev
Branch Preview URL: https://06-04-feat-clusters-add-marg.rivet.pages.dev

View logs

@NathanFlurry NathanFlurry force-pushed the 06-04-fix_guard_return_error_response_on_router_error branch from b87a3c1 to a2b2d0d Compare June 5, 2025 00:58
@NathanFlurry NathanFlurry force-pushed the 06-04-feat_clusters_add_margin_per_pool branch from 54b6d3c to 9178981 Compare June 5, 2025 00:58
@MasterPtato MasterPtato force-pushed the 06-04-feat_clusters_add_margin_per_pool branch from 9178981 to fbd78df Compare June 5, 2025 02:10
@MasterPtato MasterPtato marked this pull request as ready for review June 5, 2025 02:11
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

Introduces per-pool margin configuration by moving autoscaling margin from global config to individual pool settings in the cluster service. This change provides more granular control over pool scaling behavior.

  • Added margin field to Pool struct in packages/core/services/cluster/src/types.rs with #[serde(default)] for backward compatibility
  • Removed autoscale_margin from pool configuration structs in packages/common/config/src/config/server/rivet/cluster_provision.rs
  • Updated datacenter workflow in packages/core/services/cluster/src/workflows/datacenter/mod.rs to handle per-pool margin updates
  • Improved error handling for pool creation validation by upgrading warning logs to error logs

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +341 to 342
tracing::error!("must have `max_count` when creating a new pool");
return Ok(());
Copy link

Choose a reason for hiding this comment

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

logic: Error message is incorrect - mentions 'max_count' but should be 'drain_timeout'

Suggested change
tracing::error!("must have `max_count` when creating a new pool");
return Ok(());
let Some(drain_timeout) = pool.drain_timeout else {
tracing::error!("must have `drain_timeout` when creating a new pool");
return Ok(());
};

@MasterPtato MasterPtato force-pushed the 06-04-feat_clusters_add_margin_per_pool branch from 468cfa5 to fec69e4 Compare June 6, 2025 18:29
@MasterPtato MasterPtato force-pushed the 06-04-fix_guard_return_error_response_on_router_error branch from bf7487c to 78b6466 Compare June 6, 2025 18:29
@graphite-app
Copy link
Contributor

graphite-app bot commented Jun 9, 2025

Merge activity

  • Jun 9, 4:47 PM UTC: MasterPtato added this pull request to the Graphite merge queue.
  • Jun 9, 4:48 PM UTC: CI is running for this pull request on a draft pull request (#2574) due to your merge queue CI optimization settings.
  • Jun 9, 4:49 PM UTC: Merged by the Graphite merge queue via draft PR: #2574.

graphite-app bot pushed a commit that referenced this pull request Jun 9, 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 closed this Jun 9, 2025
@graphite-app graphite-app bot deleted the 06-04-feat_clusters_add_margin_per_pool branch June 9, 2025 16:49
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.

1 participant