Skip to content

Commit bfee725

Browse files
committed
chore(pegboard): add workaround fetching image size when not using ats
1 parent 4436240 commit bfee725

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docker/dev-full/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ services:
211211
- RIVET_SERVICE_NAME=rivet-client
212212
- RIVET_OTEL_ENDPOINT=http://otel-collector:4317
213213
- RUST_LOG=debug,hyper=info
214+
- __HACK__DISABLE_FETCH_IMAGE_SIZE=1
214215
stop_grace_period: 0s
215216
depends_on:
216217
# HACK: rivet-server dependency since we need to do a DNS lookup in entrypoint.sh for the iptables chain

packages/edge/infra/client/manager/src/image_download_handler.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@ impl ImageDownloadHandler {
573573
ctx: &Ctx,
574574
image_config: &protocol::Image,
575575
) -> Result<u64> {
576+
// HEAD does not work if not using ATS
577+
if std::env::var("__HACK__DISABLE_FETCH_IMAGE_SIZE").map_or(false, |x| x == "1") {
578+
return Ok(0);
579+
}
580+
576581
let addresses = self.get_image_addresses(ctx, image_config).await?;
577582

578583
let mut iter = addresses.into_iter();

0 commit comments

Comments
 (0)