CICD deployment error

I have started getting the following error when i deploy my app, sorry to double post, the image is being found but it is not deployed:

  Name     = pr-9-***-hub          
  Owner    = ***             
  Version  = 0                              
  Status   = pending                        
  Hostname = pr-9-***-hub.fly.dev  
  Platform =                                

App has not been deployed yet.
+ '[' true '!=' false ]
+ flyctl deploy --app pr-9-***-hub --region iad --image registry.fly.io/***-hub:merge-6b0ade5b4c601c59432b74e25ea1a41581825f66 --region iad --strategy immediate
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'registry.fly.io/***-hub:merge-6b0ade5b4c601c59432b74e25ea1a41581825f66' locally...
Searching for image 'registry.fly.io/***-hub:merge-6b0ade5b4c601c59432b74e25ea1a41581825f66' remotely...
image found: img_0lq747360g5v6x35
Oops, something went wrong! Could you try that again?```

any update on this, it pretty urgent

Is it possible to run this with LOG_LEVEL=debug set? I see an internal error about only allowing 5 volumes with --require-unique-zone set, but I don’t think that’s where it would show that error.

hey, it deploys fine when i do it manually, unfortunately i cant change the source code, it is a marketplace action running the code (fly-pr-review-apps/entrypoint.sh at main · superfly/fly-pr-review-apps · GitHub), however with github debug logs i can see that it exits with code 3

You may be able to add this to your action file.

    steps:
      - uses: actions/checkout@v2

      - name: Deploy
        id: deploy
        uses: brentd/fly-staging-app@v1
        env:
            LOG_LEVEL: debug

It’s hard to tell why that’s not working, it’s possible the error is coming from the action and not our API.

i ran it with log-level debug and got the following repsonse:

/usr/bin/docker run --name bb2fd44c5b8604096b875608f22a1923f_4ca440 --label 94859b --workdir /github/workspace --rm -e FLY_API_TOKEN -e FLY_REGION -e BRANCH -e LOG_LEVEL -e INPUT_IMAGE -e INPUT_ORG -e INPUT_NAME -e INPUT_ARGS -e INPUT_REGION -e INPUT_PATH -e INPUT_POSTGRES -e INPUT_UPDATE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/osc-stack/osc-stack":"/github/workspace" 94859b:b2fd44c5b8604096b875608f22a1923f deploy --build-arg SESSION_SECRET=*** --app pr-464-osc-stack
+ '[' -n  ]
+ jq -r .number /github/workflow/event.json
+ PR_NUMBER=464
+ '[' -z 464 ]
+ jq -r .event.base.repo.owner /github/workflow/event.json
+ REPO_OWNER=null
+ jq -r .event.base.repo.name /github/workflow/event.json
+ REPO_NAME=null
+ jq -r .action /github/workflow/event.json
+ EVENT_TYPE=synchronize
+ app=pr-464-osc-stack
+ region=iad
pr-464-osc-stack
+ org=***
+ image=registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e
+ echo pr-464-osc-stack
+ grep 464
+ '[' synchronize '=' closed ]
+ flyctl status --app pr-464-osc-stack
DEBUG determined hostname: "4766b95e3a9d"
DEBUG determined working directory: "/github/workspace"
DEBUG determined user home directory: "/github/home"
DEBUG determined config directory: "/github/home/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG skipped querying for new release
DEBUG client initialized.
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!) { appbasic:app(name: $appName) { id name platformVersion organization { id slug } } }",
  "variables": {
    "appName": "osc-stack"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (168.21ms)

{
  "data": {
    "appbasic": {
      "id": "osc-stack",
      "name": "osc-stack",
      "platformVersion": "nomad",
      "organization": {
        "id": "QnNZ1VpbAjNexi1k1L3JXGz3JDi0ap",
        "slug": "***"
      }
    }
  }
}
DEBUG app config loaded from /github/workspace/fly.toml
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!) { appcompact:app(name: $appName) { id name hostname deployed status appUrl platformVersion organization { id slug } postgresAppRole: role { name } imageDetails { repository version } } }",
  "variables": {
    "appName": "pr-464-osc-stack"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (118.3ms)

{
  "data": {
    "appcompact": {
      "id": "pr-464-osc-stack",
      "name": "pr-464-osc-stack",
      "hostname": "pr-464-osc-stack.fly.dev",
      "deployed": false,
      "status": "pending",
      "appUrl": null,
      "platformVersion": null,
      "organization": {
        "id": "QnNZ1VpbAjNexi1k1L3JXGz3JDi0ap",
        "slug": "***"
      },
      "postgresAppRole": null,
      "imageDetails": {
        "repository": "unknown",
        "version": "unknown"
      }
    }
  }
}
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query($appName: String!, $showCompleted: Boolean!) { appstatus:app(name: $appName) { id name deployed status hostname version appUrl organization { slug } deploymentStatus { id status version description placedCount promoted desiredCount healthyCount unhealthyCount } allocations(showCompleted: $showCompleted) { id idShort version latestVersion status desiredStatus totalCheckCount passingCheckCount warningCheckCount criticalCheckCount createdAt updatedAt canary region restarts healthy privateIP taskName checks { status output name } } } }",
  "variables": {
    "appName": "pr-464-osc-stack",
    "showCompleted": false
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (118.49ms)
App

  Name     = pr-464-osc-stack          
{
  Owner    = ***        
  "data": {
  Version  = 0                         
    "appstatus": {
  Status   = pending                   
      "id": "pr-464-osc-stack",
  Hostname = pr-464-osc-stack.fly.dev  
      "name": "pr-464-osc-stack",
  Platform =                           
      "deployed": false,

      "status": "pending",
App has not been deployed yet.
      "hostname": "pr-464-osc-stack.fly.dev",
      "version": 0,
      "appUrl": null,
      "organization": {
        "slug": "***"
      },
      "deploymentStatus": null,
      "allocations": []
    }
  }
}
+ '[' true '!=' false ]
+ flyctl deploy --app pr-464-osc-stack --region iad --image registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e --region iad --strategy immediate
DEBUG determined hostname: "4766b95e3a9d"
DEBUG determined working directory: "/github/workspace"
DEBUG determined user home directory: "/github/home"
DEBUG determined config directory: "/github/home/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG skipped querying for new release
DEBUG client initialized.
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!) { appbasic:app(name: $appName) { id name platformVersion organization { id slug } } }",
  "variables": {
    "appName": "osc-stack"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (144.42ms)

{
  "data": {
    "appbasic": {
      "id": "osc-stack",
      "name": "osc-stack",
      "platformVersion": "nomad",
      "organization": {
        "id": "QnNZ1VpbAjNexi1k1L3JXGz3JDi0ap",
        "slug": "***"
      }
    }
  }
}
DEBUG app config loaded from /github/workspace/fly.toml
==> Verifying app config
--> Verified app config
==> Building image
DEBUG trying local docker daemon
Searching for image 'registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e' locally...
DEBUG Trying 'Local Image Reference' strategy
Searching for image 'registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e' remotely...
DEBUG Search terms:[registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e:merge-533322b5a1c0fa156841c91c8664081ddcf8384e osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e osc-stack registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e registry.fly.io/osc-stack]
DEBUG result image:<nil> error:<nil>
DEBUG Trying 'Remote Image Reference' strategy
DEBUG --> POST https://api.fly.io/graphql

{
  "query": "query ($appName: String!, $imageRef: String!) { app(name: $appName) { id image(ref: $imageRef) { id digest ref compressedSize } } }",
  "variables": {
    "appName": "pr-464-osc-stack",
    "imageRef": "registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e"
  }
}

DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (594.37ms)
DEBUG result image:&{ID:img_2wokpyo53qk43g1m Tag:registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e Size:165370566} error:<nil>

{
  "data": {
    "app": {
      "id": "pr-464-osc-stack",
      "image": {
        "id": "img_2wokpyo53qk43g1m",
        "digest": "sha256:df67d85d26174a82cd4cbe6bf76186f9eef2c4e72e93d946cf98fd929c2cf811",
        "ref": "registry.fly.io/osc-stack:merge-533322b5a1c0fa156841c91c8664081ddcf8384e",
        "compressedSize": 165370566
      }
    }
  }
}
image found: img_2wokpyo53qk43g1m
Oops, something went wrong! Could you try that again?```

btw, awesome action, just noticed your a contributor on github!

i tried it with GitHub Action for flyctl · Actions · GitHub Marketplace · GitHub, i get the same error

Could you post your fly.toml? If you have primary_region set in there, this may be a known issue.

UPDATE: Apart from posting fly.toml, please try with the latest release v0.0.374.

app = "osc-stack"
kill_signal = "SIGINT"
kill_timeout = 5
processes = [ ]

[experimental]
allowed_public_ports = []
auto_rollback = true
cmd = "start.sh"
entrypoint = "sh"

[mounts]
source = "data"
destination = "/data"

[[services]]
internal_port = 8080
processes = [ "app" ]
protocol = "tcp"
script_checks = [ ]

  [services.concurrency]
  hard_limit = 25
  soft_limit = 20
  type = "connections"

  [[services.ports]]
  handlers = [ "http" ]
  port = 80
  force_https = true

  [[services.ports]]
  handlers = [ "tls", "http" ]
  port = 443

  [[services.tcp_checks]]
  grace_period = "1s"
  interval = "15s"
  restart_limit = 0
  timeout = "2s"

  [[services.http_checks]]
  interval = 10_000
  grace_period = "5s"
  method = "get"
  path = "/healthcheck"
  protocol = "http"
  timeout = 2_000
  tls_skip_verify = false
  headers = { }

it appears to be working now… not sure what caused it. i will make another post if it happens again