You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cache invalidation is not working for translations #23
for fn ∈ os.listdir(targets_dir):
if os.stat(os.path.join(targets_dir, fn)).st_ino == target_ino:
prefixes.append(fn)
from build_docs.py are searching all the http-exposed directories pointing to the currently build directory. It's building a wrong list of directories, not being able to spot he's in a subdirectory:
target is /srv/docs.python.org/fr/3.5
so targets_dir is /srv/docs.python.org/fr
the os.listdir will get the right list of translated versions
prefixes will only contain the versions like ['3.6'] not ['fr/3.6']
so to_purge will contain something like ['3.5', '3.5/about.html'] missing the fr/ prefix.
Looks like cache invalidation is also broken for the release/ directory as old code was not searching in it so I replaced this with a find -samefile, so translation and release are found. Will close if invalidation goes as expected.
Side note: Is that normal we're building 3.5 which is a symlink to release/3.5.4/? I first expected folders in release/ to be cp -as of doc during release, and 3.5 is the only one in this case, see:
lrwxrwxrwx 1 docsbuild docs 3 Oct 28 2012 2 -> 2.7
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.0 -> release/2.0.1
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.1 -> release/2.1.3
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.2 -> release/2.2.3
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.3 -> release/2.3.5
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.4 -> release/2.4.4
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 2.5 -> release/2.5.4
lrwxrwxrwx 1 docsbuild docs 13 Oct 29 2013 2.6 -> release/2.6.9
drwxrwxr-x 19 docsbuild docs 4.0K Jun 28 17:23 2.7
lrwxrwxrwx 1 nad docs 3 Dec 23 2016 3 -> 3.6
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 3.0 -> release/3.0.1
lrwxrwxrwx 1 docsbuild docs 13 Oct 28 2012 3.1 -> release/3.1.5
lrwxrwxrwx 1 docsbuild docs 13 Oct 12 2014 3.2 -> release/3.2.6
lrwxrwxrwx 1 docsbuild docs 13 Oct 12 2014 3.3 -> release/3.3.6
lrwxrwxrwx 1 larry larry 13 Jul 25 08:09 3.4 -> release/3.4.7
lrwxrwxrwx 1 larry larry 13 Jul 25 08:17 3.5 -> release/3.5.4
drwxrwxr-x 19 docsbuild docs 4.0K Jul 10 05:15 3.6
drwxrwxr-x 20 nad docs 4.0K Aug 2 02:15 3.7
lrwxrwxrwx 1 nad docs 3 Dec 23 2016 dev -> 3.7
Activity
JulienPalard commentedon Aug 7, 2017
Looks like cache invalidation is also broken for the
release/directory as old code was not searching in it so I replaced this with afind -samefile, so translation and release are found. Will close if invalidation goes as expected.Side note: Is that normal we're building
3.5which is a symlink torelease/3.5.4/? I first expected folders inrelease/to becp -as of doc during release, and 3.5 is the only one in this case, see:JulienPalard commentedon Aug 8, 2017
There's still an old cache invalidation issue: We're purging directories without trailing slashes, but they are cached with them, like:
It should be:
JulienPalard commentedon Aug 10, 2017
I also suspect switchers.js not to be invalidated by the script as I had to manually invalidate it after python/cpython#3051.
Used this to invalidate (just in case I have to invalidate again before fixing this):