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

[BUG] Added a returncode for make all-pdf #556

Merged
merged 5 commits into from
May 13, 2020

Conversation

AakashGfude
Copy link
Contributor

@AakashGfude AakashGfude commented May 8, 2020

check for the return code and return the error code when mak all-pdf errors

fixes #551

This will make the build fail, when pdflatex build errors.

cc: @choldgraf @mmcky

@choldgraf , any other requirements from that issue?

@choldgraf
Copy link
Collaborator

Shouldn't the circle job be erroring?

@AakashGfude
Copy link
Contributor Author

AakashGfude commented May 8, 2020

@choldgraf yes, this is strange. The build itself looks like its failing, but the ci job is passing. weird

@@ -172,7 +172,7 @@ def build(path_book, path_output, config, toc, warningiserror, builder):
with cd(OUTPUT_PATH):
output = subprocess.run([makecmd, "all-pdf"])
if output.returncode != 0:
return output.returncode
exit(output.returncode)
Copy link
Contributor

@mmcky mmcky May 8, 2020

Choose a reason for hiding this comment

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

I think this should be return and we need to check if circle is acting on status codes. Does the return get returned by jupyter_book?

Copy link
Contributor Author

@AakashGfude AakashGfude May 8, 2020

Choose a reason for hiding this comment

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

Yes, it did get returned by jupyter_book in my local system. But, did not seem to work in circleci. I mean the build did stop in circleci but did not exit with an error code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just check the output code yourself in the python and raise an _error( depending on its value?

Copy link
Contributor Author

@AakashGfude AakashGfude May 8, 2020

Choose a reason for hiding this comment

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

ooh ok. so you are basically saying to use _error instead of exit ?

@AakashGfude
Copy link
Contributor Author

Will create an issue for the failing test in tests suite after this PR is ready to be merged.

@choldgraf
Copy link
Collaborator

just a note that my assumption is that all of these tests should pass except for the circleci pdf jobs

@AakashGfude
Copy link
Contributor Author

gotcha. I will ask @najuzilu, if she can help out with build clean test error.

@najuzilu
Copy link
Contributor

najuzilu commented May 11, 2020

Interesting... Looks like when the html folder is missing, --builder pdflatex throws an error.

@najuzilu
Copy link
Contributor

Scratch that; it's check=True which is causing this problem. Should be good to go once it's merged. :-)

@choldgraf
Copy link
Collaborator

oh - I just looked at the test and now I'm confused as to how @najuzilu's PDFlatex tests were ever passing in the first place haha.

I think the problem is that we are running a jb build --builder pdflatex command in our github actions test jobs, but we do not ever install latex in those jobs (only in the circleci job). Could somebody make the clean tests that expect PDF outputs not run on the github actions jobs?

@AakashGfude
Copy link
Contributor Author

AakashGfude commented May 13, 2020

Thanks a lot @najuzilu and @choldgraf . @choldgraf this looks ready to be merged now.

@choldgraf choldgraf merged commit 4eedd35 into jupyter-book:master May 13, 2020
@choldgraf
Copy link
Collaborator

nice! now we only need to fix the pdf builder 😆

@mmcky
Copy link
Contributor

mmcky commented May 13, 2020

nice! now we only need to fix the pdf builder 😆

@choldgraf I will look into the pdf builder tomorrow (Friday, Australian time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pdflatex tests are unreliable
4 participants