Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,22 @@ jobs:
matrix:
include:
- platform: linux
runner: ubuntu-latest
runner: depot-ubuntu-24.04
target: x86_64-unknown-linux-musl
binary_ext: ""
arch: x86_64
- platform: windows
runner: ubuntu-latest
runner: depot-ubuntu-24.04
target: x86_64-pc-windows-gnu
binary_ext: ".exe"
arch: x86_64
- platform: macos
runner: ubuntu-latest
runner: depot-ubuntu-24.04
target: x86_64-apple-darwin
binary_ext: ""
arch: x86_64
- platform: macos
runner: ubuntu-latest
runner: depot-ubuntu-24.04
target: aarch64-apple-darwin
binary_ext: ""
arch: aarch64
Expand Down Expand Up @@ -155,10 +155,10 @@ jobs:
include:
# TODO(RVT-4479): Add back ARM builder once manifest generation fixed
# - platform: linux/arm64
# runner: ubuntu-latest
# runner: depot-ubuntu-24.04
# arch_suffix: -arm64
- platform: linux/x86_64
runner: ubuntu-latest
runner: depot-ubuntu-24.04
# TODO: Replace with appropriate arch_suffix when needed
# arch_suffix: -amd64
arch_suffix: ''
Expand Down Expand Up @@ -246,4 +246,4 @@ jobs:
./scripts/release/main.ts --version "${{ github.event.inputs.version }}" --completeCi
else
./scripts/release/main.ts --version "${{ github.event.inputs.version }}" --no-latest --completeCi
fi
fi
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# clippy:
# name: Clippy
# runs-on: ubuntu-latest
# runs-on: depot-ubuntu-24.04
# steps:
# - uses: actions/checkout@v4

Expand All @@ -59,7 +59,7 @@ jobs:

check:
name: Check
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -77,7 +77,7 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest
runs-on: depot-ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
7 changes: 6 additions & 1 deletion Cargo.lock

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

39 changes: 0 additions & 39 deletions frontend/src/routes/_layout/ns.$namespace/runners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function RouteComponent() {
<TableRow>
<TableHead>ID</TableHead>
<TableHead>Name</TableHead>
<TableHead>HTTP</TableHead>
<TableHead>Slots</TableHead>
<TableHead>Last ping</TableHead>
<TableHead>Created</TableHead>
Expand Down Expand Up @@ -155,19 +154,11 @@ function RowSkeleton() {
<TableCell>
<Skeleton className="w-full h-4" />
</TableCell>
<TableCell>
<Skeleton className="w-full h-4" />
</TableCell>
</TableRow>
);
}

const MAX_TO_SHOW = 2;

function Row(runner: Rivet.Runner) {
const [isExpanded, setExpanded] = useState(false);
const addresses = Object.values(runner.addressesHttp);

return (
<TableRow key={runner.runnerId}>
<TableCell>
Expand All @@ -186,36 +177,6 @@ function Row(runner: Rivet.Runner) {
</DiscreteCopyButton>
</TableCell>

<TableCell>
<div className="flex gap-1 flex-wrap">
{addresses
.slice(0, isExpanded ? addresses.length : MAX_TO_SHOW)
.map((http) => {
const address = `${http.hostname}:${http.port}`;
return (
<DiscreteCopyButton
className="justify-start"
size="sm"
key={address}
value={address}
>
{address}
</DiscreteCopyButton>
);
})}

{addresses.length > MAX_TO_SHOW && !isExpanded ? (
<Button
variant="ghost"
size="sm"
onClick={() => setExpanded(!isExpanded)}
>
+{addresses.length - MAX_TO_SHOW}
</Button>
) : null}
</div>
</TableCell>

<TableCell>
{runner.remainingSlots}/{runner.totalSlots}
</TableCell>
Expand Down
5 changes: 5 additions & 0 deletions out/errors/ups.publish_failed.json

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

108 changes: 108 additions & 0 deletions packages/common/test-deps-docker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,114 @@ impl DockerRunConfig {
Ok(true)
}

pub async fn restart(&self) -> Result<()> {
let container_id = self
.container_id
.as_ref()
.ok_or_else(|| anyhow!("No container ID found, container not started"))?;

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"restarting docker container"
);

let output = Command::new("docker")
.arg("restart")
.arg(container_id)
.output()
.await?;

if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
anyhow::bail!(
"Failed to restart container {}: {}",
self.container_name,
stderr
);
}

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"container restarted successfully"
);

Ok(())
}

pub async fn stop_container(&self) -> Result<()> {
let container_id = self
.container_id
.as_ref()
.ok_or_else(|| anyhow!("No container ID found, container not started"))?;

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"stopping docker container"
);

let output = Command::new("docker")
.arg("stop")
.arg(container_id)
.output()
.await?;

if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
anyhow::bail!(
"Failed to stop container {}: {}",
self.container_name,
stderr
);
}

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"container stopped successfully"
);

Ok(())
}

pub async fn start_container(&self) -> Result<()> {
let container_id = self
.container_id
.as_ref()
.ok_or_else(|| anyhow!("No container ID found, container not started"))?;

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"starting docker container"
);

let output = Command::new("docker")
.arg("start")
.arg(container_id)
.output()
.await?;

if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
anyhow::bail!(
"Failed to start container {}: {}",
self.container_name,
stderr
);
}

tracing::debug!(
container_name = %self.container_name,
container_id = %container_id,
"container started successfully"
);

Ok(())
}

pub fn container_id(&self) -> Option<&str> {
self.container_id.as_deref()
}
Expand Down
3 changes: 2 additions & 1 deletion packages/common/universalpubsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ async-trait.workspace = true
base64.workspace = true
deadpool-postgres.workspace = true
futures-util.workspace = true
moka.workspace = true
rivet-error.workspace = true
rivet-ups-protocol.workspace = true
rivet-util.workspace = true
serde_json.workspace = true
versioned-data-util.workspace = true
serde.workspace = true
sha2.workspace = true
tokio-postgres.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tracing.workspace = true
uuid.workspace = true

Expand Down
Loading
Loading