background-agents
background-agents copied to clipboard
Errors during initial deployment
I'm running into the following errors when try to run terraform apply from Phase 1: Initial Deployment:
╷
│ Error: failed to make http request
│
│ with module.control_plane_worker.cloudflare_workers_deployment.this,
│ on ../../modules/cloudflare-worker/main.tf line 115, in resource "cloudflare_workers_deployment" "this":
│ 115: resource "cloudflare_workers_deployment" "this" {
│
│ POST "https://api.cloudflare.com/client/v4/accounts/f7303cd36eb81fa941f2d44d18b884b7/workers/scripts/open-inspect-control-plane-contractor/deployments": 412
│ Precondition Failed {
│ "result": null,
│ "success": false,
│ "errors": [
│ {
│ "code": 10079,
│ "message": "Actor migration tag precondition failed, got tag '' when expected tag is 'v1'. Please make sure the tags match and try again."
│ }
│ ],
│ "messages": []
│ }
│
╵
╷
│ Error: local-exec provisioner error
│
│ with module.modal_app[0].null_resource.modal_deploy,
│ on ../../modules/modal-app/main.tf line 61, in resource "null_resource" "modal_deploy":
│ 61: provisioner "local-exec" {
│
│ Error running command '../../modules/modal-app/scripts/deploy.sh': exit status 1. Output: Deploying Modal app: open-inspect
│ Deploy path: ../../..//packages/modal-infra
│ Deploy module: deploy
│ ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ │ /Users/kyleadams/Code/companycam/background-agents/packages/modal-infra/depl │
│ │ oy.py:18 in <module> │
│ │ │
│ │ 17 # This makes all web endpoints and functions available │
│ │ ❱ 18 from src.app import app │
│ │ 19 │
│ │ │
│ │ /Users/kyleadams/Code/companycam/background-agents/packages/modal-infra/src/ │
│ │ __init__.py:5 in <module> │
│ │ │
│ │ 4 # (all use lazy imports internally to avoid pydantic dependency at load │
│ │ ❱ 5 from . import functions, web_api │
│ │ 6 from .app import app │
│ │ │
│ │ /Users/kyleadams/Code/companycam/background-agents/packages/modal-infra/src/ │
│ │ functions.py:12 in <module> │
│ │ │
│ │ 11 │
│ │ ❱ 12 from .app import app, function_image, github_app_secrets, inspect_volu │
│ │ 13 │
│ │ │
│ │ /Users/kyleadams/Code/companycam/background-agents/packages/modal-infra/src/ │
│ │ app.py:14 in <module> │
│ │ │
│ │ 13 │
│ │ ❱ 14 import sandbox_runtime │
│ │ 15 │
│ ╰──────────────────────────────────────────────────────────────────────────────╯
│ ModuleNotFoundError: No module named 'sandbox_runtime'
│ Error: Modal deployment failed for open-inspect
│
╵
I'm not entirely sure what the first error is. The second seems to be a Python environment issue, though I'm not sure how to resolve it. I went into packages/modal-infra and ran uv sync --frozen --extra dev but that doesn't seem to fix the problem.
This PR should fix it https://github.com/ColeMurray/background-agents/pull/509
Try merging this PR into your branch and rerunning, should work
I can confirm #509 does indeed fix this error so I'm closing this issue.