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

Avoid link on deploy when there is a current config #4387

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

gonzaloriestra
Copy link
Contributor

WHY are these changes introduced?

Fixes https://github.com/Shopify/develop-app-inner-loop/issues/2048
Fixes #4264

In v3.65 we included this refactor that allowed to run link from the deploy command, but there are some situations where we are running link, but we shouldn't because we should use a current configuration. This is affecting especially in CI environments because the link process produces an error as it requires an input by the user.

WHAT is this pull request doing?

Only run link on deploy when:

  • There is no provided api_key or config
  • There's no current configuration (cache or TOML) or is legacy
  • Reset is passed

How to test your changes?

  • p shopify app deploy
  • p shopify app deploy --client-id whatever
  • p shopify app deploy -c production
  • p shopify app config use production
  • p shopify app deploy
  • p shopify app deploy --reset

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.82% (+0.12% 🔼)
8250/11329
🟡 Branches
69.48% (+0.07% 🔼)
4023/5790
🟡 Functions
71.5% (+0.03% 🔼)
2152/3010
🟡 Lines
73.17% (+0.12% 🔼)
7805/10667

Test suite run success

1860 tests passing in 845 suites.

Report generated by 🧪jest coverage report action from a8c08f2

@gonzaloriestra gonzaloriestra marked this pull request as ready for review August 28, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Shopify CLI 3.65.0 does not reliably detect app ID is valid in --force mode, breaks CI pipelines
2 participants