Docs Builder creates SpellingError for Sphinx error unrelated to spelling issues
See original GitHub issueApache Airflow version: 2.0.0
Kubernetes version (if you are using kubernetes) (use kubectl version
): n/a
Environment:
- Cloud provider or hardware configuration: n/a
- OS (e.g. from /etc/os-release): n/a
- Kernel (e.g.
uname -a
): n/a - Install tools: n/a
- Others: n/a
What happened:
A sphinx warning unrelated to spelling issues running sphinx-build
resulted in an instance of SpellingError
to cause a docs build failure.
SpellingError(
file_path=None,
line_no=None,
spelling=None,
suggestion=None,
context_line=None,
message=(
f"Sphinx spellcheck returned non-zero exit status: {completed_proc.returncode}."
)
)
# sphinx.errors.SphinxWarning: /opt/airflow/docs/apache-airflow-providers-google/_api/drive/index.rst:document isn't included in any toctree
The actual issue was that I failed to include an __init__.py
file in a directory that I created.
What you expected to happen: I think an exception should be raised unrelated to a spelling error. Preferably one that would indicate that there’s a directory that’s missing an init file, but at least a generic error unrelated to spelling
How to reproduce it:
Create a new plugin directory (e.g. airflow/providers/google/suite/sensors
) and don’t include an __init__.py
file, and run ./breeze build-docs -- --docs-only -v
Anything else we need to know:
I’m specifically referring to lines 139 to 150 in docs/exts/docs_build/docs_builder.py
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
A quick fix might be just to reverse the order we build – and run docs first then spelling check second.
https://github.com/apache/airflow/blob/master/docs/build_docs.py#L142-L152
Yep, you’re right. Ok, I’ll update the spelling error message and reverse the build order – docs first then spelling.