-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[Core] Pass logs through if sphinx-doctest is running #36306
[Core] Pass logs through if sphinx-doctest is running #36306
Conversation
1329fc9
to
ee94513
Compare
ee94513
to
e1ad54d
Compare
For completeness, I've added an image of the output from building the docs with this branch: And here's for the current And here's for the current @maxpumperla So I think this shows the issue is fixed. Is there anything else that needs to be done to merge this? |
@peytondmurray looks good from the docs side of things, but can't judge the impact of this on the rest of Ray. I trust you ensure the failing 17 CI tests are unrelated. |
@maxpumperla It's hard to say, the flaky test tracker shows a lot of broken test suites in the past and recently. I don't have much confidence in the CI: I'll try rebasing on @rkooo567 I'd appreciate a second look at this. |
e1ad54d
to
97f4be2
Compare
@rkooo567 Still waiting on review here. I'll try rebasing again to see if the bazel issues have been sorted out on |
97f4be2
to
91d47af
Compare
91d47af
to
02a007f
Compare
Can you add a test case from #37711? |
Done; tested that it fails on |
Is it expected the readthedocs build fails? |
I'm not sure, where can I check the build log for that? I don't see it in the list of failures: |
This is the failure I was referring to: https://readthedocs.com/projects/anyscale-ray/builds/1618200/ Seems this happens on readthedocs. cc @maxpumperla any ideas? |
From the log:
There are two sets of warnings, sphinx's output doesn't tell you which are really responsible for the message above. During the reading phase:
And during the writing phase:
I'm guessing it's the two in the writing phase that have undefined labels that are the offending warnings, though again, sphinx is unclear here. It seems like the build completes successfully, but still returns a nonzero exit code if there are any warnings. Seems like the docs for |
Looks like recent PRs merged to the master don't have |
2af6a1e
to
8f5aa73
Compare
Gotcha - waiting for @rkooo567 's review. |
The read the docs on the master, however, seems to be passing https://readthedocs.org/projects/ray/builds/ ? |
I'm not sure about this - maybe @rkooo567 or @maxpumperla can comment. I didn't make any changes to the documentation here, so the fact that there are undefined references in the RTD build is weird, though the RTD build system seems to be doing some stuff I didn't expect: There a bunch of extra |
Okay, after a little investigation it seems like I'm not really able to replicate the RTD build environment based on the log output I see here. I tried creating a python 3.9.17 virtualenv, then doing pip install -U pip setuptools
pip install --upgrade --no-cache-dir pillow mock==1.0.1 'alabaster>=0.7,<0.8,!=0.7.5' commonmark==0.9.1 recommonmark==0.5.0 sphinx sphinx-rtd-theme 'readthedocs-sphinx-ext<2.3'
pip install --exists-action=w --no-cache-dir -r doc/requirements-doc.txt to install dependencies. The following command fails: python -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html because we aren't in In any case, going back to
So instead we need to go to python -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html once more will start the doc build. Here's the result (image because it's easier): 6 warnings instead of 2! I'm going to try
|
Reporting back about (1) ☝️ above: I ran Not really sure why, here - it's the same build environment. I guess the |
@peytondmurray now that we have an rtd yaml https://github.com/ray-project/ray/blob/master/.readthedocs.yaml, can't we control the build command to do what we want? |
if not skip_reset: | ||
log.generate_logging_config() | ||
|
||
log.generate_logging_config() |
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.
Thanks for all the detailed investigation!
I have a question with this change: wo we will always generate logging config - which we were not? Is this change causing the build to fail?
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.
Yes, we will always generate logging config, which is what we want. The original problem we were addressing here is that the sphinx build loggers get disabled if you don't have 'disable_existing_loggers': False
in the call to dictConfig
to set up the loggers. I don't think that's the issue here.
RTD's fail-on-warning was only enabled last week; I think that's relevant here.
@maxpumperla @rickyyx Any idea how the RTD build environment is set up? Looking at the One other thing I noticed: the makefile generated by After doing |
Okay, after some more reading it looks like this is related to a recent change in As to why this is only showing up now: I still don't know how the RTD build environment is constructed, so I suspect that whatever environment was being used on The fix for this is to enable |
Not really sure if the other stuff should be failing, but there's a lot of red on https://flaky-tests.ray.io/. From what I can see the failures unrelated. RTD now works. |
Really great investigation @peytondmurray! Great catch and thanks for digging into this. Can you merge with master (which is in a better shape now I believe). |
Signed-off-by: pdmurray <[email protected]>
Signed-off-by: pdmurray <[email protected]>
Signed-off-by: pdmurray <[email protected]>
88c7d2a
to
af46956
Compare
Thanks again @peytondmurray for the great work on iterating this PR - the comments and investigation was amazing. Merging since failed tests are flaky in master |
) --------- Signed-off-by: pdmurray <[email protected]>
--------- Signed-off-by: pdmurray <[email protected]> Co-authored-by: Peyton Murray <[email protected]>
) --------- Signed-off-by: pdmurray <[email protected]> Signed-off-by: NripeshN <[email protected]>
) --------- Signed-off-by: pdmurray <[email protected]> Signed-off-by: e428265 <[email protected]>
) --------- Signed-off-by: pdmurray <[email protected]> Signed-off-by: Victor <[email protected]>
Why are these changes needed?
logging.dictConfig
disables all currently-registered loggers unless you tell it not to. This had the effect of suppressing allsphinx
log messages.logging.dictConfig
has an option to not do this using thedisable_existing_loggers
option, which I've configured to avoid this going forward.Related issue number
Closes #37711.
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.