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

coffee: Does not take into account that the remote inside the directory already exists #122

Closed
vincenzopalazzo opened this issue May 2, 2023 · 4 comments
Assignees
Labels
💭 - brainstorming feature idea and related discussion 🐛 - bug Something isn't working ❤️ - SoB Summer of Bitcoin Project 🎯 - triage Need to triage meeting P-low Low priority issue
Milestone

Comments

@vincenzopalazzo
Copy link
Contributor

The PR #115 does not include the case where we try to remove the .coffee/storage.json file with a remote already added, leaving the repository directory in a dirty state.

Therefore, during the sanity check, we should verify if the list of repositories contains any repositories that exist as directories but do not exist inside the storage.

     Running `target/debug/coffee remote add folgore-git 'https://github.com/coffee-tools/folgore.git'`
[2023-05-02T13:09:21Z ERROR coffee_lib::errors] ERROR #1: '/home/vincent/.coffee/repositories/folgore-git' exists and is not an empty directory
✗ Fetch remote from https://github.com/coffee-tools/folgore.git error: Error while add remote: code: 1, msg: '/home/vincent/.coffee/repositories/folgore-git' exists and is not an empty directory
Error: CoffeeError { code: 1, msg: "'/home/vincent/.coffee/repositories/folgore-git' exists and is not an empty directory" }

@vincenzopalazzo vincenzopalazzo added 🐛 - bug Something isn't working 💭 - brainstorming feature idea and related discussion labels May 2, 2023
@tareknaser
Copy link
Collaborator

So we should modify the remote_sync function in #115 to also check for folders/files inside .repositories folder and if so, returns an error
right?

@vincenzopalazzo vincenzopalazzo added the 🎯 - triage Need to triage meeting label May 25, 2023
@vincenzopalazzo vincenzopalazzo added the ❤️ - SoB Summer of Bitcoin Project label Jul 30, 2023
@vincenzopalazzo
Copy link
Contributor Author

@tareknaser360 now we can start to think about this by looking inside the nurse recovery stategies

@vincenzopalazzo vincenzopalazzo added the P-low Low priority issue label Jul 30, 2023
@vincenzopalazzo vincenzopalazzo added this to the 0.1-rc1 milestone Feb 4, 2024
@tareknaser
Copy link
Collaborator

This issue seems outdated. Since then, we've made several changes:

  • We switched coffee's storage to NoSQL
  • Implemented coffee nurse using a strategy design

I think this issue is no longer relevant. Could you confirm, @vincenzopalazzo?

@vincenzopalazzo
Copy link
Contributor Author

I trust you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 - brainstorming feature idea and related discussion 🐛 - bug Something isn't working ❤️ - SoB Summer of Bitcoin Project 🎯 - triage Need to triage meeting P-low Low priority issue
Projects
None yet
Development

No branches or pull requests

2 participants