graphql-platform
graphql-platform copied to clipboard
Write errors from HotChocolate.Fusion.CommandLine to stderr instead of stdout
Product
Hot Chocolate
Is your feature request related to a problem?
Detecting errors in CI/CD is a little bit difficult, because both successful and unsuccessful commands write to standard out but do not write to standard error.
The solution you'd like
I would prefer if the fusion command line tool would write errors to standard error instead of standard out.
We've encountered a similar issue with HotChocolate.AspNetCore.CommandLine
when running the schema export
command in GitHub Actions.
The CI pipeline continues running despite the unhandled exception stack trace being written to stdout. I believe the reason for this is actually because the command is returning a zero exit code despite having failed, instead of a non-zero exit code to indicate a failure. But I also agree that using stderr for error messages would be a useful enhancement.
Good point. I only mentioned stderr because we are using Azure DevOps and that has a failOnStderr option.
+1 for this and a bit of extra emphasis on changing the exit code from zero to non-zero on error. Not all environments have a failOnStdErr option.
FYI I fixed the exit codes issue in #6911.
+1 to this. We are currently considering adopting Fusion for a distributed graph solution. However, we can't generate schema files for our existing services, even when everything's updated to the latest HotChocolate prerelease version. Not having error output means we can't investigate the issue, and it seems risky to bet on this for anything business critical.
@dkAnBlWo shall we setup a call to see what the issue is you guys are having? Send us an email to: contact at chillicream.com
Closing the issue as we fixed the stderr.
@tobias-tengler can this be closed?