Skip to content

Conversation

MasterPtato
Copy link
Contributor

Changes

@MasterPtato MasterPtato requested a review from NathanFlurry May 23, 2025 23:23
Copy link
Contributor Author

MasterPtato commented May 23, 2025


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 disambiguates between cluster_id and instance_id across the Rivet codebase, clarifying that instance_id uniquely identifies the entire Rivet cluster while cluster_id refers to specific clusters within an instance.

  • Renamed cluster_id column to rivet_instance_id in packages/core/services/dynamic-config/db/dynamic-config/migrations/20250523120501_instance_id.up.sql
  • Added instance_id field to Rivet configuration in packages/common/config/src/config/server/rivet/mod.rs
  • Updated telemetry beacon in packages/core/services/telemetry/standalone/beacon/src/lib.rs to use instance_id for tracking
  • Modified get_config.rs to handle instance_id with clear documentation about its purpose
  • Added instance_id support in worker and guard configurations for consistent identification

6 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +1 to +2
ALTER TABLE config
RENAME COLUMN cluster_id TO rivet_instance_id;
Copy link

Choose a reason for hiding this comment

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

logic: This migration will break get_config.rs which still references the cluster_id column in its SQL queries. Update all dependent code before running this migration.

Comment on lines +63 to +66
/// If specified, will use this as the default cluster ID.
///
/// This will have no effect if applied after the cluster has first ran.
pub instance_id: Option<Uuid>,
Copy link

Choose a reason for hiding this comment

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

logic: Documentation comment appears to be incorrect - refers to 'default cluster ID' but this is for instance_id

@@ -171,7 +177,7 @@ impl Rivet {
}
}

impl Rivet {
impl Rivet {
Copy link

Choose a reason for hiding this comment

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

syntax: Extra tab character after impl Rivet

Comment on lines +20 to 21
// Pick an instance ID to insert if none exists. If this is specified in the config. fall back to
// this.
Copy link

Choose a reason for hiding this comment

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

syntax: Comment has a period in the middle of a sentence: 'If this is specified in the config. fall back to'

Suggested change
// Pick an instance ID to insert if none exists. If this is specified in the config. fall back to
// this.
// Pick an instance ID to insert if none exists. If this is specified in the config, fall back to
// this.

Comment on lines +193 to +195
// /// This is helpful for diagnosing issues with the self-hosted instances under
// /// load. e.g. if a instance is running on constraint resources (see os_report),
// /// does the instance configuration affect it?
Copy link

Choose a reason for hiding this comment

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

syntax: typo: 'constraint resources' should be 'constrained resources'

Suggested change
// /// This is helpful for diagnosing issues with the self-hosted instances under
// /// load. e.g. if a instance is running on constraint resources (see os_report),
// /// does the instance configuration affect it?
// /// This is helpful for diagnosing issues with the self-hosted instances under
// /// load. e.g. if a instance is running on constrained resources (see os_report),
// /// does the instance configuration affect it?

Copy link

cloudflare-workers-and-pages bot commented May 23, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 08baa4f
Status: ✅  Deploy successful!
Preview URL: https://9b743418.rivet.pages.dev
Branch Preview URL: https://graphite-base-2473.rivet.pages.dev

View logs

Copy link
Contributor

graphite-app bot commented May 26, 2025

Merge activity

  • May 26, 10:42 PM UTC: MasterPtato added this pull request to the Graphite merge queue.
  • May 26, 10:43 PM UTC: CI is running for this pull request on a draft pull request (#2476) due to your merge queue CI optimization settings.
  • May 26, 10:44 PM UTC: Merged by the Graphite merge queue via draft PR: #2476.

graphite-app bot pushed a commit that referenced this pull request May 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 closed this May 26, 2025
@graphite-app graphite-app bot deleted the 05-23-disambiguate_cluster_id_-_instance_id branch May 26, 2025 22:44
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