You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce the issue (command/config used to run Dgraph).
I've a kubernetes job set up for deploying a basic data structure into Dgraph. When the import fails (i.e. there's a typo in the initial RDF file), the job does not fail, because the exit code of dgraph live -r <> -s <> -d <> -z <> is zero.
Expected behaviour and actual result.
If a problem occurs during import, an exitcode != 0 should be emitted to allow callers to be sure that everything worked as expected.
is one reason, because it doesn't trigger an error. It just returns to make the defer calls work. I thought about making a PR for that, but I'm not sure which of the three strategies for exiting is preferred. Sometimes there's just a direct os.Exit(), sometimes an indirect using log.Fatal() and sometimes another indirect using x.Checkf() which also results in a log.Fatal().
The text was updated successfully, but these errors were encountered:
What version of Dgraph are you using?
1.0.6
Steps to reproduce the issue (command/config used to run Dgraph).
I've a kubernetes job set up for deploying a basic data structure into Dgraph. When the import fails (i.e. there's a typo in the initial RDF file), the job does not fail, because the exit code of
dgraph live -r <> -s <> -d <> -z <>
is zero.Expected behaviour and actual result.
If a problem occurs during import, an exitcode != 0 should be emitted to allow callers to be sure that everything worked as expected.
Looks like
dgraph/dgraph/cmd/live/run.go
Line 352 in 3b5bc66
is one reason, because it doesn't trigger an error. It just returns to make the defer calls work. I thought about making a PR for that, but I'm not sure which of the three strategies for exiting is preferred. Sometimes there's just a direct
os.Exit()
, sometimes an indirect usinglog.Fatal()
and sometimes another indirect usingx.Checkf()
which also results in alog.Fatal()
.The text was updated successfully, but these errors were encountered: