rover icon indicating copy to clipboard operation
rover copied to clipboard

feat: Add markdown output for Check command

Open ptondereau opened this issue 2 years ago • 7 comments

Following idea of https://github.com/apollographql/rover/issues/843 I could add more data from the CheckResponse but I've just followed the bash script in the issue. I don't know how to handle check error state at this level for a Check command.

ptondereau avatar Aug 08 '22 13:08 ptondereau

Btw the CI is also red on main branch

ptondereau avatar Aug 09 '22 07:08 ptondereau

hey @ptondereau - thanks for taking a look at this issue. i think for now we may want to hold off on adding the markdown feature as it would require some special care and attention to implement this for all RoverOutput types (i.e. what happens when you run rover graph fetch --output markdown... and all of the other commands?) and this is something we haven't spent time designing.

as for CI being red on main - I think this is because we recently added some studio integration tests to our pipeline. i've merged this PR that should fix this problem by just skipping those integration tests for forked PRs (like this one). this should be OK since we will still run those tests before cutting a release.

EverlastingBugstopper avatar Aug 09 '22 18:08 EverlastingBugstopper

@EverlastingBugstopper thank you for your feedback! If you try to output markdown with another command it will abort with an error message that only Fetch command is supported. It could be a progressive support rather than supporting all in one feature. WDYT? Feel free to close this PR if it doesn’t match anyway with your roadmap

ptondereau avatar Aug 09 '22 19:08 ptondereau

oh wow ok! i think that makes sense actually. i'm going to cc @lrlna and @abernix here for their thoughts on this as well, but I think this is a really good plan. i'm going to go through and leave a few comments on some error messages but my hunch is we should be able to get this into the next release.

EverlastingBugstopper avatar Aug 10 '22 16:08 EverlastingBugstopper

thinking about this a bit more - i'd love if we could somehow move the error here up a bit earlier in the process. so - if they run with --output markdown on an unsupported command, it should error before even running the actual command (and this makes it so that we know if you pass --output markdown to another command, it would print a normal error saying it's not supported rather than an error formatted as markdown telling the user they can't output markdown from that command 😆)

EverlastingBugstopper avatar Aug 10 '22 20:08 EverlastingBugstopper

thinking about this a bit more - i'd love if we could somehow move the error here up a bit earlier in the process. so - if they run with --output markdown on an unsupported command, it should error before even running the actual command (and this makes it so that we know if you pass --output markdown to another command, it would print a normal error saying it's not supported rather than an error formatted as markdown telling the user they can't output markdown from that command 😆)

I totally agree but I need to find where to put this early check first.

ptondereau avatar Aug 10 '22 20:08 ptondereau

maybe here?

EverlastingBugstopper avatar Aug 10 '22 22:08 EverlastingBugstopper