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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ container:
-v ~/.config/gcloud:/root/.config/gcloud \
-v ~/.gemini/antigravity-cli:/root/.gemini/antigravity-cli:ro \
-e GOOGLE_CLOUD_PROJECT=cloud-db-nl2sql \
-e MESOP_XSRF_CHECK=false \
--cap-add=SYS_PTRACE \
-p 3000:3000 \
-p 50051:50051 \
Expand Down Expand Up @@ -119,7 +118,7 @@ deploy-corprun:
--min-instances=1 \
--no-cpu-throttling \
--service-account=crsvc-evalbench@evalbench-dev.iam.gserviceaccount.com \
--set-env-vars CLOUD_RUN=True,GOOGLE_CLOUD_PROJECT=evalbench-dev,MESOP_XSRF_CHECK=false \
--set-env-vars CLOUD_RUN=True,GOOGLE_CLOUD_PROJECT=evalbench-dev \
--ingress=internal-and-cloud-load-balancing \
--network=cr-infra-vpc-network \
--subnet=cr-infra-subnetwork \
Expand Down
6 changes: 4 additions & 2 deletions skills/evalbench-review/references/deployment-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ Under `evalbench_service/k8s/`: `namespace.yaml`, `pvc.yaml`, `ksa.yaml`,
`us-central1-docker.pkg.dev/evalbench-dev/cr-images/eval_server:latest`.

- **4 CPU / 8Gi**, versus GKE's 20/80Gi. Work sized for the cluster OOMs here.
- `--port=3000`, `CLOUD_RUN=True`, `MESOP_XSRF_CHECK=false`, `min-instances=1`,
`--no-cpu-throttling`, internal ingress on `cr-infra-vpc-network`.
- `--port=3000`, `CLOUD_RUN=True`, `min-instances=1`, `--no-cpu-throttling`,
internal ingress on `cr-infra-vpc-network`.
- Do not set `MESOP_XSRF_CHECK=false`. The viewer ignores it and keeps the
Mesop XSRF check on.
- GCS volume at `/tmp_session_files`; no PVC.
- The jobs run `python3 viewer/precompute_trends.py` (and `--clean` for
recompute). Changing that script's CLI surface or entry point requires
Expand Down
11 changes: 4 additions & 7 deletions viewer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ class State:

logging.basicConfig(level=logging.INFO)

# Manually enable debug mode to bypass XSRF check if needed
# (e.g. when running in container behind a proxy)
# Mesop rejects a cross-site POST to the UI endpoint. Keep that check on.
if os.environ.get("MESOP_XSRF_CHECK") == "false":
try:
from mesop.runtime import runtime
runtime().debug_mode = True
except Exception as e:
logging.error(f"Failed to enable debug mode: {e}")
logging.warning(
"MESOP_XSRF_CHECK=false has no effect. The XSRF check stays on."
)

try:
import dashboard
Expand Down
Loading