[registry-tool] Error in `cmdx new` command
Closed this issue · 6 comments
package name
aqua version
Please use the latest version.
aqua -v
aqua version 2.28.0 (ecd9e704110bf2f236b744cd6497ad50e1b52e47)
Environment
- OS (Windows, Linux, macOS, etc): macOS
- CPU Architecture (amd64, arm64, etc): arm64
Overview
Error when executing cmdx new fujiwara/lamux
How to reproduce
$ git log -n 1 HEAD
commit 4a362b39b0f34bcff9f2a047de9e68890bde78e3 (HEAD -> main, origin/main, origin/HEAD)
Author: aquaproj-aqua-registry[bot] <106294860+aquaproj-aqua-registry[bot]@users.noreply.github.com>
Date: 2024-06-08 01:09:41 +0000
chore: update dolthub/dolt v1.39.3 to v1.39.4 (#23734)
Co-authored-by: aquaproj-aqua-registry[bot] <106294860+aquaproj-aqua-registry[bot]@users.noreply.github.com>
$ cmdx s fujiwara/lamux
+ set -eu
bash scripts/check_commands.sh
bash scripts/check_gpgsign.sh
bash scripts/check_diff.sh
bash scripts/checkout.sh "$PACKAGE"
if [ "$IS_RECREATE" = true ]; then
aqua exec -- cmdx rm
fi
bash scripts/start.sh
bash scripts/scaffold.sh "$PACKAGE" "$CMD" "$LIMIT"
aqua exec -- cmdx gr
bash scripts/commit.sh "$PACKAGE"
bash scripts/test.sh "$PACKAGE"
bash scripts/start.sh aqua-registry-windows
bash scripts/test-windows.sh "$PACKAGE"
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 40 (delta 14), reused 23 (delta 10), pack-reused 0
Unpacking objects: 100% (40/40), 246.80 KiB | 5.25 MiB/s, done.
From https://github.com/aquaproj/aqua-registry
* branch main -> FETCH_HEAD
* [new branch] main -> temp-remote-20240608173134/main
branch 'feat/fujiwara/lamux' set up to track 'temp-remote-20240608173134/main'.
Switched to a new branch 'feat/fujiwara/lamux'
[INFO] Checking if the container aqua-registry exists
[INFO] Checking if the container aqua-registry is running
[INFO] Dockerfile isn't updated
What's next?
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug aqua-registry
Learn more at https://docs.docker.com/go/debug-cli/
What's next?
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug aqua-registry
Learn more at https://docs.docker.com/go/debug-cli/
Successfully copied 2.05kB to /Users/user/git/github.com/ponkio-o/aqua-registry/pkgs/fujiwara/lamux/pkg.yaml
Successfully copied 2.05kB to /Users/user/git/github.com/ponkio-o/aqua-registry/pkgs/fujiwara/lamux/registry.yaml
+ aqua exec -- aqua-registry gr
[feat/fujiwara/lamux 52f9e962b] feat(fujiwara/lamux): scaffold fujiwara/lamux
3 files changed, 29 insertions(+)
create mode 100644 pkgs/fujiwara/lamux/pkg.yaml
create mode 100644 pkgs/fujiwara/lamux/registry.yaml
Successfully copied 2.05kB to aqua-registry:/workspace/pkg.yaml
Successfully copied 2.05kB to aqua-registry:/workspace/registry.yaml
[INFO] Checking if the container aqua-registry-windows exists
[INFO] Checking if the container aqua-registry-windows is running
[INFO] Dockerfile isn't updated
Successfully copied 2.05kB to aqua-registry-windows:/workspace/pkg.yaml
Successfully copied 2.05kB to aqua-registry-windows:/workspace/registry.yaml
$ cmdx new fujiwara/lamux
+ set -eu
bash scripts/check_diff_package.sh
pkg=$(bash scripts/get_pkg_from_branch.sh "$PACKAGE")
aqua exec -- aqua-registry create-pr-new-pkg "$pkg"
FATA[0000] aqua failed env=darwin/arm64 error="open a file pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: open pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: no such file or directory" program=aqua-registry registry_tool_version=0.3.0-1
exit status 1
aqua.yaml should be not partial but complete configuration.
Please remove unneeded configuration to reproduce the issue.
# aqua.yaml
---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
checksum:
enabled: true
registries:
- name: standard
type: local
path: registry.yaml
packages:
- name: aquaproj/registry-tool@v0.3.0-1
- name: rhysd/actionlint@v1.7.1
- name: suzuki-shunsuke/cmdx@v1.7.4
- name: jqlang/jq@jq-1.7.1
- name: cli/cli@v2.50.0
Debug Output
Please set the environment variable AQUA_LOG_LEVEL=debug
and run aqua and tell us the debug output.
$ AQUA_LOG_LEVEL=debug cmdx new fujiwara/lamux
DEBU[0000] match the version_constraint aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=aquaproj/registry-tool package_semver=v0.3.0-1 package_version=v0.3.0-1 program=aqua registry_name=standard version_constraint="semver(\">= 0.1.6\")"
DEBU[0000] no version_constraint aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=rhysd/actionlint program=aqua registry_name=standard
DEBU[0000] match the version_constraint aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=suzuki-shunsuke/cmdx package_semver=v1.7.4 package_version=v1.7.4 program=aqua registry_name=standard version_constraint="semver(\">= 1.7.0\")"
DEBU[0000] installing the package aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=suzuki-shunsuke/cmdx package_version=v1.7.4 program=aqua registry=standard
DEBU[0000] check if the package is already installed aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=suzuki-shunsuke/cmdx package_version=v1.7.4 program=aqua registry=standard
DEBU[0000] check the permission aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx file_name=cmdx package_name=suzuki-shunsuke/cmdx package_version=v1.7.4 program=aqua registry=standard
DEBU[0000] check if exec file exists aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=suzuki-shunsuke/cmdx package_version=v1.7.4 program=aqua
DEBU[0000] execute the command aqua_version=2.28.0 env=darwin/arm64 exe_name=cmdx package_name=suzuki-shunsuke/cmdx package_version=v1.7.4 program=aqua
+ set -eu
bash scripts/check_diff_package.sh
pkg=$(bash scripts/get_pkg_from_branch.sh "$PACKAGE")
aqua exec -- aqua-registry create-pr-new-pkg "$pkg"
DEBU[0000] match the version_constraint aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry package_name=aquaproj/registry-tool package_semver=v0.3.0-1 package_version=v0.3.0-1 program=aqua registry_name=standard version_constraint="semver(\">= 0.1.6\")"
DEBU[0000] installing the package aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry package_name=aquaproj/registry-tool package_version=v0.3.0-1 program=aqua registry=standard
DEBU[0000] check if the package is already installed aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry package_name=aquaproj/registry-tool package_version=v0.3.0-1 program=aqua registry=standard
DEBU[0000] check the permission aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry file_name=aqua-registry package_name=aquaproj/registry-tool package_version=v0.3.0-1 program=aqua registry=standard
DEBU[0000] check if exec file exists aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry package_name=aquaproj/registry-tool package_version=v0.3.0-1 program=aqua
DEBU[0000] execute the command aqua_version=2.28.0 env=darwin/arm64 exe_name=aqua-registry package_name=aquaproj/registry-tool package_version=v0.3.0-1 program=aqua
FATA[0000] aqua failed env=darwin/arm64 error="open a file pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: open pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: no such file or directory" program=aqua-registry registry_tool_version=0.3.0-1
exit status 1
Expected Behaviour
Success in creating a PR
Actual Behaviour
FATA[0000] aqua failed env=darwin/arm64 error="open a file pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: open pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml: no such file or directory" program=aqua-registry registry_tool_version=0.3.0-1
Important Factoids
lamux\n
pkgs/fujiwara/lamux\nfujiwara/lamux/registry.yaml
Thank you for your report.
I'll take a look.
Could you try cmdx new
without any argument?
Same result.
$ cmdx new fujiwara/s3mover
+ set -eu
bash scripts/check_diff_package.sh
pkg=$(bash scripts/get_pkg_from_branch.sh "$PACKAGE")
aqua exec -- aqua-registry create-pr-new-pkg "$pkg"
FATA[0000] aqua failed env=darwin/arm64 error="open a file pkgs/fujiwara/s3mover\nfujiwara/s3mover/registry.yaml: open pkgs/fujiwara/s3mover\nfujiwara/s3mover/registry.yaml: no such file or directory" program=aqua-registry registry_tool_version=0.3.0-1
exit status 1
No.
Could you try cmdx new without any argument?
$ cmdx new
Then cmdx new
gets the package name from the current branch name.
Sorry, I had forgotten that there had been a change.
https://aquaproj.github.io/docs/products/aqua-registry/changelog/#2024-05-24
You can omit the argument pkg
cmdx new
gets the package name from the current branch name
You can omit the package name, but you can also specify the package name.
So this looks a bug.
I'll take a look.
I found a trivial bug.