saleor / cli

Command-line interface allowing interaction with Saleor Cloud environments.
Other
69 stars 23 forks source link

Creating environment are always require some user prompt #700

Closed andrzejewsky closed 10 months ago

andrzejewsky commented 10 months ago

When use cli in environments where user does not have access to - such as CI we must have a possibility to call each command without any user interaction. However in some cases, despite we use require options, the command still ask us to input some information

To Reproduce

  1. Create environment with the command:

    npx saleor env create "..." \
            --project=... \
            --database=snapshot \
            --restore-from=...  \
            --saleor=saleor-master-staging \
            --domain=... \
            --skip-restrict
  2. You are being asked about webhooks

Expected behavior We need some sort of parameter that will allow the user to skip the prompt

Additional context We run the saleor/cli on the CI, that will prepare envs for e2e testing

2can commented 10 months ago

@andrzejewsky FYI the existence of this prompt is intentional - the idea behind it is to reduce to a minimum the situation in which the newly created environment from backup will use the same production endpoints for webhooks. This was an important case for replication of environments for debugging purposes.