subsquid / squid-cli

CLI for managing squid deployments to the SQD Cloud
17 stars 16 forks source link

Error: "deploy.migrate.cmd" must be an array #25

Closed Lezek123 closed 1 year ago

Lezek123 commented 1 year ago

Environment:

$ sqd --version
@subsquid/cli/2.0.3 linux-x64 node-v19.4.0

The error happens when executing

sqd deploy .

In the manifest file I tried providing cmd for migrate, as I needed to override the env and cmd was required as well. I tried to do it just like shown in the example at https://docs.subsquid.io/deploy-squid/deploy-manifest/:

manifestVersion: subsquid.io/v0.1
name: joystream-orion
version: 1
description: |-
  Joystream Orion v2 backend

build: 

deploy:
  addons:
    postgres: 
  migrate:
    env:
      FOO: 
        bar
    cmd: ["echo", "skip migrations!"]

But this gives me:

Validation error occurred:
1) "deploy.migrate.cmd" must be an array
Manifest:
-------
manifestVersion: subsquid.io/v0.1
name: joystream-orion
version: 1
description: Joystream Orion v2 backend
build:
  dockerfile: Dockerfile
  target: squid
deploy:
  addons:
    postgres:
      version: '14'
  migrate:
    env:
      FOO: bar
    cmd:
      '0': echo
      '1': skip migrations!
      '2': apply
scale:
  addons:
    postgres:
      storage: 50Gi
      profile: small

◷ Preparing the squid...
 ›   Error: ❌ An error occurred while unpacking the squid

I also tried with:

    cmd:
      - "echo"
      - "skip migrations!"

And even:

    cmd: ~

But no success. cmd value keeps being treated as object, even though the array is provided.

mo4islona commented 1 year ago

Fixed