microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.76k stars 4.57k forks source link

[Package Issue]: Helm.Helm #156114

Open remidebette opened 6 months ago

remidebette commented 6 months ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

winget upgrade freezes

Steps to reproduce

When executing winget upgrade --all

And Helm.Helm is part of the packages to be upgraded

Actual behavior

The package install succeedes but then the upgrade does not pursue and there is no more logging in the terminal.

If doing a new upgrade, winget will take over from the next package, and helm is indeed installed successfully

Expected behavior

The upgrade should simply continue without human interviention

Environment

Gestionnaire de package Windows v1.7.11261
Copyright (c) Microsoft Corporation. Tous droits réservés.

Windows: Windows.Desktop v10.0.22000.2538
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.22.11261.0

Répertoires Winget
-----------------------------------------------------------------------------------------------------------------------
Journaux                                     %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Paramètres utilisateurs                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Répertoire des liens portables (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Links
Répertoire des liens portables (ordinateur)  C:\Program Files\WinGet\Links
Racine de package portable (utilisateur)     %LOCALAPPDATA%\Microsoft\WinGet\Packages
Racine du package portable                   C:\Program Files\WinGet\Packages
Racine de package portable (x86)             C:\Program Files (x86)\WinGet\Packages
Téléchargements du programme d’installation  %USERPROFILE%\Downloads

Liens
---------------------------------------------------------------------------------------------
Déclaration de confidentialité        https://aka.ms/winget-privacy
Contrat de licence                    https://aka.ms/winget-license
Avis de tiers                         https://aka.ms/winget-3rdPartyNotice
Page d’accueil                        https://aka.ms/winget
Conditions générales du Windows Store https://www.microsoft.com/en-us/storedocs/terms-of-sale

Paramètre administrateur                  État
---------------------------------------------------
LocalManifestFiles                        Désactivé
BypassCertificatePinningForMicrosoftStore Désactivé
InstallerHashOverride                     Désactivé
LocalArchiveMalwareScanOverride           Désactivé

Screenshots and Logs

No response

Dragon1573 commented 5 months ago

Try to validate in Windows Sandbox instance and there's nothing unusual. Failed to reproduce the issue.

Windows x64 host ```text 12:06:03 D:\...\winget-pkgs [master ≡] 12.146s 0x80004004 pwsh> .\Tools\SandboxTest.ps1 --> Checking dependencies --> Starting Windows Sandbox, and: - Mounting the following directories: - C:\Users\Administrator\AppData\Local\Temp\SandboxTest as read-only - D:\Workloads\winget-pkgs as read-and-write - Installing WinGet - Configuring Winget ```
Windows Sandbox x64 instance ```text --> Installing WinGet --> Disabling safety warning when running installer Tip: you can type 'Update-EnvironmentVariables' to update your environment variables, such as after installing a new software. PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget install -e Helm.Helm --version 3.15.1 --silent The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). Do you agree to all the source agreements terms? [Y] Yes [N] No: Y Found Helm [Helm.Helm] Version 3.15.1 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://get.helm.sh/helm-v3.15.1-windows-amd64.zip ██████████████████████████████ 16.2 MB / 16.2 MB Successfully verified installer hash Extracting archive... Successfully extracted archive Starting package install... Command line alias added: "helm" Path environment variable modified; restart your shell to use the new value. Successfully installed ``` ```text Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\Users\WDAGUtilityAccount> helm The Kubernetes package manager Common actions for Helm: - helm search: search for charts - helm pull: download a chart to your local directory to view - helm install: upload the chart to Kubernetes - helm list: list releases of charts Environment variables: | Name | Description | |------------------------------------|------------------------------------------------------------------------------------------------------------| | $HELM_CACHE_HOME | set an alternative location for storing cached files. | | $HELM_CONFIG_HOME | set an alternative location for storing Helm configuration. | | $HELM_DATA_HOME | set an alternative location for storing Helm data. | | $HELM_DEBUG | indicate whether or not Helm is running in Debug mode | | $HELM_DRIVER | set the backend storage driver. Values are: configmap, secret, memory, sql. | | $HELM_DRIVER_SQL_CONNECTION_STRING | set the connection string the SQL storage driver should use. | | $HELM_MAX_HISTORY | set the maximum number of helm release history. | | $HELM_NAMESPACE | set the namespace used for the helm operations. | | $HELM_NO_PLUGINS | disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. | | $HELM_PLUGINS | set the path to the plugins directory | | $HELM_REGISTRY_CONFIG | set the path to the registry config file. | | $HELM_REPOSITORY_CACHE | set the path to the repository cache directory | | $HELM_REPOSITORY_CONFIG | set the path to the repositories file. | | $KUBECONFIG | set an alternative Kubernetes configuration file (default "~/.kube/config") | | $HELM_KUBEAPISERVER | set the Kubernetes API Server Endpoint for authentication | | $HELM_KUBECAFILE | set the Kubernetes certificate authority file. | | $HELM_KUBEASGROUPS | set the Groups to use for impersonation using a comma-separated list. | | $HELM_KUBEASUSER | set the Username to impersonate for the operation. | | $HELM_KUBECONTEXT | set the name of the kubeconfig context. | | $HELM_KUBETOKEN | set the Bearer KubeToken used for authentication. | | $HELM_KUBEINSECURE_SKIP_TLS_VERIFY | indicate if the Kubernetes API server's certificate validation should be skipped (insecure) | | $HELM_KUBETLS_SERVER_NAME | set the server name used to validate the Kubernetes API server certificate | | $HELM_BURST_LIMIT | set the default burst limit in the case the server contains many CRDs (default 100, -1 to disable) | | $HELM_QPS | set the Queries Per Second in cases where a high number of calls exceed the option for higher burst values | Helm stores cache, configuration, and data based on the following configuration order: - If a HELM_*_HOME environment variable is set, it will be used - Otherwise, on systems supporting the XDG base directory specification, the XDG variables will be used - When no other location is set a default location will be used based on the operating system By default, the default directories depend on the Operating System. The defaults are listed below: | Operating System | Cache Path | Configuration Path | Data Path | |------------------|---------------------------|--------------------------------|-------------------------| | Linux | $HOME/.cache/helm | $HOME/.config/helm | $HOME/.local/share/helm | | macOS | $HOME/Library/Caches/helm | $HOME/Library/Preferences/helm | $HOME/Library/helm | | Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm | Usage: helm [command] Available Commands: completion generate autocompletion scripts for the specified shell create create a new chart with the given name dependency manage a chart's dependencies env helm client environment information get download extended information of a named release help Help about any command history fetch release history install install a chart lint examine a chart for possible issues list list releases package package a chart directory into a chart archive plugin install, list, or uninstall Helm plugins pull download a chart from a repository and (optionally) unpack it in local directory push push a chart to remote registry login to or logout from a registry repo add, list, remove, update, and index chart repositories rollback roll back a release to a previous revision search search for a keyword in charts show show information of a chart status display the status of the named release template locally render templates test run tests for a release uninstall uninstall a release upgrade upgrade a release verify verify that a chart at the given path has been signed and is valid version print the client version information Flags: --burst-limit int client-side default throttling limit (default 100) --debug enable verbose output -h, --help help for helm --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. --kube-as-user string username to impersonate for the operation --kube-ca-file string the certificate authority file for the Kubernetes API server connection --kube-context string name of the kubeconfig context to use --kube-insecure-skip-tls-verify if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kube-tls-server-name string server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used --kube-token string bearer token used for authentication --kubeconfig string path to the kubeconfig file -n, --namespace string namespace scope for this request --qps float32 queries per second used when communicating with the Kubernetes API, not including bursting --registry-config string path to the registry config file (default "C:\\Users\\WDAGUtilityAccount\\AppData\\Roaming\\helm\\registry\\config.json") --repository-cache string path to the file containing cached repository indexes (default "C:\\Users\\WDAGUT~1\\AppData\\Local\\Temp\\helm\\repository") --repository-config string path to the file containing repository names and URLs (default "C:\\Users\\WDAGUtilityAccount\\AppData\\Roaming\\helm\\repositories.yaml") Use "helm [command] --help" for more information about a command. PS C:\Users\WDAGUtilityAccount> helm version version.BuildInfo{Version:"v3.15.1", GitCommit:"e211f2aa62992bd72586b395de50979e31231829", GitTreeState:"clean", GoVersion:"go1.22.3"} ``` ```text PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget upgrade --all Name Id Version Available Source ---------------------------------------------------------------- Helm Helm.Helm 3.15.1 3.15.2 winget Microsoft Edge Microsoft.Edge 100.0.1185.36 126.0.2592.56 winget 2 upgrades available. (1/1) Found Helm [Helm.Helm] Version 3.15.2 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://get.helm.sh/helm-v3.15.2-windows-amd64.zip ██████████████████████████████ 16.2 MB / 16.2 MB Successfully verified installer hash Extracting archive... Successfully extracted archive Starting package install... Command line alias added: "helm" Successfully installed ``` ```text Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows PS C:\Users\WDAGUtilityAccount> helm version version.BuildInfo{Version:"v3.15.2", GitCommit:"1a500d5625419a524fdae4b33de351cc4f58ec35", GitTreeState:"clean", GoVersion:"go1.22.4"} ```
remidebette commented 5 months ago

Hi, thanks for trying to replicate. It still happened for the upgrade to this version on my local yesterday

Dragon1573 commented 5 months ago

It still happened for the upgrade to this version on my local yesterday.

Did you install the package with another installer type? Installer types are incompatible with each other in winget.exe.

davejdyer commented 4 months ago

I am also experiencing this on several systems, though it doesn't seem to be related to the "upgrade --all" action. I noticed it happening regularly over the last few months, so I started trying to upgrade Helm.Helm on its own and the install still freezes. I'm not finding that it installs successfully. It seems more like the database THINKS it installed successfully and no longer finds an available upgrade. But if I look in the packages install path, the old executable and all support files are still there. If I run "helm version" it shows the old version, but winget thinks it's current. My best guess, based on where the install/upgrade hangs, is that the package is unzipped, the database is updated, but it fails to copy files to the destination directory. The big question for me is why it freezes/hangs instead of throwing an error or timing out. The logs show nothing as it doesn't progress past successful operations. I have ONE virtual machine that I know of that isn't having this problem, so when I get time I'll see if I can find a difference.

mdanish-kh commented 4 months ago

@davejdyer @remidebette Would you be able to recall when did you first install the package Helm.Helm and was the install made through an older version of WinGet? There is a known issue where winget install/uninstall/upgrade would "freeze" for these types of packages (nested portables), which I'll reference below. The issue also contains a workaround to unblock this behavior, could you see if your issue can be solved with those steps?

davejdyer commented 3 months ago

@mdanish-kh - I can confirm that the workaround mentioned in winget-cli#3279 fixes this problem with Helm.Helm for me. I'm not certain of the exact timeline when it was added to each machine, but it was rolled out slowly over time so many were likely before whatever the version line was that began the issue. It's further muddied by the fact that the Helm package specifically had a different issue at some point where the PATH variable wasn't updating properly, so it was added and removed several times making it hard to tell.

I don't have many to fix, but this would be a major pain to clean up for anyone with a large install base with older portables. Hopefully someone can find a good fix, though clean-up scripts with PoSh wouldn't be too hard.

Thanks for your help!