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

Enhancements for the Upgrade Command #187

Open
2 of 7 tasks
tareknaser opened this issue Jul 30, 2023 · 11 comments
Open
2 of 7 tasks

Enhancements for the Upgrade Command #187

tareknaser opened this issue Jul 30, 2023 · 11 comments
Assignees
Labels
❤️ - SoB Summer of Bitcoin Project enhancement New feature or request P-medium Medium priority

Comments

@tareknaser
Copy link
Collaborator

tareknaser commented Jul 30, 2023

Currently, the upgrade command provides a way to upgrade an entire repository. However, there are several improvements that can be made to enhance the functionality and flexibility of the command. This is a tracking issue of the proposed enhancements:

  • Upgrade a Repository: coffee upgrade <repo_name>
  • Specify Branch for Upgrading a Repository: coffee upgrade <repo_name> --branch <branch_name>
  • Upgrade All Repositories: coffee upgrade --all
  • Upgrade a Single Plugin: coffee upgrade --plugin <plugin_name>
  • Specify Branch for Upgrading a Plugin : coffee upgrade --plugin <plugin_name> --branch <branch_name>
  • Upgrade All Plugins: coffee upgrade --plugin --all
  • Verbose Flag. coffee upgrade ... --verbose (for all variants)
@tareknaser tareknaser added enhancement New feature or request ❤️ - SoB Summer of Bitcoin Project labels Jul 30, 2023
@tareknaser tareknaser self-assigned this Jul 30, 2023
@vincenzopalazzo vincenzopalazzo added the P-medium Medium priority label Jul 30, 2023
@tareknaser
Copy link
Collaborator Author

I am now thinking that coffee upgrade <repo_name> --branch <branch_name> will be a bit confusing for the user because all other upgrade functions expect the user to pass the name of the plugin not the name of the repository.

But it also doesn't make sense to have coffee upgrade <plugin_name> --branch <branch_name> because the branch is specific to the repository not the plugin. One repository can and probably has multiple plugins.

@vincenzopalazzo
Copy link
Contributor

This is a good point we should think about it

@vincenzopalazzo
Copy link
Contributor

Ok there are two case here;

  • Upgrade all the repository coffee upgrade <repo_name> --branch <branch_name>
  • Upgrade only a plugin coffee upgrade --plugin <plugin_name> --branch <branch_name>: this is the complex case and it is better avoid this because we do not know if the logic works.

We should start with a simple solution and then iterate over it

@tareknaser
Copy link
Collaborator Author

We should start with a simple solution and then iterate over it

agreed. I will start with coffee upgrade <repo_name> --branch <branch_name>
Could you take a look at the updated issue description and confirm that this is what we want on the long term?

@vincenzopalazzo
Copy link
Contributor

YEah looks good, the last points looks a little bit strange to me, but I think when we start to solve the problem it will be more clear, so all good for now

@tareknaser
Copy link
Collaborator Author

I think it makes sense for coffee upgrade to only work on repositories, not plugins. Adding a command like coffee upgrade --plugin <plugin_name> would complicate the code because it would create discrepancies between the remote git HEAD and the plugin's git HEAD.

it's best to stick with supporting repositories containing only one plugin.
cc @vincenzopalazzo

@vincenzopalazzo
Copy link
Contributor

vincenzopalazzo commented Feb 12, 2024

I think it makes sense for coffee upgrade to only work on repositories, not plugins.

A repository can be a plugin, e.g: folgore

command like coffee upgrade --plugin <plugin_name> would complicate the code because it would create discrepancies between the remote git HEAD and the plugin's git HEAD.

Nothing is impossible with code and with a good tool like git, e.g:

  • upgrade the repository to a commit X for plugin
  • copy the plugin in the plugin directory
  • restore the previous commit in the repository

There is no discrepancy, it is just a matter of git checkout <hash>

cc @tareknaser

@tareknaser
Copy link
Collaborator Author

We can also change coffee upgrade <repository_name> to coffee upgrade --repo <repository_name> to avoid confusion when we add coffee upgrade --plugin <plugin_name>.

what do you think?

@vincenzopalazzo
Copy link
Contributor

idk I am still confusing about the upgrade command I should think more about it, maybe while using it

@daywalker90
Copy link
Collaborator

i think upgrade currently does not re-parse the manifest file. I think it should!

@vincenzopalazzo
Copy link
Contributor

i think upgrade currently does not re-parse the manifest file. I think it should!

It should I agree good catch, opening an issue now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❤️ - SoB Summer of Bitcoin Project enhancement New feature or request P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

3 participants