airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] tedmiston commented on issue #3703: [AIRFLOW-2857] Fix verify_gpl_dependency for Read the Docs
Date Mon, 06 Aug 2018 20:05:20 GMT
tedmiston commented on issue #3703: [AIRFLOW-2857] Fix verify_gpl_dependency for Read the Docs
URL: https://github.com/apache/incubator-airflow/pull/3703#issuecomment-410836135
 
 
   @ashb @kaxil Replying to all comments here since some are now hidden from lines changing
in my force push.
   
   I added a clarifying comment for the env var setting as requested.
   
   So the mock dependency surprised me too... I sorta conflated 2 issues here.  Here's what's
happening.
   
   1\. When building the docs site locally, if I do a fresh install and try to build without
`mock` in the `docs` extra.
   
   ```
   $ SLUGIFY_USES_TEXT_UNIDECODE=yes pip install -e .[doc]
   $ cd docs/
   $ ./build.sh
   sphinx-build -b html -d _build/doctrees   . _build/html
   Running Sphinx v1.7.6
   
   Configuration error:
   There is a programable error in your configuration file:
   
   Traceback (most recent call last):
     File "/Users/taylor/.local/share/virtualenvs/tmp-afb06f74a17a352/lib/python3.6/site-packages/sphinx/config.py",
line 161, in __init__
       execfile_(filename, config)
     File "/Users/taylor/.local/share/virtualenvs/tmp-afb06f74a17a352/lib/python3.6/site-packages/sphinx/util/pycompat.py",
line 150, in execfile_
       exec_(code, _globals)
     File "conf.py", line 16, in <module>
       import mock
   ModuleNotFoundError: No module named 'mock'
   
   make: *** [html] Error 2
   ```
   
   This happens because conf.py for Sphinx [imports mock on line 16](https://github.com/apache/incubator-airflow/blob/1b4961a0c5ebf5e314130a3fc97fb06fcb7c0c1a/docs/conf.py#L16)
which it uses to build `MOCK_MODULES`.  That appears to be [a Sphinx pattern for a build system
not having some module dependencies](http://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules),
which given the modules in that list, makes sense to me in a limited environment where I'm
not doing a big install with more extras.  Adding the mock change that's in this PR resolves
that issue.
   
   2\. The CI issue fix... so if I try to replicate the 4 extras that I believe RTD is installing
per .readthedocs.yml, with `mock` removed from the `docs` extra, then run the build script
which effectively runs `make html` which effectively runs `sphinx-build -b html . _build/html`,
I get the same error.
   
   ```
   $ READTHEDOCS=True pip install -e .[doc,docker,gcp_api,emr]
   $ cd docs/
   $ ./build.sh
   ...same error as above...
   ```
   
   This makes me think there might be something wonky with RTD.  Perhaps it's running a different
command than `make html`, or somehow is getting other extras installed that include mock (e.g.,
any of the extras that build on `devel` in setup.py).  As far as I can tell [from the RTD
docs](http://docs.readthedocs.io/en/latest/builds.html#understanding-what-s-going-on) they
are running the same command that errors out for me outside of their environment when I don't
supply the mock dependency.
   
   > When we build your documentation, we run sphinx-build -b html . _build/html, where
html would be replaced with the correct backend. 
   
   I'm all for getting to the bottom of the mock issue, but I also know that getting the docs
site updating again is probably more urgent.  If not having mock doesn't seem to affect RTD,
I'm happy to remove it here.
   
   **So the mock issue is really a completely separate issue from the GPL RTD issue.  Should
I separate it from this PR?  Or keep it here and add a comment?  What do you think?**
   
   P.S. I also fixed some trailing whitespace in .readthedocs.yml.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message