-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@mli @anirudhacharya @lupesko @marcoabreu @larroy @sergeykolychev @lebeg - Please review. Not sure if this is the best time to do this, but we've shored up the current bugs in the docs, so if this goes through we can keep the Python API docs/website from breaking. |
This is time sensitive. As it ages, we'll have another round of cleaning up bugs that are introduced to get a clean start. |
@@ -117,6 +120,8 @@ function checkout () { | |||
git checkout "$repo_folder" || git branch $repo_folder "upstream/$repo_folder" && git checkout "$repo_folder" || exit 1 | |||
if [ $tag == 'master' ]; then | |||
git pull | |||
# master gets warnings as errors for Sphinx builds |
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.
Shouldn't we enable this in general? Otherwise a release branch might run into problems.
Also, is this script executed as part of the pr pipeline? We want to fail PRs ideally
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 added the -W
option to the new docs pipeline. This should force it to happen any time that runs. And the website build flow will still skip it for old versions. I'm not totally familiar with new pipelines, so please let me know if you think this is going to be an issue or not.
At what stage in the CI is this check performed? Can you please point to the logs where we can check and confirm? |
I just added it to the website pipeline in the I see that the website validation job has a child 1.4.x job in addition to master. I imagine that will break if it also runs the |
388cb7f
to
4d94733
Compare
It failed on the website pipeline. So, yay? |
4d94733
to
d3175df
Compare
Well that was a bit baffling... I rebased and the bug fixes were gone. Looks like this commit for 1.4.x reverted at least one of the changes in master, including the docs bug fixes. I think that commit should be reverted/fixed as that was probably not the intention. @srochel - please take a look. |
@aaronmarkham I have submitted a PR to revert #13478 and am waiting for the CI finishing. |
After patching the docs errors that came in from another PR, this PR passed fine. I'll keep this open for a bit and rebase and catch some bugs, refer them back to their authors to help ease this in. Then around the 15th, we can go for merge? Sound good? In the meantime, everyone doing docs/website updates, please use |
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 like the idea to fail CI if the docs break, so I support this PR but I'm not very familiar with the doc generation or the problems that were fixed, so probably best to have somebody else's opinion.
I didn't understand the story about let's not fail CI. CI is there to fail if something is broken. If you want to add a local test before sending to CI I suggest to add it to the dev_menu.py. Adding more commands / instructions and manual steps is something we should avoid since everything is complex enough and we should lower barrier to entry and contributions.
LGTM
@larroy: |
7ea9038
to
44eb7ee
Compare
4e38be4
to
985c837
Compare
* turn on warnings as errors * move warnings as error logic to build_all_version * fix typo in comment * add warning as error option for docs pipeline * bump ci to test again; use this chance to add notes on this feature * fix bugs in image.py docs
Description
This PR updates the website build trigger sphinx-build with the
-W
switch. This turns on the "warnings as errors" feature in Sphinx.edit: This needs to be considered carefully as it may impact several people as they get used to the change. Also, the website build process exempts the old versions as they are still error-riddled.
Are there any other exemptions needed before proceeding with this PR?
What This Means
Once merged, anyone that submits a PR that breaks the docs - particularly the Python docs - their PR will fail CI.
If you create a C operator that has docs strings that bubble up into the Python docs and break there, your PR will fail CI.
Testing Your Code Prior to a PR
But let's not fail in CI all of the time. You can test it out first.
docs/settings.ini
. Most of the time you just need to update the[document_sets_default]
section. I tend to turn everything off for faster cycles on testing the build, then turn everything back on for a final test if my change messed with something that might trigger a Doxygen issue (C or C++ change) or Scala/Java docs issue (.scala or .java change).make html USE_OPENMP=1 SPHINXOPTS=-W
from the docs folder. (ormake docs
with the same parameters from mxnet root)If it fails, read the error and fix it. Once you get a successful build, you're ready to submit your PR.
For documentation help, check out the documentation guide.
For details on building the website, check out how to build the website
Testing & CI Deployment
I tested this with
./build_all_version.sh "v1.4.x;master" "1.4.0;master"
. The script will run the older version branch (that still has docs errors in it) and then runs master. Since the script only enables-W
for master, it will show the warnings, but not stop the build when building thev1.4.x
branch. When it eventually works onmaster
, the-W
flag is enabled, and if there are any Sphinx warnings it stops the build with an error.Currently the Jenkins job for the website deployment builds master first. I could switch that to last, but actually, I think it is better that the job fails quickly if it is going to fail.
If you have questions, please ask!