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

fix: get stuff building #2020

Open
wants to merge 1 commit into
base: 02-11-fix_cluster_write_install_script_for_worker_pool
Choose a base branch
from

Conversation

MasterPtato
Copy link
Contributor

Changes

Copy link

cloudflare-workers-and-pages bot commented Feb 12, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9f0ded
Status:🚫  Build failed.

View logs

Copy link
Contributor Author

MasterPtato commented Feb 12, 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

cloudflare-workers-and-pages bot commented Feb 12, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9f0ded
Status: ✅  Deploy successful!
Preview URL: https://a1ddfd54.rivet-hub-7jb.pages.dev
Branch Preview URL: https://02-12-fix-get-stuff-building.rivet-hub-7jb.pages.dev

View logs

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 focuses on fixing build issues across the Rivet codebase by updating dependencies and modifying database configurations, particularly around FoundationDB and reqwest HTTP client.

  • Switches from musl to glibc in edge server Dockerfiles for Linode compatibility, updating from Rust 1.81.0 to 1.82.0
  • Makes FoundationDB configuration optional across multiple services with proper handling in pools and test contexts
  • Updates reqwest from 0.11 to 0.12 consistently across all packages while maintaining feature flags
  • Adds comprehensive database migrations for DS service with new tables and indexes, though several down migrations are missing rollback logic
  • Temporarily switches to LSilent/cloudflare-rs fork until PR [RVT-3410] Implement realtime container metrics #256 is merged in official repo

58 file(s) reviewed, 29 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "strace -o strace.log -f vite",
Copy link

Choose a reason for hiding this comment

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

style: using strace in development may significantly slow down the development server and generate large log files

Comment on lines +45 to +47
let mut root = rivet_config::config::Root::default();
root.server.as_mut().unwrap().foundationdb = Some(Default::default());
let config = rivet_config::Config::from_root(root);
Copy link

Choose a reason for hiding this comment

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

logic: Ensure Default::default() for FoundationDB provides all required fields for test environments. Missing required fields could cause runtime issues.

@@ -40,7 +40,7 @@ pub struct Server {
#[serde(default)]
pub prometheus: Option<Prometheus>,
#[serde(default)]
pub foundationdb: FoundationDb,
pub foundationdb: Option<FoundationDb>,
Copy link

Choose a reason for hiding this comment

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

style: Missing a corresponding getter method like other optional fields (e.g. fn foundationdb(&self) -> GlobalResult<&FoundationDb>)

Comment on lines 48 to 50
let pools = rivet_pools::Pools::test(config.clone())
.await
.expect("failed to create pools");
Copy link

Choose a reason for hiding this comment

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

style: Consider adding error context to the expect() message to clarify what specific pool creation failed

Comment on lines +30 to +38
// println!("Running yarn build");
// let output = Command::new("yarn")
// .current_dir(&hub_path)
// .args(["dlx", "turbo", "run", "build:embedded"])
// .env("VITE_APP_API_URL", "__APP_API_URL__")
// .output()?;
// println!("stdout:\n{}", String::from_utf8_lossy(&output.stdout));
// println!("stderr:\n{}", String::from_utf8_lossy(&output.stderr));
// assert!(output.status.success(), "hub build failed");
Copy link

Choose a reason for hiding this comment

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

logic: commenting out build step breaks hub application deployment - either uncomment or provide alternative build mechanism

Comment on lines +1 to +2
ALTER TABLE docker_ports_protocol_game_guard
ALTER COLUMN port_number DROP NOT NULL;
Copy link

Choose a reason for hiding this comment

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

logic: Making port_number nullable could cause runtime errors if any code assumes this field is always populated. Verify all consumers of this field handle null values appropriately.

server_id UUID NOT NULL,
port_name TEXT NOT NULL,
auth_type INT NOT NULL,
key TEXT,
Copy link

Choose a reason for hiding this comment

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

style: Consider adding NOT NULL constraint to key if it's required for certain auth_type values

Comment on lines +1 to +2
ALTER TABLE game_config
ALTER COLUMN runtime SET DEFAULT 0;
Copy link

Choose a reason for hiding this comment

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

logic: Setting a default value of 0 for runtime may cause issues if 0 is not a valid runtime type in the application. Consider using a known valid runtime value or making the column non-nullable with an explicit valid default.

RENAME COLUMN kill_timeout_ms TO lifecycle_kill_timeout_ms,
ADD COLUMN lifecycle_durable BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN reschedule_retry_count INT NOT NULL DEFAULT 0,
ADD COLUMN last_reschedule_retry_ts INT;
Copy link

Choose a reason for hiding this comment

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

logic: last_reschedule_retry_ts should have a NOT NULL constraint since it's used for tracking timestamps

RENAME COLUMN kill_timeout_ms TO lifecycle_kill_timeout_ms,
ADD COLUMN lifecycle_durable BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN reschedule_retry_count INT NOT NULL DEFAULT 0,
ADD COLUMN last_reschedule_retry_ts INT;
Copy link

Choose a reason for hiding this comment

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

style: Consider adding a CHECK constraint to ensure last_reschedule_retry_ts is a valid Unix timestamp

@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 741ef37 to 0618a18 Compare February 15, 2025 01:52
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from 290658d to 55a330f Compare February 15, 2025 01:52
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 0618a18 to 72e6e1e Compare February 18, 2025 02:32
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from 55a330f to 95ef81c Compare February 18, 2025 02:32
@NathanFlurry NathanFlurry force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 72e6e1e to d4e7b15 Compare February 19, 2025 02:59
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from 95ef81c to 08b4e1f Compare February 19, 2025 02:59
@NathanFlurry NathanFlurry changed the base branch from 02-11-fix_cluster_write_install_script_for_worker_pool to graphite-base/2020 February 19, 2025 05:16
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 9936cb1 to 807badd Compare February 25, 2025 02:45
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from 61641ee to 6a57b86 Compare February 25, 2025 02:45
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from 6a57b86 to d8bf651 Compare February 26, 2025 01:05
@NathanFlurry NathanFlurry force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 807badd to 9510430 Compare February 26, 2025 01:05
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 9510430 to 780c0b1 Compare February 26, 2025 03:27
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from d8bf651 to b9f0ded Compare February 26, 2025 03:27
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from b9f0ded to d8bf651 Compare February 26, 2025 06:18
@NathanFlurry NathanFlurry force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch 2 times, most recently from 9510430 to 10954e3 Compare February 27, 2025 00:49
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from d8bf651 to 228ff44 Compare February 27, 2025 00:49
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 10954e3 to 780c0b1 Compare February 27, 2025 02:42
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from 228ff44 to b9f0ded Compare February 27, 2025 02:42
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from b9f0ded to d8bf651 Compare February 27, 2025 07:59
@NathanFlurry NathanFlurry force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 780c0b1 to 9510430 Compare February 27, 2025 07:59
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 9510430 to 780c0b1 Compare February 27, 2025 18:55
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from d8bf651 to b9f0ded Compare February 27, 2025 18:55
@NathanFlurry NathanFlurry force-pushed the 02-12-fix_get_stuff_building branch from b9f0ded to d8bf651 Compare February 27, 2025 20:45
@NathanFlurry NathanFlurry force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 780c0b1 to 9510430 Compare February 27, 2025 20:46
@MasterPtato MasterPtato force-pushed the 02-11-fix_cluster_write_install_script_for_worker_pool branch from 9510430 to 780c0b1 Compare February 28, 2025 03:05
@MasterPtato MasterPtato force-pushed the 02-12-fix_get_stuff_building branch from d8bf651 to b9f0ded Compare February 28, 2025 03:05
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