readthedocs / readthedocs.org

The source code that powers readthedocs.org
https://readthedocs.org/
MIT License
8.03k stars 3.58k forks source link

Mkdocs YAML parsing doesn't fail build #2570

Closed lol768 closed 7 years ago

lol768 commented 7 years ago

There is a step in the mkdocs backend that will cause the build to stick in a failed state. If YAML parsing fails, this exception is not bubbled up to be displayed to end users. It should be.

Details

Expected Result

Build should fail

Actual Result

Build still appears to be "running" after 26 hours.

agjohnson commented 7 years ago

Think we covered this in IRC. The issue is that YAML parsing failed and didn't update the build object as failed. I'll update this issue to reflect the underlying issue.

lol768 commented 7 years ago

Ah, interesting! Apologises for the somewhat vague original report - didn't realise this was what was going wrong.

lukegb commented 7 years ago

This should be fixed by #2573, which makes failures of this sort look like image

which is confusing, but at least isn't just the build appearing to hang.

lol768 commented 7 years ago

Thanks @lukegb!

humitos commented 7 years ago

I can confirm that this is working as expected and #2573 fixes this issue

I was able to reproduce the error on my local instance:

[17/Feb/2017 19:26:53] ERROR [readthedocs.doc_builder.environments:306] (Build) [kittehircclientlib:issue2570] Your mkdocs.yml could not be loaded, possibly due to a syntax error (line 10, column 5)
Traceback (most recent call last):
  File "/home/humitos/readthedocs/readthedocs.org/readthedocs/projects/tasks.py", line 176, in run
    outcomes = self.build_docs()
  File "/home/humitos/readthedocs/readthedocs.org/readthedocs/projects/tasks.py", line 337, in build_docs
    outcomes['html'] = self.build_docs_html()
  File "/home/humitos/readthedocs/readthedocs.org/readthedocs/projects/tasks.py", line 354, in build_docs_html
    html_builder.append_conf()
  File "/home/humitos/readthedocs/readthedocs.org/readthedocs/doc_builder/backends/mkdocs.py", line 54, in append_conf
    note,))
BuildEnvironmentError: Your mkdocs.yml could not be loaded, possibly due to a syntax error (line 10, column 5)

In the builds page I see:

captura de pantalla_2017-02-17_20-28-15

So, I think we can close this issue.

ericholscher commented 7 years ago

Thanks @humitos :+1: