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]: app update-urls deprecation has no alternative for CI/CD #4266

Open
2 tasks done
Kyon147 opened this issue Aug 3, 2024 · 8 comments
Open
2 tasks done

[Bug]: app update-urls deprecation has no alternative for CI/CD #4266

Kyon147 opened this issue Aug 3, 2024 · 8 comments
Labels
Area: @shopify/app @shopify/app package issues State: Waiting for feedback Type: Enhancement New feature or request

Comments

@Kyon147
Copy link

Kyon147 commented Aug 3, 2024

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

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

@Kyon147 Kyon147 added the Type: Bug Something isn't working label Aug 3, 2024
@gonzaloriestra gonzaloriestra added Type: Enhancement New feature or request and removed Type: Bug Something isn't working labels Aug 20, 2024
@gonzaloriestra
Copy link
Contributor

gonzaloriestra commented Aug 20, 2024

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?

@rhyek
Copy link

rhyek commented Sep 25, 2024

@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.

@gonzaloriestra
Copy link
Contributor

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

@Kyon147
Copy link
Author

Kyon147 commented Sep 26, 2024

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?

@rhyek
Copy link

rhyek commented Sep 26, 2024

@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"

@gonzaloriestra
Copy link
Contributor

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.

Image

Could you share the verbose output?

@gonzaloriestra
Copy link
Contributor

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).

@rhyek
Copy link

rhyek commented Sep 27, 2024

I think it's relates to the --no-release flag. I tried on a new app and new store and it worked.

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 State: Waiting for feedback Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants