An open-source, faster Devin alternative
TypeScript
fix: bootstrap benchmark durable object in CI
Mohamed Habib123fe3f3b18c
diff --git a/.github/workflows/deploy-vm-do-benchmark-production.yml b/.github/workflows/deploy-vm-do-benchmark-production.ymlindex 1a0563d1..86de4a48 100644--- a/.github/workflows/deploy-vm-do-benchmark-production.yml+++ b/.github/workflows/deploy-vm-do-benchmark-production.yml@@ -38,3 +38,12 @@ jobs:CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}BENCH_API_TOKEN: ${{ secrets.OC_VM_DO_BENCH_API_TOKEN }}VM_CONNECT_SECRET: ${{ secrets.OC_VM_DO_CONNECT_SECRET }}+ - name: Bootstrap Eastern North America Durable Object+ run: |+ curl --fail --silent https://www.cloudflare.com/cdn-cgi/trace | grep -E '^(colo|loc)='+ curl --fail --silent --show-error \+ --request POST \+ --header "X-API-Key: $BENCH_API_TOKEN" \+ https://opencomputer-vm-do-benchmark-prod.mo-b8f.workers.dev/internal/vms/sb-674b9289/bootstrap+ env:+ BENCH_API_TOKEN: ${{ secrets.OC_VM_DO_BENCH_API_TOKEN }}diff --git a/cloudflare-workers/vm-do-poc/provision-vm.mjs b/cloudflare-workers/vm-do-poc/provision-vm.mjsindex 5106c2f6..c6abf71a 100644--- a/cloudflare-workers/vm-do-poc/provision-vm.mjs+++ b/cloudflare-workers/vm-do-poc/provision-vm.mjs@@ -39,7 +39,7 @@ try {const install = await sandbox.exec.run(`mkdir -p ${connectorDir} && npm install --prefix ${connectorDir} --no-audit --no-fund [email protected]`);if (install.exitCode !== 0) throw new Error(`install ws failed: ${install.stderr}`);await sandbox.files.write(`${connectorDir}/agent.mjs`, agentSource);- const runtime = await sandbox.exec.run("node -p 'process.version' && curl -fsS --max-time 10 https://vm-do-poc.mo-oc-dev.com/health");+ const runtime = await sandbox.exec.run(`node -p 'process.version' && curl -fsS --max-time 10 ${pocUrl}/health`);console.log(JSON.stringify({ sandboxId: sandbox.id, runtime: runtime.stdout.trim() }));const probe = await sandbox.exec.run(`node ${connectorDir}/agent.mjs`, {env: {