Skip to content

Commit

Permalink
chore: fix compile errors (#1427)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Nov 22, 2024
1 parent bdd7ba3 commit ad47c71
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 47 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ jobs:
- run: RUSTFLAGS="--cfg tokio_unstable" cargo check --release

cargo-check-infra:
runs-on: [self-hosted, Linux]
# The FDB version should match `cluster::workflows::server::install::install_scripts::components::fdb::FDB_VERSION`
# TODO(RVT-4168): Copmile libfdb from scratch for ARM
runs-on: [self-hosted, Linux, X64]
container:
image: rust:1.82.0
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y protobuf-compiler libpq-dev
apt-get install -y protobuf-compiler libpq-dev curl libclang-dev
curl -Lf -o /lib/libfdb_c.so "https://github.com/apple/foundationdb/releases/download/7.1.60/libfdb_c.x86_64.so"
- run: cd packages/infra/client && RUSTFLAGS="--cfg tokio_unstable" cargo check --release

cargo-deny:
Expand Down
1 change: 0 additions & 1 deletion externals/cloudflare-rs
Submodule cloudflare-rs deleted from f14720
1 change: 0 additions & 1 deletion externals/deno
Submodule deno deleted from bd9856
1 change: 0 additions & 1 deletion externals/nomad-client
Submodule nomad-client deleted from abb66b
1 change: 0 additions & 1 deletion externals/posthog-rs
Submodule posthog-rs deleted from ef4e80
1 change: 0 additions & 1 deletion externals/redis-rs
Submodule redis-rs deleted from ac3e27
1 change: 0 additions & 1 deletion externals/rivet-term
Submodule rivet-term deleted from d539a0
1 change: 0 additions & 1 deletion externals/serde_array_query
Submodule serde_array_query deleted from b9f8bf
1 change: 0 additions & 1 deletion externals/sqlx
Submodule sqlx deleted from e7120f
50 changes: 25 additions & 25 deletions packages/infra/client/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/infra/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ rev = "e7120f59"

[workspace.dependencies.deno_runtime]
git = "https://github.com/rivet-gg/deno"
rev = "bd9856321"
rev = "1f423e6d87792cb761cf0167c7bad5b8553f32a1"

5 changes: 0 additions & 5 deletions packages/infra/client/isolate-v8-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::{
use actor_kv::ActorKv;
use anyhow::*;
use deno_runtime::deno_core::{v8_set_flags, JsRuntime};
use config::Config;
use deno_runtime::worker::MainWorkerTerminateHandle;
use foundationdb as fdb;
use futures_util::{stream::SplitStream, SinkExt, StreamExt};
Expand Down Expand Up @@ -68,10 +67,6 @@ async fn main() -> Result<()> {
)
.await?;

let actors_path = var("ACTORS_PATH")?;
let runner_addr = var("RUNNER_ADDR")?;
let actors_path = Path::new(&actors_path);

// Set v8 flags (https://chromium.googlesource.com/v8/v8/+/refs/heads/main/src/flags/flag-definitions.h)
let invalid = v8_set_flags(vec![
// Binary name
Expand Down
15 changes: 10 additions & 5 deletions packages/infra/client/manager/src/actor/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ use indoc::indoc;
use pegboard::protocol;
use pegboard_config::isolate_runner::actor as actor_config;
use rand::Rng;
use serde_json::{json, Value};
use serde_json::json;
use std::{
collections::HashMap,
path::{Path, PathBuf},
process::Stdio,
};
use tokio::{
fs::{self, File},
io::{AsyncReadExt, AsyncWriteExt},
Expand Down Expand Up @@ -542,7 +547,7 @@ impl Actor {
.output()
.await
{
Ok(cmd_out) => {
Result::Ok(cmd_out) => {
if !cmd_out.status.success() {
tracing::error!(
stdout=%std::str::from_utf8(&cmd_out.stdout)?,
Expand All @@ -556,7 +561,7 @@ impl Actor {

if let protocol::NetworkMode::Bridge = self.config.network_mode {
match fs::read_to_string(actor_path.join("cni-cap-args.json")).await {
Ok(cni_params_json) => {
Result::Ok(cni_params_json) => {
match Command::new("cnitool")
.arg("del")
.arg(&ctx.config().cni.network_name())
Expand All @@ -568,7 +573,7 @@ impl Actor {
.output()
.await
{
Ok(cmd_out) => {
Result::Ok(cmd_out) => {
if !cmd_out.status.success() {
tracing::error!(
stdout=%std::str::from_utf8(&cmd_out.stdout)?,
Expand All @@ -592,7 +597,7 @@ impl Actor {
.output()
.await
{
Ok(cmd_out) => {
Result::Ok(cmd_out) => {
if !cmd_out.status.success() {
tracing::error!(
stdout=%std::str::from_utf8(&cmd_out.stdout)?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn insert_metrics(dc: &Datacenter, servers: &[Server]) -> GlobalResult<()> {
pool_type,
servers_in_dc
.clone()
.filter(|s| &s.pool_type == pool_type)
.filter(|s| s.pool_type == pool_type)
.collect::<Vec<_>>(),
)
})
Expand Down

0 comments on commit ad47c71

Please sign in to comment.