-
Notifications
You must be signed in to change notification settings - Fork 286
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
Installation fails #322
Comments
I'm seeing this as well |
It works fine when you run it with specific version: |
I believe it is that latest commit from #267 |
I think the Lines 80 to 84 in 4790fb1
DOWNLOAD_URL is empty after getDownloadURL call
|
pinning helm secrets version while we are at it
Seems need a new release |
Just added arch-specific archives to the existing v3.1.3 release. I hope those fix the issue https://github.com/databus23/helm-diff/releases/tag/v3.1.3 |
Thanks @mumoshu to ensure I had a clean environment, I ran |
@damienpontifex Glad to hear it worked! Thanks a lot for your confirmation |
pinning helm secrets version while we are at it Co-authored-by: Prashant Warrier <warrierprashant93@outlook.com>
This now causes new issues when using a commit hash as version, where it has a download url consisting of multiple urls;
|
@koenpunt Thanks for reporting! In that case you can just replace Specifying Line 4 in 97f7749
|
I did that for now, but it should be possible to use a single commit as well? Or at least the script should be able to resolve to a single download url I suppose? |
@mumoshu the installation is failing for us.... we are installing in a docker container based on this is the run command:
these are the logs:
|
@stitakis same issue what I reported above. It resolves multiple urls from the GitHub api, but treats them as a single url, causing the |
@koenpunt Thanks for the feedback. But I'm pretty confused- how is that possible? We don't build helm-diff for every commit made to our main branch. So, allowing to install helm-diff from a commit ID implies that we need to enhance our plugin installation script to use Does your environment where you run helm and helm-diff has |
@stitakis @koenpunt Ah, so it looks like specifying Probably what we'd need to do instead would be to undo addition of arch-specific release assets to |
Hm, it works for me on linux/amd64 + 3.1.3
|
I've done #322 (comment) anyway and verified that the below works for me.
|
Yeah I noticed that, but the download script still is resolving the download url incorrectly. That said, If using a commit hash is not really supported, should it maybe fail immediately, instead of downloading the latest release? |
@koenpunt Yeah, maybe that's better! |
hmmm - this is from today morning (our CI) ... (as @stitakis noted above)
and this worked, untouched a few days back ... so I guess it's a regression?! |
@clemensutschig Interesting.. The below shows how it succeeds for me, and I see no meaningful diff between your logs and mine:
|
@clemensutschig FWIW, @stitakis's was Perhaps you're running a different command? Do you have a |
@clemensutschig Maybe you've specified a commit ID in |
@mumoshu - nope -we run
with
on top of
which yields
and all that on top of centos (jenkins-agent) but ... (edited) ... what looks weird to me - is why is plugin install trying
|
@clemensutschig Thsi is how it succeeds for me with
This usually happens when you've outdated helm plugins cache. I tend to clean it up before running
and the plugins cache path comes from the output of |
It's a plain fresh install - so there should not be any cache ... I added a hard commit now: opendevstack/ods-core@2974ced to remove the helm diff plugin cache - tmrw morning we know |
The below log implies that
See |
In case it turned out to be outdated plugin cache issue- our |
ok deleting with from helm env
|
@clemensutschig Could you try running |
I'm currently using Helm 3.5.3 so try upgrading helm if that makes difference. |
Please see the relevant part of install-binary.sh across versions below:
|
version=$(git -C "$HELM_PLUGIN_DIR" describe --tags --exact-match 2>/dev/null || :) | |
if [ -n "$version" ]; then | |
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/download/$version/helm-diff-$OS.tgz" | |
else | |
# Use the GitHub API to find the download url for this project. | |
url="https://api.github.com/repos/$PROJECT_GH/releases/latest" | |
if type "curl" >/dev/null; then | |
DOWNLOAD_URL=$(curl -s $url | grep $OS | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') | |
elif type "wget" >/dev/null; then | |
DOWNLOAD_URL=$(wget -q -O - $url | grep $OS | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') | |
fi | |
fi |
installs 3.1.3 by grep $OS | grep $ARCH
+ https://github.com/databus23/helm-diff/releases/tag/v3.1.3
--version 3.2.0
Lines 72 to 83 in 860f354
version=$(git -C "$HELM_PLUGIN_DIR" describe --tags --exact-match 2>/dev/null || :) | |
if [ -n "$version" ]; then | |
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/download/$version/helm-diff-$OS-$ARCH.tgz" | |
else | |
# Use the GitHub API to find the download url for this project. | |
url="https://api.github.com/repos/$PROJECT_GH/releases/latest" | |
if type "curl" >/dev/null; then | |
DOWNLOAD_URL=$(curl -s $url | grep $OS | grep $ARCH | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') | |
elif type "wget" >/dev/null; then | |
DOWNLOAD_URL=$(wget -q -O - $url | grep $OS | grep $ARCH | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}') | |
fi | |
fi |
installs 3.2.0 by grep $OS | grep $ARCH
+ https://github.com/databus23/helm-diff/releases/tag/v3.2.0
without --version
It will use the script at the HEAD of the master branch
Lines 85 to 89 in 7486472
version=$(git -C "$HELM_PLUGIN_DIR" describe --tags --exact-match 2>/dev/null || :) | |
if [ "$SCRIPT_MODE" = "install" -a -n "$version" ]; then | |
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/download/$version/helm-diff-$OS-$ARCH.tgz" | |
else | |
DOWNLOAD_URL="https://github.com/$PROJECT_GH/releases/latest/download/helm-diff-$OS-$ARCH.tgz" |
installs 3.2.0 today thanks to L89
So I did some more debugging around this. The error mentioned by @clemensutschig happens with Helm 3.4.2. Updating Helm to 3.5.3 and helm-diff to 3.2.0 fixes the problem. I am not sure what change in Helm 3.5.3 is responsible for this, but I think we can update to 3.5.3. However, the install displays that it doesn't install version 3.2.0, but rather 3.3.1. I investigated this as it simply seems to install the latest version, no matter what is passed via
The latest version of I'm going to provide a fix for this in a sec. |
😱 |
Fix install script See #322 (comment).
3.3.2 has been released with the fix. Would you mind trying once again? |
@mumoshu It works now, thank you very much! |
@michaelsauter Thank you for your help! |
@michaelsauter Thank you for spotting that, I am the one who has included the line using which, I didn't thought about the POSIX compatibility. On the other hand the home command was already in the script, and I kept it for back compatibility with helm2. Not sure it would still work for helm2 without that line. |
Our CI workflow install the diff plugin. Since an hour ago it start failing (commit 4790fb1)
We are running:
helm plugin install https://github.com/databus23/helm-diff
Error:
awk: cmd. line:1: warning: regexp escape sequence `"' is not a known regexp operator
Downloading
curl: (3) URL using bad/illegal format or missing URL
Failed to install helm-diff
For support, go to https://github.com/databus23/helm-diff.
Error: plugin install hook for "diff" exited with error
Error: Process completed with exit code 1.
The text was updated successfully, but these errors were encountered: