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]: shopify app deploy still asking for prompt even though --force flag is specified #4568

Closed
2 tasks done
FrankHeijden opened this issue Oct 3, 2024 · 4 comments
Closed
2 tasks done
Labels
Type: Bug Something isn't working

Comments

@FrankHeijden
Copy link

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

Expected behavior

It should not prompt for extenson migration if force flag is specified.

Actual behavior

It tried to prompt, and error out:

╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Extension migrations can't be undone.                                       │
│                                                                              │
│  Your "X" configuration has been updated. Migrating gives you       │
│  access to new features and won't impact the end user experience. All        │
│  previous extension versions will reflect this change.                       │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Failed to prompt:                                                           │
│                                                                              │
│  Migrate "X"?                                                          │
│                                                                              │
│  This usually happens when running a command non-interactively, for example  │
│   in a CI environment, or when piping to or from another process.            │
│                                                                              │
│  To resolve this, specify the option in the command, or run the command in   │
│  an interactive environment such as your local terminal.                     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Verbose output

Reproduction steps

Operating System

Github Actions x86 runners

Shopify CLI version (check your project's package.json if you're not sure)

3.68.0

Shell

No response

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

No response

What language and version are you using in your application?

No response

@FrankHeijden FrankHeijden added the Type: Bug Something isn't working label Oct 3, 2024
@isaacroldan
Copy link
Contributor

Hi @FrankHeijden , i'm afraid that migrations need to be manually accepted, so --force won't have any effect here.
Extension migrations are a one-time thing, so once done, --force will work as normal.
I'll bring this to the team in case we want to revisit this behaviour.

@FrankHeijden
Copy link
Author

FrankHeijden commented Oct 18, 2024

Thanks @isaacroldan ! Makes sense -- might just be an us problem here since we use multiple Shopify Apps as "environments", so by the time it reaches the production app deployment via CI/CD, we already are very sure that we're doing the migration, and want it to be accepted automatically.

I guess it would be nice to have all these migrations/interactive questions be skipped with the --force flag, but not impossible to manage.

I do however have a similar related issue for functions, when one changes the name of the function, a similar prompt appears where Shopify will try to match the name defined locally against the name defined in Partners, and asks if the mapping is correct. It seems that after this prompt, it somehow only stores this name-mapping locally, and doesn't actually change the function name in Shopify Partners, causing this prompt to be asked every time after a rename of a function (breaking CI/CD for all runs after a rename).

@isaacroldan
Copy link
Contributor

Hi @FrankHeijden!

That is correct, the mapping is stored locally in the .env files of your project. If you track those in git, then all instances of the CLI will get the correct matching and you'd only need to do it once.

@isaacroldan
Copy link
Contributor

I'll close this issue, but please feel free to post any other question and we can reopen it :)

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

No branches or pull requests

2 participants