Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Gap in CLI in CI/CD has no way of responding to command prompts for new blocks/actions #5347

Open
2 tasks done
owlyowl opened this issue Feb 4, 2025 · 2 comments
Open
2 tasks done
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working

Comments

@owlyowl
Copy link

owlyowl commented Feb 4, 2025

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

App, Extension

Expected behavior

When adding a new admin action CLI will prompt for a course of action but in the course of CI/CD this isn't really feasible. It would be great if we could have some kind of workaround or toml config we could update with what course of action to take:

Image

There's no way to respond to prompts that we can find documented other than parsing the console output and sending key presses.

It would be great if we could specify what course of action to take in a toml file for app blocks/actions when adding new ones to skip being prompted.

Actual behavior

The deploy fails because the output

Verbose output

ÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔò«
February 3rd 2025 16:21:12Info
Ôöé Ôöé
February 3rd 2025 16:21:12Info
Ôöé Failed to prompt: Ôöé
February 3rd 2025 16:21:12Info
Ôöé Ôöé
February 3rd 2025 16:21:12Info
Ôöé How would you like to deploy your "admin-action-cust-bal-adjust"? Ôöé
February 3rd 2025 16:21:12Info
Ôöé Ôöé
February 3rd 2025 16:21:12Info
Ôöé This usually happens when running a command non-interactively, for example Ôöé
February 3rd 2025 16:21:12Info
Ôöé in a CI environment, or when piping input from another process. Ôöé
February 3rd 2025 16:21:12Info
Ôöé Ôöé
February 3rd 2025 16:21:12Info
Ôöé To resolve this, specify the option in the command, or run the command in Ôöé
February 3rd 2025 16:21:12Info
Ôöé an interactive environment such as your local terminal. Ôöé
February 3rd 2025 16:21:12Info
Ôöé Ôöé
February 3rd 2025 16:21:12Info
Ôò░ÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔöÇÔö

Reproduction steps

  1. Add a new admin block or action to an existing app with a similar name to another
  2. Run shopify app deploy you'll be greeted with a prompt - we want to avoid this in CI/CD land.

Operating System

win32-x64

Shopify CLI version (shopify --version)

@shopify/cli/3.74.1

Shell

powershell, cmd doesn't matter

Node version (run node -v if you're not sure)

node-v18.20.3

What language and version are you using in your application?

No response

@owlyowl owlyowl added the Type: Bug Something isn't working label Feb 4, 2025
@frandiox frandiox added the Area: @shopify/app @shopify/app package issues label Feb 5, 2025
@gordonhirsch
Copy link
Contributor

Hi @owlyowl, while we don't currently have a way for you to specify the necessary information in TOML, you can work around the limitation through the following steps:

  • Run app deploy once interactively (not in CI) and respond to the prompts to properly match local -> remote extensions.
  • Environment variables of the form <extension-name>_UUID will be written to your local .env file. These values will be used on future app deploy commands to match extensions without further prompting.
  • Make these variables available to your CI process, either by committing the .env file or by explicitly setting them in your CI environment

@owlyowl
Copy link
Author

owlyowl commented Feb 7, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants