ProjectPythia/pythia-foundations

⚠️ Nightly build failed ⚠️

Closed this issue · 9 comments

@andersy005 it looks like this might have been a false alarm? I don't see any actual build failures anywhere.

Yeah. The build looks like it didn't fail. I'd suggest we change the title of the issue and see if we can trace down why the issue got created.

@andersy005 it looks like this might have been a false alarm? I don't see any actual build failures anywhere.

This appears to be an actual failure. The UI doesn't show any errors due to the continue-on-error conditions:

- name: Build the book
continue-on-error: true
id: build

Screen Shot 2021-11-11 at 9 09 38 AM

However, if you expand the individual steps, you will notice that the build the book step failed with the following traceback:

Exception occurred:
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/pydata_sphinx_theme/bootstrap_html_translator.py", line 34, in visit_table
    self._table_row_index = 0
AttributeError: can't set attribute
The full traceback has been saved in /tmp/sphinx-err-vswd_iqb.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <sphinx-doc/sphinx/issues>. Thanks!
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/jupyter_book/sphinx.py", line 167, in build_sphinx
    app.build(force_all, filenames)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/application.py", line 344, in build
    self.builder.build_update()
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 294, in build_update
    self.build(to_build,
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 358, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 532, in write
    self._write_serial(sorted(docnames))
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 542, in _write_serial
    self.write_doc(docname, doctree)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 626, in write_doc
    self.docwriter.write(doctree, destination)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/docutils/writers/__init__.py", line 78, in write
    self.translate()
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/writers/html.py", line 71, in translate
    self.document.walkabout(visitor)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/docutils/nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/docutils/nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/docutils/nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/docutils/nodes.py", line 206, in walkabout
    visitor.dispatch_visit(self)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/sphinx/util/docutils.py", line 477, in dispatch_visit
    method(node)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/pydata_sphinx_theme/bootstrap_html_translator.py", line 34, in visit_table
    self._table_row_index = 0
AttributeError: can't set attribute

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/share/miniconda/envs/pythia-book-dev/bin/jupyter-book", line 10, in <module>
    sys.exit(main())
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/jupyter_book/cli/main.py", line 319, in build
    builder_specific_actions(
  File "/usr/share/miniconda/envs/pythia-book-dev/lib/python3.8/site-packages/jupyter_book/cli/main.py", line 519, in builder_specific_actions
    raise RuntimeError(_message_box(msg, color="red", doprint=False)) from result
RuntimeError: 
===============================================================================

There was an error in building your book. Look above for the cause.

===============================================================================

see if we can trace down why the issue got created.

The workflow checks to see what the outcomes for the conda environment creation and the the build the book steps were. Whenever either one results in a failure, an issue is created:

- name: Report status
if: steps.build.outcome != 'success' || steps.conda.outcome != 'success'
uses: actions/github-script@v5

Ok! So there is a failure. Looks like it was triggered by something in pydata-sphinx-theme.
A little sleuthing shows that there was a new release of that package yesterday, so that's the likely culprit:
https://github.com/pydata/pydata-sphinx-theme/releases

Why is "Build the book" set to continue_on_error: true (I really hate GitHub's implementation of it since it hides errors)? It'd be better to make the report condition on if: always() && (steps.build.outcome != 'success' || steps.conda.outcome != 'success').

ktyle commented

I think the issue here is that when the environment gets created, a version of sphinx (now 4.3.0) is installed that is incompatible with the most recent conda-forge version of jupyter-book (0.12.0). Pinning sphinx to 3.5.4 in environment.yml allows the book build to complete (at least in my local environment).

ktyle commented

reading executablebooks/sphinx-book-theme#423 closer, it's definitely sphinx 4.3.0 specific (4.2.0 works). Looks like once sphinx-book-theme-0.1.7 appears on conda-forge (which pydata-sphinx-theme 0.7.2 requires) things will get sorted out.