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(hub-embed): disable all node-related code if hub building is disabled #2084

Open
wants to merge 2 commits into
base: 02-27-chore_optimizations_and_such
Choose a base branch
from

Conversation

NathanFlurry
Copy link
Member

Changes

This was referenced Feb 27, 2025
Copy link
Member Author

NathanFlurry commented Feb 27, 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 modifies the codebase to conditionally disable node-related operations when hub building is skipped, improving build efficiency and error handling.

  • Changed backend_dispatcher_namespace in Cloudflare struct from String to Option<String> in packages/common/config/src/config/server/mod.rs
  • Added conditional logic in packages/common/hub-embed/build.rs to skip node operations when RIVET_SKIP_BUILD_HUB is set
  • Improved error handling in packages/core/services/cluster/src/workflows/datacenter/mod.rs with early returns and warning logs instead of macros
  • Fixed directory management in build script to create empty output directory when hub building is skipped
  • Bug in error message for drain_timeout check incorrectly references max_count instead of drain_timeout

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

Comment on lines +337 to +339
let Some(drain_timeout) = pool.drain_timeout else {
tracing::warn!("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: The error message incorrectly refers to max_count instead of drain_timeout

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

Copy link

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

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: d02c977
Status:🚫  Build failed.

View logs

@MasterPtato MasterPtato force-pushed the 02-21-fix_job-runner_fix_build_pack_in_job-runner_dockerfile branch from 31a5aa7 to e4f0825 Compare February 27, 2025 02:44
@NathanFlurry NathanFlurry changed the base branch from 02-21-fix_job-runner_fix_build_pack_in_job-runner_dockerfile to graphite-base/2084 February 27, 2025 07:59
@NathanFlurry NathanFlurry force-pushed the 02-21-chore_hub-embed_disable_all_node-related_code_if_hub_building_is_disabled branch from f299ca1 to 9b7cef1 Compare February 27, 2025 07:59
@NathanFlurry NathanFlurry changed the base branch from graphite-base/2084 to 02-26-feat_add_grafana_to_docker_compose February 27, 2025 08:00
Copy link

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b7cef1
Status: ✅  Deploy successful!
Preview URL: https://7421eef8.rivet-hub-7jb.pages.dev
Branch Preview URL: https://02-21-chore-hub-embed-disabl.rivet-hub-7jb.pages.dev

View logs

@MasterPtato MasterPtato force-pushed the 02-26-feat_add_grafana_to_docker_compose branch from 9a1c93b to 69e7475 Compare February 27, 2025 18:58
@MasterPtato MasterPtato force-pushed the 02-21-chore_hub-embed_disable_all_node-related_code_if_hub_building_is_disabled branch from 9b7cef1 to d02c977 Compare February 27, 2025 18:58
@MasterPtato MasterPtato changed the base branch from 02-26-feat_add_grafana_to_docker_compose to 02-27-chore_optimizations_and_such February 27, 2025 18:58
@NathanFlurry NathanFlurry force-pushed the 02-21-chore_hub-embed_disable_all_node-related_code_if_hub_building_is_disabled branch from d02c977 to 8c0f338 Compare February 27, 2025 20:45
@NathanFlurry NathanFlurry force-pushed the 02-27-chore_optimizations_and_such branch from a452771 to 58504c6 Compare February 27, 2025 20:46
@MasterPtato MasterPtato force-pushed the 02-27-chore_optimizations_and_such branch from 58504c6 to a452771 Compare February 28, 2025 03:08
@MasterPtato MasterPtato force-pushed the 02-21-chore_hub-embed_disable_all_node-related_code_if_hub_building_is_disabled branch from 8c0f338 to d02c977 Compare February 28, 2025 03:08
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