Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dgraph live import sometimes fails with exit code 0 #2465

Closed
cajus opened this issue Jun 29, 2018 · 0 comments
Closed

dgraph live import sometimes fails with exit code 0 #2465

cajus opened this issue Jun 29, 2018 · 0 comments
Labels
kind/bug Something is broken.

Comments

@cajus
Copy link

cajus commented Jun 29, 2018

  • 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

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().

@shaneakr shaneakr added the kind/bug Something is broken. label Jun 29, 2018
srfrog added a commit that referenced this issue Sep 28, 2018
* exit 1 when process schema file fails and it's not cancelled.

* use exit != 0 for errors with processing RDF files.

Closes #2465
dna2github pushed a commit to dna2fork/dgraph that referenced this issue Jul 19, 2019
…-io#2596)

* exit 1 when process schema file fails and it's not cancelled.

* use exit != 0 for errors with processing RDF files.

Closes dgraph-io#2465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

2 participants