geldata / geldata/gel-cli

better errors in `edgedb instance create`

Open
#965 8 comments 0 reactions 0 assignees View on GitHub
cloud
Dominant language
Rust
Stars
175
Forks
32
PR merge metrics
No merged PRs in 30d

Description

cc @raddevon @fantix @tailhook @elprans

A few issues:

1. Currently, the message says:

CleanShot 2023-03-06 at 10 39 42@2x

I suggest the following wording:

> Waiting for the `1st1/test` instance to be created. This operation may take a few minutes.

---

2. When ^C is hit we currently show:

CleanShot 2023-03-06 at 10 40 44@2x

We should do better than that; showing a warning log entry is no good. But even the log entry should read:

> Exiting due to a keyboard interrupt (Ctrl+C)

But we should print a message, clarifying that we've only stopped waiting to hear back from the cloud:

> Error: aborting the wait due to Ctrl+C. The `1st1/test` instance is still pending to be created.

---

3. When removing an instance we show the following error:

CleanShot 2023-03-06 at 10 44 56@2x

We should interpret the HTTP status code and report back:

> Error: no instance named `1st1/test` found.

4. Creating an instance with an already used name:

CleanShot 2023-03-06 at 10 42 56@2x

Again, need to do a better job with error reporting. The tool should say

> Error: an instance named `1st1/test` already exists.

---

5. The above screenshot also shows what happens when you need to confirm instance deletion and type anything but "yes". The tool just craps out with `edgedb error: Canceled`. We should instead say:

> Cancelling deletion of `1st1/test`. The operation was not confirmed with a "yes".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.