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

Cachi2 CLI redesign #533

Open
brunoapimentel opened this issue May 2, 2024 · 1 comment
Open

Cachi2 CLI redesign #533

brunoapimentel opened this issue May 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@brunoapimentel
Copy link
Contributor

The current CLI in Cachi2 was largely a consequence of how things were done in the original Cachito web API. With more package managers being added, its limitations are starting to show. We should take some time to revisit the CLI design, change what is not working currently and make it more future-proof before we release Cachi2's first stable version.

Some topics that could be improved are:

  • JSON provides a terrible UX if the user is actually typing the commands in the terminal. We can provide a better input method for such cases, and we could keep JSON for more complex/automated scenarios.
  • Some gomod flags are currently global to the fetch-deps command, but should instead be handled at package-level.
  • The inject-deps command could benefit from allowing additional options. For example, in rpm PoC: Allow specifying DNF options via CLI input JSON  #522, the generated .repo files can be expanded with additional options, and this could be done in the inject-deps command instead of fetch-deps.
  • The package managers could have options that affect all of its input packages, insead of only one of them. For example, in rpm PoC: Allow specifying DNF options via CLI input JSON  #522, the options.dnf.repoid option affects the repofile for that specific repoid, and for this reason, is not bound to an specific input package.
  • The log output of the commands can be enhanced to be more easily readable by folks using Cachi2 in a local enviroment. We could have a very high level output showing only the overall workflow for each package manager being executed in a request, and only show actual detailed logs if a flag was turned on (which should be on by default in Konflux).

These are just some ideas from the top of my head, feel free to add more to this issue.

@brunoapimentel brunoapimentel added the enhancement New feature or request label May 2, 2024
@a-ovchinnikov
Copy link
Collaborator

fetch-deps and generate-env seem to frequently appear together. They could be made plumbing commands with a higher-level user-facing command uniting them.

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
None yet
Development

No branches or pull requests

2 participants