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

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

Merged
merged 4 commits into from
Sep 28, 2018

Conversation

srfrog
Copy link
Contributor

@srfrog srfrog commented Sep 14, 2018

Closes #2465


This change is Reviewable

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @srfrog and @manishrjain)


dgraph/cmd/live/run.go, line 350 at r1 (raw file):

				log.Println("Interrupted while processing schema file")
			} else {
				x.Checkf(err, "Error while processing schema file")

Schema file is one thing, but it could also fail trying to insert the RDF as the Github issue mentions. That still won't return a non-zero exit code.

@srfrog srfrog force-pushed the feature/isssue-2465_dgraph_live_import_fails_exit_0 branch from a2ea000 to 83584a7 Compare September 15, 2018 00:00
Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @srfrog)


dgraph/cmd/live/run.go, line 350 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Schema file is one thing, but it could also fail trying to insert the RDF as the Github issue mentions. That still won't return a non-zero exit code.

this new change will allow the defers to close while exiting with code != 0

Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


dgraph/cmd/live/run.go, line 350 at r1 (raw file):

Previously, srfrog (Gus) wrote…

this new change will allow the defers to close while exiting with code != 0

Done.

Copy link
Contributor Author

@srfrog srfrog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @manishrjain)


dgraph/cmd/live/run.go, line 382 at r3 (raw file):

		if err := <-errCh; err != nil {
			log.Printf("Error while processing file %q: %s\n", err)
			return err

exit != 0 for RDF processing errors

@srfrog srfrog merged commit a17da0d into master Sep 28, 2018
@srfrog srfrog deleted the feature/isssue-2465_dgraph_live_import_fails_exit_0 branch September 28, 2018 02:58
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request 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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants