[Bug]: app update-urls deprecation has no alternative for CI/CD
Please confirm that you have:
- [X] 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.)
- [X] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
App
Expected behavior
app update-urls has no alternative for CI/CD so we are no longer able to build preview builds that can update some development apps in our partners account for testing.
We have 3 apps for testing staging work, and used update-urls in our build pipeline to set the urls correctly based on the build url for that preview.
Now that this cli has been removed how can we continue to run CI/CD effectively for our apps? Not every process works well in TOML files.
Actual behavior
Does not work
Verbose output
NA
Reproduction steps
NA
Operating System
NA
Shopify CLI version (check your project's package.json if you're not sure)
3
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
Hi! Thanks for creating the issue and sorry for the late response.
Wouldn't it work for you to create different TOML files for your environments and then run shopify app config use whatever and shopify app deploy to update the URLs?
@gonzaloriestra there is no shopify app config deploy documented command and I tried it with 3.65.3 and it doesn't work. I am trying shopify app deploy --force --no-release which is what we use in CICD and it does not update the URLs. My shopify.app.toml includes a application_url and redirect_urls, but they seem to not be used.
Sorry, I meant shopify app deploy (comment updated).
There's a field in the TOML called include_config_on_deploy that needs to be enabled if you want the deploy to include configuration like the URLs. Could you check that? More info: https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#build
Hi @gonzaloriestra
Apologies for my late reply, I'll have a test with the config files and see if this works.
it's a bit of a bloated approach compared to the cli keeps things a lot simpler as you don't need separate config files just to run one single command in the CI/CD and you have the overhead of now managing multiple configs.
Would love to know the reasoning on how this is better than the removed cli command. Could you not have kept the cli for those that don't need the whole config?
@gonzaloriestra i had already been setting that, actually. this is my toml:
client_id = "foo"
name = "bar"
application_url = "baz"
embedded = true
[build]
include_config_on_deploy = true
[access_scopes]
scopes = "write_orders, read_orders, read_products, read_discounts, write_discounts, read_product_listings, unauthenticated_read_product_listings"
[auth]
redirect_urls = [
"qux",
]
[webhooks]
api_version = "2023-01"
And the application URL is not being updated? Are you sure the deploy is using that TOML? It should show the used one at the beginning. And then, the application_url should be marked as updated if it changed.
Could you share the verbose output?
Note that if you use --no-release, a new version will be created, but it won't be the active one, so the public URL of your app won't change (but you should see the right value in the latest version in the Partners dashboard).
I think it's relates to the --no-release flag. I tried on a new app and new store and it worked.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.