Skip to content

Reconsider behaviour when providing a value lower than 500 for bucket size #394

@fernando-villalba

Description

@fernando-villalba

Issue

The current behaviour when passing a value lower than 500 for bucket size is to ask this question:

Warning: The minimum size to create an object store is 500 GB. Would you like to create an object store of 500 GB? (y/n) ?

There are some issues with this approach

  1. It doesn't respect the --yes flag:
% civo bucket create --yes --size 50 test-ticket 
Warning: The minimum size to create an object store is 500 GB. Would you like to create an object store of 500 GB? (y/n) ?
  1. It should perhaps fail without asking anything.

If this command was part of a script, it would halt execution, if it fails, it's better.

  1. The help of the command needs to make it explicit that the minimum is 500, default is not the same as minimum, it should perhaps say default/minimum
-s, --size int                  Size of the Object store (default 500)

Acceptance criteria

There are two ways to tackle this

  • Fail lower values with a message that the minimum is 500, also change the help to explicitly say that the minimum is 500 --> preferred
  • Respect the --yes flag, and also change the help to explicitly say the minimum is 500
  • Automatically ignore lower values and assign 500 GBs, provide a warning when doing so --> This may give users the illusion they are paying less than they will if they are not paying attention, so perhaps not the best course of action.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions