-
Notifications
You must be signed in to change notification settings - Fork 16.3k
[AIRFLOW-2857] Fix broken RTD env #3703
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
Conversation
|
/cc @kaxil |
Codecov Report
@@ Coverage Diff @@
## master #3703 +/- ##
=======================================
Coverage 77.56% 77.56%
=======================================
Files 204 204
Lines 15766 15766
=======================================
Hits 12229 12229
Misses 3537 3537Continue to review full report at Codecov.
|
setup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment saying why this is needed please?
setup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?? This is needed for docs? I would have though mock is just used in tests/, and i’m Surprised it’s needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. @tedmiston Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some digging and looks like we use it here:
https://github.com/apache/incubator-airflow/blob/acca61c602e341da06ebee2eca3a26f4e7400238/docs/conf.py#L16
This is used for mocking import of various modules:
https://github.com/apache/incubator-airflow/blob/master/docs/conf.py#L18-L31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fokko What Kaxil found is consistent with what I saw as well. There's a bit more info on it in (1) in my comment here #3703 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just learned something, thanks @tedmiston !
kaxil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this and it works without having to add mock for readthedocs. Are you sure we need this @tedmiston ?
|
@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 This happens because conf.py for Sphinx imports mock on line 16 which it uses to build 2. The CI issue fix... so if I try to replicate the 4 extras that I believe RTD is installing per .readthedocs.yml, with This makes me think there might be something wonky with RTD. Perhaps it's running a different command than
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. |
|
I saw a different pr(#3701). Will that one solve the same issue that this pr tries to address? @tedmiston @ashb @kaxil |
|
@feng-tao That PR makes a related change to the docker run command for local development, but doesn't cover the Read the Docs use case since RTD doesn't use those Docker commands. The main reason for the different workaround used here is that one cannot pass a custom env var into the RTD build environment as the Docker command does, so instead we set it based on an env var that they do provide. Here's the mailing list thread from Kaxil with a bit more context on this PR - https://lists.apache.org/thread.html/3b7867b900bee8bdf013e6932812faa3ea891849c2b2eba000f0b093@%3Cdev.airflow.apache.org%3E. |
|
Change the title of PR and Jira to "get RTD env working" or there abouts and I'm happy with the PR. |
|
Thanks @tedmiston for the fix and @ashb for the quick review. I have changed the title for the PR and Jira. |
|
Thank you for the swift replies all! Excited to get this merged! |
The Read the Docs build process was broken due to #3660. This PR fixes this. (cherry picked from commit 8af0aa9) Signed-off-by: Bolke de Bruin <[email protected]>
The Read the Docs build process was broken due to #3660. This PR fixes this. (cherry picked from commit 8af0aa9) Signed-off-by: Bolke de Bruin <[email protected]>
|
Hey all - It looks like our RTD build post-merge was successful. 😎 I dug into the mock dependency etc in the RTD build environment logs which led to creating a follow up Jira issue. If you have time to take a look and provide any comments there, it would be appreciated. |
The Read the Docs build process was broken due to apache#3660. This PR fixes this.
The Read the Docs build process was broken due to apache#3660. This PR fixes this.
Make sure you have checked all steps below.
Jira
Description
Per the mailing list thread "Readthedocs is Broken" on Aug 5, 2018, the Read the Docs build process is currently broken per the recent addition of #3660.
The RTD build environment provides a
READTHEDOCSenv var boolean which it sets to true. I have used that to toggle onSLUGIFY_USES_TEXT_UNIDECODEonly when that env var is supplied to restrict it to that environment.Related change: The mock module is used in conf.py is supplied to Sphinx to build the docs, but it was missing from the
docinstall extra in setup.py, so I've added that.Here's how I tested this:
Tests
A successful build on https://readthedocs.org/projects/airflow/builds/ will confirm that this is working in the Read the Docs environment.
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff