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

Environment deletion fails with FF CLI built from main #295

Open
peterbroadhurst opened this issue Mar 11, 2024 · 5 comments
Open

Environment deletion fails with FF CLI built from main #295

peterbroadhurst opened this issue Mar 11, 2024 · 5 comments

Comments

@peterbroadhurst
Copy link
Contributor

This is a bit challenging in a migration scenario, as I would expect the normal flow is:

  • Install new ff
  • Find you need to delete your old dev env
  • Run ff rm (currently fails)
  • Re-run ff init
./ff/ff rm -f dev                    
deleting FireFly stack 'dev'... Error: Error: No such volume: dev_geth

Usage:
  ff remove <stack_name> [flags]

Aliases:
  remove, rm

Flags:
  -f, --force   Remove the stack without prompting for confirmation
  -h, --help    help for remove

Global Flags:
      --ansi string   control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
  -v, --verbose       verbose log output

@peterbroadhurst
Copy link
Contributor Author

Hmmmn, well I also can't create a new environment I just created...

@peterbroadhurst
Copy link
Contributor Author

➜  firefly-cli git:(main) ./ff/ff init --multiparty=false gw2 1
initializing new FireFly stack...
Stack 'gw2' created!
To start your new stack run:

ff start gw2

Your docker compose file for this stack can be found at: /Users/pbroadhurst/.firefly/stacks/gw2/docker-compose.yml

➜  firefly-cli git:(main) ./ff/ff rm gw2                       
WARNING: This will completely remove your stack and all of its data. Are you sure this is what you want to do?
completely delete FireFly stack 'gw2' [y/N] y
deleting FireFly stack 'gw2'... Error: Error: No such volume: gw2_geth

Usage:
  ff remove <stack_name> [flags]

Aliases:
  remove, rm

Flags:
  -f, --force   Remove the stack without prompting for confirmation
  -h, --help    help for remove

Global Flags:
      --ansi string   control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
  -v, --verbose       verbose log output

Error: Error: No such volume: gw2_geth

@peterbroadhurst peterbroadhurst changed the title Deletion of a pre-v1.3 environment fails Environment deletion fails with FF CLI built from main Mar 11, 2024
@peterbroadhurst
Copy link
Contributor Author

peterbroadhurst commented Mar 11, 2024

Ok - with a bit more testing, I think the scope of the issue is:

  • v1.2 environments
  • v1.3 environments that haven't been started (init run, but not start)

@nguyer
Copy link
Contributor

nguyer commented Mar 11, 2024

Thanks for opening this! I think I have seen this issue as well. I thought I fixed it, but maybe it was a similar but slightly different issue.

For background we used to swallow a lot of errors, and when we added the linter it wasn't a big fan of that. Making the linter happy ended up with some errors that still should have been swallowed (or at least logged) getting returned all the way up. This was one of those. Should be an easy fix. I'll open a PR for it.

@nguyer
Copy link
Contributor

nguyer commented Mar 11, 2024

@peterbroadhurst Are you sure you are running the latest code in main? I think this existing check should allow this condition to not return the error:

if !strings.Contains(err.Error(), "no such volume") {
return err
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants