-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add xdg-utils package to shopify-cli feature install script #92
Conversation
Would I need to bump the version number in |
Yeah, please bump the version to |
That's now done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Indeed it seems that we cannot test it without having a store for that, so we can skip adding a test scenario
However, could you please add a test scenario with mcr.microsoft.com/devcontainers/base:alpine
as the base image?
So something like this to scenarios.json
:
"test_alpine": {
"image": "mcr.microsoft.com/devcontainers/base:alpine",
"features": {
"shopify-cli": {}
}
}
And test_alpine.sh
:
#!/usr/bin/env bash
set -e
source dev-container-features-test-lib
check "shopify --version" shopify --version
reportResults
Just as a quick update, the test_alpine scenario is failing, so I'll take a look into it. On first glance, it looks like nanolayer is trying to call apt-get, which Alpine can't do:
|
It seems that the problem isn't your change, but the $nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/npm-package:1.0.3" \
--option package='@shopify/cli' --option version="$VERSION"
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/npm-package:1.0.3" \
--option package='@shopify/theme' --option version="$VERSION" https://github.com/devcontainers-extra/features/blob/main/src/npm-package/install.sh - It doesn't support Alpine Linux I think that in this case we should get rid of this elif [ -x "/sbin/apk" ] ; then
$nanolayer_location \
install \
apk \
"xdg-utils" Let's keep only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated request change
Thanks for taking a look! I was coming to a similar conclusion with the npm-package |
Currently, the npm-package feature doesn't support Alpine, so this check has been removed for now.
That's now removed 👍 |
I use Shopify (hence the need for the feature!) so can post the test results of a scenario using one of our stores, if that will help. |
No need for that, based on the issue you linked installing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
FYI: The updated feature will be available once the Release workflow deploys it |
I can confirm that with the inclusion of this feature in release, that it works as intended :) Thanks again! |
Great to hear, thanks for providing the fix in your PR! 🥇 |
Shopify CLI has a dependency on xdg-open (as part of xdg-utils) in order to authenticate.
After inspecting the nanolayer source code, I discovered that it had an install command that can install apt-get and apk packages.
This pull request will install xdg-utils in the setup process.
I've opted for using the apt-get and apk check from
library_scripts.sh
rather than using theghcr.io/devcontainers-extra/features/apt-get-packages
feature because I don't want to create a limitation on apt-get.See related issues:
I created a test scenario locally, adapted from the scenario already committed from the author of the feature, but haven't included it in this commit because it requires a parameter value that could be deemed as personal info. It doesn't appear that Shopify has a public development store to run this against - or if there is, I couldn't find one.
The check needed would have been:
check "shopify theme list" shopify theme list --store your_store_name