Skip to content

Enable fetching the latest release of http-type packages #4323

@IceCodeNew

Description

@IceCodeNew

Overview

clarify the words used in following:
http-type packages: https://aquaproj.github.io/docs/reference/registry-config/http-package
github-release-type packages: https://aquaproj.github.io/docs/reference/registry-config/github-release-package

when I was trying to install the ncdu tool, I get the following error in mise:

$ mise use -g "aqua:dev.yorhel.nl/ncdu"
mise WARN  Remote versions cannot be fetched: aqua package dev.yorhel.nl/ncdu does not have repo_owner and/or repo_name.
mise WARN  No versions found for aqua:dev.yorhel.nl/ncdu
mise ERROR Failed to install aqua:dev.yorhel.nl/ncdu@latest: 
   0: HTTP status client error (404 Not Found) for url (https://dev.yorhel.nl/download/ncdu-latest-linux-x86_64.tar.gz)

and I can reproduce it in the latest aqua-registry:

$ gh repo clone aquaproj/aqua-registry -- --depth=100 --jobs=4
$ aqua i -l  # to install tools required for contribution.

$ aqua g
- name: dev.yorhel.nl/ncdu
  version: '[SET PACKAGE VERSION]'

$ aqua i dev.yorhel.nl/ncdu
INFO[0000] create a symbolic link                        command=ncdu env=linux/amd64 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=cli/cli package_version=v2.82.1 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=rhysd/actionlint package_version=v1.7.8 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=jqlang/jq package_version=jq-1.8.1 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1 registry=standard
ERRO[0002] install the package                           download_url=https://dev.yorhel.nl/download/ncdu-[SET PACKAGE VERSION]-linux-x86_64.tar.gz env=linux/amd64 error=download a package: status code >= 400 http_status_code=404 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1 registry=standard
ERRO[0010] request failed                                env=linux/amd64 error=Get "https://github.com/jqlang/jq/releases/download/jq-1.8.1/jq-linux-amd64": net/http: TLS handshake timeout method=GET program=aqua program_version=2.55.1 url=https://github.com/jqlang/jq/releases/download/jq-1.8.1/jq-linux-amd64

after reading the document https://aquaproj.github.io/docs/ , I wondered these error messages simply mean that aqua does not know how to fetch the latest release of the http-type package dev.yorhel.nl/ncdu.

I tried to figure out if there is anything I can do about it, IMO aqua should be able to fetch the latest release of most http-type packages like ncdu by query the REST API https://release-monitoring.org/api/v2/versions/?project_id=6045 (A cross-distribution upstream release monitoring project maintaining by fedora-infra)

That idea brings us to this very issue, and here is the TL;DR part:

  1. an http-type package in aqua-registry is currently not able to fetch its latest version, and a collection of available versions are not maintained (by design). - True or False?
  2. idea of giving the http-type packages ability to fetch its latest version are not planned/implemented yet, and the idea is welcomed. - True or False?
  3. The above is all crap and I am not even close to the real situation and purpose of this project. - True or False?

How to reproduce

Current branch name: aquaproj/aqua-registry@20a578b (main)
Code:

N/A

Command and output

$ gh repo clone aquaproj/aqua-registry -- --depth=100 --jobs=4
$ aqua i -l  # to install tools required for contribution.

$ aqua g
- name: dev.yorhel.nl/ncdu
  version: '[SET PACKAGE VERSION]'

$ aqua i dev.yorhel.nl/ncdu
INFO[0000] create a symbolic link                        command=ncdu env=linux/amd64 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=cli/cli package_version=v2.82.1 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=rhysd/actionlint package_version=v1.7.8 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=jqlang/jq package_version=jq-1.8.1 program=aqua program_version=2.55.1 registry=standard
INFO[0000] download and unarchive the package            env=linux/amd64 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1 registry=standard
ERRO[0002] install the package                           download_url=https://dev.yorhel.nl/download/ncdu-[SET PACKAGE VERSION]-linux-x86_64.tar.gz env=linux/amd64 error=download a package: status code >= 400 http_status_code=404 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1 registry=standard
ERRO[0010] request failed                                env=linux/amd64 error=Get "https://github.com/jqlang/jq/releases/download/jq-1.8.1/jq-linux-amd64": net/http: TLS handshake timeout method=GET program=aqua program_version=2.55.1 url=https://github.com/jqlang/jq/releases/download/jq-1.8.1/jq-linux-amd64

Expected behaviour

aqua i dev.yorhel.nl/ncdu will fetch the latest version of ncdu, which is 2.9.2 at the moment. Then do the installation without failure.

Actual behaviour

error=download a package: status code >= 400 http_status_code=404 package_name=dev.yorhel.nl/ncdu package_version=[SET PACKAGE VERSION] program=aqua program_version=2.55.1 registry=standard

Note

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions