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

Reinserting an existing package in the aqua.yaml should update not duplicate itself #1903

Open
sheldonhull opened this issue Apr 24, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@sheldonhull
Copy link

I've noticed that when running aqua generate -i and selecting a new version of an app that happens to already exist, it shows up twice.

Maybe this is the intended behavior, but I've never had the need for this, so thought I'd mention it in case not intended.

For example, updating Go to the new version would result in two go runtimes.
If the aqua config is long enough it might be that I forget it was in there, or I used the selection to find the latest version supposed by the updated registry version.
As a result, I end up having to manually cleanup duplicate entries.

Since the existing entries might also have tags added to help with minimizing install requirements during CI, this can cause an error in my setup if I'm not careful.

Minor issue, but maybe it's useful to you as a user experience issue. 👍

@suzuki-shunsuke
Copy link
Member

Thank you for your suggestion.
Current behaviour is intended, but not desirable.

I think there are two options.

  1. Update the existing package
  2. Suggest the update command or option and exit with non zero

The issue is that aqua doesn't support updating packages.

1. Update the existing package

e.g.

$ aqua g -i suzuki-shunsuke/github-comment
WARN[0000] same package already exists so it's updated                   aqua_version=2.3.6 env=darwin/arm64 package_name=suzuki-shunsuke/github-comment previous_package_version=v5.0.0 package_version=v6.0.0 package_registry=standard program=aqua

2. Suggest the update command or option and exit with non zero

e.g.

$ aqua g -i suzuki-shunsuke/github-comment
ERR[0000] same package already exists                   aqua_version=2.3.6 env=darwin/arm64 package_name=suzuki-shunsuke/github-comment previous_package_version=v5.0.0 package_version=v6.0.0 package_registry=standard program=aqua doc=https://aquaproj.github.io/docs/reference/codes/005/

$ echo $?
1

$ aqua update suzuki-shunsuke/github-comment # Not supported yet

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Apr 26, 2023
@sheldonhull
Copy link
Author

I'd be fine with error it already exists if generate is used.
I do think the update command is needed for usability for those not comfortable with renovate, but that's a perspective I understand you might not share. Some I am comfortable with it and have a script to bump registry version when desired I'm not saying it's urgent though it would improve the usability.

In the meantime maybe I'll brag the light docker renovate invocation and contribute it to the docs so folks could just run that to run mass updates to the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants