-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix caching issue that led to incorrect all-options.rst being merged on main #10320
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
The top of the file says it is auto-generated, so I thought it would get updated as part of the release process. I didn't encounter any pre-commit failures locally when preparing that PR, so maybe my environment is different somehow? |
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #10320 +/- ##
=======================================
Coverage 95.89% 95.89%
=======================================
Files 175 175
Lines 19084 19084
=======================================
Hits 18301 18301
Misses 783 783 π New features to boost your workflow:
|
As far as I understand the .rst files are generated when running |
pre-commit is not regenerating all the doc all the time (tox -e docs / make html is very slow), but I think we check in the CI now (we were simply regenerating before a release before). |
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.
If there's a mistake in all-options it means the mistake is elsewhere too as this file is generated.
Maybe I need to clarify. I think what happened is that in #10314 the description in |
What is strange is that the CI runs a check in |
I pulled the main branch on a different machine with a fresh environment. Running diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst
index 7a9cec81a..82ade5b52 100644
--- a/doc/user_guide/configuration/all-options.rst
+++ b/doc/user_guide/configuration/all-options.rst
@@ -1501,7 +1501,7 @@ Standard Checkers
--missing-member-hint-distance
""""""""""""""""""""""""""""""
-*The minimum edit distance a name should have in order to be considered a similar match for a missing member name.*
+*The maximum edit distance a name should have in order to be considered a similar match for a missing member name.*
: |
I can reproduce the issue locally (a diff on main, no diff on this branch when regenerating the doc). We'll end up merging it but I have no idea what is going wrong in CI atm. |
This comment has been minimized.
This comment has been minimized.
I was wondering if this is a caching issue with pre-commit? Because, when looking at the logs for the first run when I opened this PR, it somehow wanted to revert my changes based on the git diff that is produced. However this can not be from the right source code because logs:
|
This would also explain why the check is passing now when using tox. What do you think? |
I agree it must be a caching issue but it's probably not from pre-commit but from our 'check documentation' github action caching. |
What do you think of replacing setup-python with uv in this job? In my experience lately, uv without cache is as fast as setup-python + cache, but we would avoid having to deal with these caching side effects |
Sounds good (tox is slower than make because it create the whole env before launching make, bypassing the cache) |
Alright, should we do it here or in a follow up? |
I'm wondering if caching the result of an editable install is a problem. Maybe we need to install the current pylint outside of the cached mechanism. (The problem also appeared in the test here: https://github.com/pylint-dev/pylint/actions/runs/14155616302/job/39654454133?pr=9962) |
Doing it here is fine, I see this PR as "fixing the cache and the generated doc that was broken by the cache issue" |
Locally without this commit I think we just shouldn't use |
Personally, on the contrary I have a diff on main or branch rebased on main and I don't have a diff on this branch. Not sure about the reason for the discrepancy here.
We can remove the pre-commit though as probably no one install it and it's very slow on every push even unrelated to doc chances it's a nightmate. (I use tox -e docs only on doc change personally, but there's 3 ways to do it right now, which is bad) |
@@ -180,11 +180,10 @@ jobs: | |||
- name: Check documentation build and links | |||
run: | | |||
. venv/bin/activate | |||
cd doc | |||
pre-commit run --hook-stage push sphinx-generated-doc --all-files || { | |||
tox -e docs || { |
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.
Are we sure this is correct? Wouldn't this always exit 1
?
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.
If tox -e docs
is true this exit with 0
Took over this MR, not in a position to review anymore.
@Julfried the uv refactor is still welcome but let's do it in a follow-up MR, using tox is not efficient but it's a fast fix that could be permanent and it will unblock the other PR. |
@Pierre-Sassoulas thank you, will do it :) |
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit dc4dfe8 |
Type of Changes
Description
Somehow #10314 did not change the .rst file in docs, which messed up pre-commit ci for me