topgrade-rs / topgrade

Upgrade all the things

Home Page:https://topgrade-rs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release artifacts missing for ARM64/AARCH64 GNU Linux

josefwegner opened this issue · comments

Erroneous Behavior

pi5:~ $ uname -a
Linux pi5 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
pi5:~ $ topgrade

── 16:32:14 - Self update ──────────────────────────────────────────────────────
Checking target-arch... aarch64-unknown-linux-gnu
Checking current version... v13.0.0
Checking latest released version... v14.0.1
New release found! v13.0.0 --> v14.0.1
New release is *NOT* compatible
Self Update failed:
   0: ReleaseError: No asset found for target: `aarch64-unknown-linux-gnu`

Location:
   src/self_update.rs:28
Retry? (y)es/(N)o/(s)hell/(q)uit

Expected Behavior

Topgrade should upgrade itself to 14.0.x.

Steps to reproduce

Run topgrade on Raspberry Pi OS 64bit.

Possible Cause (Optional)

It seems that the AARCH64/ARM64 release artifacts for GNU linux are missing for release 14 and above.

Problem persists without calling from topgrade

N/A

Did you run topgrade through Remote Execution

  • Yes
  • No

Additional Details

pi5:~ $ topgrade -V
Topgrade 13.0.0

Verbose Output (topgrade -v)

DEBUG Configuration at /home/jwegne/.config/topgrade.toml
DEBUG Version: 13.0.0
DEBUG OS: aarch64-unknown-linux-gnu
DEBUG Args { inner: ["topgrade", "-v"] }
DEBUG Binary path: Ok("/home/jwegne/bin/topgrade")
DEBUG self-update Feature Enabled: true
DEBUG Configuration: Config { opt: CommandLineArgs { edit_config: false, show_config_reference: false, run_in_tmux: false, cleanup: false, dry_run: false, no_retry: false, disable: [], only: [], custom_commands: [], env: [], verbose: true, keep_at_end: false, skip_notify: false, yes: None, disable_predefined_git_repos: false, config: None, remote_host_limit: None, show_skipped: false, log_filter: "warn", gen_completion: None, gen_manpage: false, no_self_update: false }, config_file: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: None, sudo_command: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: Some({}), post_commands: Some({}), commands: Some({}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: None }), composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, show_arch_news: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, nix_env_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, pull_arguments: None, push_arguments: None, repos: None, pull_only_repos: None, push_only_repos: None, pull_predefined: None }), windows: Some(Windows { accept_all_updates: None, self_rename: None, open_remotes_in_new_terminal: None, enable_winget: None, wsl_update_pre_release: None, wsl_update_use_web_download: None }), npm: Some(NPM { use_sudo: None }), yarn: Some(Yarn { use_sudo: None }), vim: Some(Vim { force_plug_update: None }), firmware: Some(Firmware { upgrade: None }), vagrant: Some(Vagrant { directories: None, power_on: None, always_suspend: None }), flatpak: Some(Flatpak { use_sudo: None }), distrobox: Some(Distrobox { use_root: None, containers: None }) }, allowed_steps: [AM, AppMan, Asdf, Atom, Bin, Bob, BrewCask, BrewFormula, Bun, Cargo, Chezmoi, Chocolatey, Choosenim, Composer, Conda, ConfigUpdate, Containers, CustomCommands, DebGet, Deno, Distrobox, DkpPacman, Dotnet, Emacs, Firmware, Flatpak, Flutter, Fossil, Gcloud, Gem, Ghcup, GithubCliExtensions, GitRepos, GnomeShellExtensions, Go, Guix, Haxelib, Helm, HomeManager, Jetpack, Julia, Juliaup, Kakoune, Helix, Krew, Lure, Macports, Mamba, Miktex, Mas, Maza, Micro, Myrepos, Nix, Node, Opam, Pacdef, Pacstall, Pearl, Pip3, PipReview, PipReviewLocal, Pipupgrade, Pipx, Pkg, Pkgin, Pnpm, Powershell, Protonup, Raco, Rcm, Remotes, Restarts, Rtcl, RubyGems, Rustup, Scoop, Sdkman, SelfUpdate, Sheldon, Shell, Snap, Sparkle, Spicetify, Stack, Stew, System, Tldr, Tlmgr, Tmux, Toolbx, Vagrant, Vcpkg, Vim, Vscode, Winget, Wsl, WslUpdate, Yadm, Yarn] }
DEBUG Detected "/usr/bin/git" as "git"
DEBUG Detected "/usr/local/bin/pwsh" as "pwsh"
DEBUG Executing command `/usr/local/bin/pwsh -NoProfile -Command 'Split-Path $profile'`
DEBUG Path "/home/jwegne/.config/powershell" exists
DEBUG Path "/home/jwegne/.config/emacs" doesn't exist
DEBUG Path "/home/jwegne/.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Detected "/usr/bin/sudo" as "sudo"
DEBUG Step "Self Update"

── 16:37:36 - Self update ──────────────────────────────────────────────────────
Checking target-arch... aarch64-unknown-linux-gnu
Checking current version... v13.0.0
Checking latest released version... DEBUG starting new connection: https://api.github.com/
DEBUG resolving host="api.github.com"
DEBUG connecting to 140.82.121.5:443
DEBUG connected to 140.82.121.5:443
DEBUG No cached session for DnsName("api.github.com")
DEBUG Not resuming any session
DEBUG Using ciphersuite TLS13_AES_128_GCM_SHA256
DEBUG Not resuming
DEBUG TLS1.3 encrypted extensions: [ServerNameAck, Protocols([ProtocolName(6832)])]
DEBUG ALPN protocol is Some(b"h2")
DEBUG binding client connection
DEBUG client connection bound
DEBUG send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
DEBUG Connection{peer=Client}: new
DEBUG Connection{peer=Client}: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
DEBUG pooling idle connection for ("https", api.github.com)
DEBUG Connection{peer=Client}: send frame=Headers { stream_id: StreamId(1), flags: (0x5: END_HEADERS | END_STREAM) }
DEBUG Connection{peer=Client}: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 67108864, max_frame_size: 68608, enable_connect_protocol: 1 }
DEBUG Connection{peer=Client}: send frame=Settings { flags: (0x1: ACK) }
DEBUG Connection{peer=Client}: received frame=Settings { flags: (0x1: ACK) }
DEBUG Connection{peer=Client}: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
DEBUG Connection{peer=Client}: received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
DEBUG Connection{peer=Client}: received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
DEBUG Connection{peer=Client}: close
v14.0.1
New release found! v13.0.0 --> v14.0.1
New release is NOT compatible
DEBUG Step "Self Update" failed:
0: ReleaseError: No asset found for target: aarch64-unknown-linux-gnu

Location:
src/self_update.rs:28
Self Update failed:
0: ReleaseError: No asset found for target: aarch64-unknown-linux-gnu

Location:
src/self_update.rs:28
Retry? (y)es/(N)o/(s)hell/(q)uit

It seems that the AARCH64/ARM64 release artifacts for GNU linux are missing for release 14 and above.

Thanks for this bug report! It indeed failed for Topgrade 14 and above, I will give them a fix when I have time.

I noticed that all actions by actions-rs has been archived, perhaps there are some bugs inside the workflow. I was able to build all targets by manually installing cross within the workflow:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        target:
          [
            "aarch64-unknown-linux-gnu",
            "armv7-unknown-linux-gnueabihf",
            "x86_64-unknown-linux-musl",
            "aarch64-unknown-linux-musl",
            "x86_64-unknown-freebsd",
          ]
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-
      - name: Set up cross
        run: cargo install --locked cross
      - name: Build
        run: cross build --release --all-features --target ${{matrix.target}}
      - name: Run tests
        # Linux can't run freebsd executables, so we have to skip testing
        if: ${{ matrix.target != 'x86_64-unknown-freebsd' }}
        run: cross test --release --all-features --target ${{matrix.target}}
      - name: Save files
        uses: actions/upload-artifact@v4
        with:
          name: topgrade-${{ matrix.target }}
          path: |
            target/**/release/topgrade
            target/**/release/topgrade.exe