fix(sphinxdocs): clean stale worker output dir and doctrees on first request#3933
Merged
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Collaborator
|
Ah, I think I understand now. I was confused because bazel clears output directories, but the doctree dir isn't the output directory. It's (ideally there'd be a way to restore the state, but i think clearing things after a restart makes sense. It already does that in another case if exit code 2 comes back from sphinx) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sphinx worker keeps doctrees outside declared outputs so that incremental
builds survive across invocations. A newly started worker has no digest history,
so it treats every input as changed and re-reads all docs. Re-reading against
the stale environment left by a previous worker can produce spurious warnings,
e.g. duplicate labels, which become build failures when
--fail-on-warningis enabled.
On the first request, delete the worker output directory and doctree directory
so the worker starts from a clean Sphinx environment.