edgedb / edgedb-cli

The EdgeDB CLI
https://www.edgedb.com/docs/cli/index
Apache License 2.0
166 stars 23 forks source link

Add flag for logging out failed migration debug info #1193

Closed raddevon closed 6 months ago

raddevon commented 10 months ago

See this message's thread: https://edgedb.slack.com/archives/CNECHA9EW/p1703177303187659

In short, Sully believes the server now passes debug information to the client in the case of this error: EdgeDB could not resolve migration with the provided answers. Please retry with different answers. The CLI doesn't seem to have a way yet to log that out.

msullivan commented 8 months ago

The info is in the debug_diff field of the JSON returned by DESCRIBE CURRENT MIGRATION AS JSON.

Not sure what the flag should be called.

msullivan commented 8 months ago

One annoying thing about testing this issue is that since this is for debugging situations where an edgedb bug has been hit, you need to take advantage of an edgedb bug to fix it properly, and I try to fix edgedb bugs! (When I added debug_diff originally, I used https://github.com/edgedb/edgedb/issues/5714 to test it, but that's been fixed!)

Currently it could be tested by trying to migrate from:

module default {
type Foo {
  required title: str;
  required year: int64;
  index on ((.title, .year));
}
}

to

module default {
type Foo {
  required title: str;
  required year: int64;
  index on ((.year, .title));
}
}

That one will be fixed soon, but you can test against 4.5.

msullivan commented 6 months ago

Closed by @diksipav in #1262