Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- "dev"
- "feat/recovery-update"
- "chore/build-init-db-image"

paths-ignore:
- "deploy/**"
Expand Down Expand Up @@ -56,4 +56,4 @@ jobs:
ARCHITECTURE=aarch64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile.arm64.hawk
file: Dockerfile.arm64.init-db
2 changes: 1 addition & 1 deletion Dockerfile.arm64.init-db
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ENV DEBIAN_FRONTEND=noninteractive
ARG ARCHITECTURE
ENV ARCHITECTURE=$ARCHITECTURE

RUN apt-get update && apt-get install -y ca-certificates curl unzip
RUN apt-get update && apt-get install -y ca-certificates curl unzip postgresql-client

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$ARCHITECTURE.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
Expand Down
4 changes: 2 additions & 2 deletions deploy/stage/common-values-ampc-hnsw.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ghcr.io/worldcoin/iris-mpc-cpu:79ca389017b8f5943aaace17c19365dd5092512d-arm64"
image: "ghcr.io/worldcoin/iris-mpc-cpu:ac3c0e99ca1b822a86da9e8afa988271e3a393da-arm64"

environment: stage
replicaCount: 1
Expand Down Expand Up @@ -38,7 +38,7 @@ readinessProbe:

startupProbe:
initialDelaySeconds: 60
failureThreshold: 120
failureThreshold: 240
periodSeconds: 30
httpGet:
path: /ready
Expand Down
12 changes: 6 additions & 6 deletions scripts/tools/init-single-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
aws s3 cp s3://wf-smpcv2-stage-hnsw-performance-reports/graph_right.dat /tmp/graph_right.dat
aws s3 cp s3://wf-smpcv2-stage-hnsw-performance-reports/graph_left.dat /tmp/graph_left.dat

aws s3 cp s3://wf-smpcv2-stage-hnsw-performance-reports/gallery_left.ndjson /tmp/gallery_left_right_interleaved.ndjson
aws s3 cp s3://wf-smpcv2-stage-hnsw-performance-reports/gallery_left_right_interleaved.ndjson /tmp/gallery_left_right_interleaved.ndjson


echo "starting left init"
/bin/init-single-db \
--party-id $SMPC__SERVER_COORDINATION__PARTY_ID \
--source "/tmp/gallery_left_right_interleaved.ndjson" \
--db-url "$SMPC__CPU_DATABASE__URL" \
--db-schema "SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID" \
--target-db-size 287895
--db-schema "SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID"

echo "starting restore graph left"
/bin/graph-mem-cli --db-url $SMPC__CPU_DATABASE__URL --schema SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID --file /tmp/graph_left.dat restore-side --side "left"
/bin/graph-mem-cli --db-url $SMPC__CPU_DATABASE__URL --schema SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID --file /tmp/graph_left.dat restore-side "left"
echo "restore graph left done"

echo "starting restore graph right"
/bin/graph-mem-cli --db-url $SMPC__CPU_DATABASE__URL --schema SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID --file /tmp/graph_right.dat restore-side --side "right"
/bin/graph-mem-cli --db-url $SMPC__CPU_DATABASE__URL --schema SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID --file /tmp/graph_right.dat restore-side "right"
echo "restore graph right done"

psql "$SMPC__CPU_DATABASE__URL" -c "
SET search_path TO \"SMPC_correctness_test_stage_$SMPC__SERVER_COORDINATION__PARTY_ID\";
INSERT INTO persistent_state (domain, \"key\", \"value\")
VALUES ('genesis', 'last_indexed_iris_id', '287895')
VALUES ('genesis', 'last_indexed_iris_id', '280422')
ON CONFLICT (domain, \"key\")
DO UPDATE SET \"value\" = EXCLUDED.\"value\";
"
Expand Down
Loading