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]: winget-releaser creates incorrect mapping between Architecture and InstallerUrl #173

Closed
1 task done
twpayne opened this issue Jun 19, 2023 · 20 comments
Closed
1 task done
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@twpayne
Copy link

twpayne commented Jun 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

See https://github.com/microsoft/winget-pkgs/pull/110014/files.

Short version:

  • PR automatically created by winget-releaser.
  • The PR is clearly incorrect: in the Installers section, there are four different Architectures (x64, x86, arm, arm64) and yet all four InstallerUrls point at the same amd64 zip file with the same SHA256 hash.

The winget-releaser action used to create this PR is:
https://github.com/twpayne/chezmoi/blob/30f5995ec56381c27cfa238dc48fe8024eae0f29/.github/workflows/winget.yml

I would expect winget-releaser to use the architecture-appropriate zip file for each Architecture. All zip files are available as release assets in https://github.com/twpayne/chezmoi/releases/tag/v2.34.2.

Please let me know how I can help debug/resolve this issue.

@vedantmgoyal9
Copy link
Owner

cc @russellbanks

@t1m0thyj
Copy link

I have the same issue with this PR automatically created by winget-releaser. It selected the ARM64 installer for all architectures.

The GitHub workflow is here: https://github.com/t1m0thyj/WinDynamicDesktop/blob/main/.github/workflows/release-winget.yml

There is a separate installer for each architecture:
image

@vedantmgoyal9
Copy link
Owner

I will update the action to use the previous release of Komac until the bug is fixed over there. (russellbanks/Komac#215)

@vedantmgoyal9
Copy link
Owner

vedantmgoyal9 commented Jun 20, 2023

I apologize for the inconvenience caused. Could you please try to re-run the workflow jobs to create a fresh PR? Hopefully, this should create the correct PRs.

@chrisbra
Copy link

Same thing happened to vim last week https://github.com/vim/vim-win32-installer/actions/runs/5273078475/jobs/9536084416

Unfortunately now new runs keep failing with "The number of unique installer urls is greater than the number of previous manifest urls", not sure if this is related or not :/ russellbanks/Komac#224

@vedantmgoyal9
Copy link
Owner

It will be automatically fixed once microsoft/winget-pkgs#110397 is merged.

@vedantmgoyal9 vedantmgoyal9 removed their assignment Jul 2, 2023
@twpayne
Copy link
Author

twpayne commented Jul 4, 2023

There has been no new version of winget-releaser since this was fixed, so users using the latest major of winget-releaser are still experiencing this bug.

Refs microsoft/winget-pkgs#111215.

@russellbanks
Copy link
Contributor

russellbanks commented Jul 4, 2023

There has been no new version of winget-releaser since this was fixed, so users using the latest major of winget-releaser are still experiencing this bug.

@twpayne, I believe this was due to a regex bug in 1.8.0 of Komac. This is fixed now that WinGet Releaser has updated to 1.8.1. Here was my test:

java -jar Komac-1.8.1-all.jar update --id 'twpayne.chezmoi' --version 2.34.3 --urls 'https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm64.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_i386.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm.zip,https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_amd64.zip'
# Created with Komac v1.8.1
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.4.0.schema.json

PackageIdentifier: twpayne.chezmoi
PackageVersion: 2.34.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: chezmoi.exe
  PortableCommandAlias: chezmoi
Installers:
- Architecture: x86
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_i386.zip
  InstallerSha256: 03FDC9413DA849D03A386DF9F02254FE48C1EEF712148F375A2C4B0D21A962FD
- Architecture: x64
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_amd64.zip
  InstallerSha256: 8DFC6B2F46FA86B00A20B8C1C86707813317660165D72A29263CB05A652BEACC
- Architecture: arm
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm.zip
  InstallerSha256: 4D70FE69162FF5C76C4A74AE9AA3C6B1F07BD80AB25C2F91326E7721FA990704
- Architecture: arm64
  InstallerUrl: https://github.com/twpayne/chezmoi/releases/download/v2.34.3/chezmoi_2.34.3_windows_arm64.zip
  InstallerSha256: 1F888B8F731AD14D987B6B7A0B7C0313E1E263C3C0741FD32E22F468C20DFAFD
ManifestType: installer
ManifestVersion: 1.4.0

@twpayne
Copy link
Author

twpayne commented Jul 4, 2023

This is confusing:

The latest release of Winget Releaser is v2, which was released on February 12 and obviously does not contain this bug fix from June: https://github.com/vedantmgoyal2009/winget-releaser/releases

However, it looks like the v2 tag itself was moved recently: https://github.com/vedantmgoyal2009/winget-releaser/tags

If Winget Releaser is moving tags around then it's likely to confuse a lot of systems and people. Winget Releaser should not move tags and should use semantic versioning instead.

@russellbanks
Copy link
Contributor

@vedantmgoyal2009

@chrisbra
Copy link

@vedantmgoyal2009 was this supposed to be fixed? It still happened to the Vim Deployment yesterday: microsoft/winget-pkgs#111716

@twpayne
Copy link
Author

twpayne commented Jul 12, 2023

@chrisbra This is apparently fixed but there has been no new release with the fix yet. You could pin your use of the GitHub action to a specific commit to get it, but v2 of winget-releaser is still broken.

@chrisbra
Copy link

so instead of using @v2 using @f5fe57eeed3b1d0ece9116be65c80c5c53354db9 should fix it?

@twpayne
Copy link
Author

twpayne commented Jul 12, 2023

Yes, exactly.

@chrisbra
Copy link

thanks, will do

chrisbra added a commit to chrisbra/vim-win32-installer that referenced this issue Jul 12, 2023
As mentioned in vedantmgoyal9/winget-releaser#173, work around
creating brocken winget releases (by using wrong Architecture links) by
pinning the winget-releaser actions to a fixed commit instead of using
tag `v2`.
@russellbanks
Copy link
Contributor

@chrisbra I've spent some time looking into this. The URL https://github.com/vim/vim-win32-installer/releases/download/v9.0.1677/gvim_9.0.1677_x64.exe was being identified as an x86 installer because of the win32 in vim-win32-installer. I've created a fix to use the architecture most towards the end of the URL, as that's where they usually are.

@chrisbra
Copy link

thank you! But that also means I need to await an update here from @vedantmgoyal2009 right?

@russellbanks
Copy link
Contributor

thank you! But that also means I need to await an update here from @vedantmgoyal2009 right?

WinGet Releaser uses the latest version of Komac, so I just need to make a release. I've created #187 as a feature request for scenarios like this where you might want to temporarily use the nightly release or a slightly older version if there's an issue affecting your package.

@vedantmgoyal9
Copy link
Owner

@all-contributors please add @twpayne for bug

@allcontributors
Copy link
Contributor

@vedantmgoyal2009

I've put up a pull request to add @twpayne! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants