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
In some setup (e.g. Chromium), the WPT root is a subdirectory of the main repository (i.e. tests_root != repo_root), in which case ./wpt manifest may fail to detect local changes. Here's my hypothesis:
In manifest.GitHasher._local_changes, a list of changed files are populated with paths relative to the repo root (by git status -z, whose output isn't affected by CWD).
Easy fix: disable GitHasher when tests_root != repo_root (can be done in util.py by checking the output of git rev-parse --show-toplevel).
Otherwise, we can somehow get git status to produce relative paths (and only files changed in the current directory). Perhaps we need to use another git subcommand. Or we could manipulate the paths in Python, which I'd very much like to avoid.
Fixes#17749 by using `git diff --name-only --relative` instead of `git
status`. The `--relative` flag is key: it limits the changes to the
current directory and also outputs relative paths. CWD is already set to
tests_root by utils.git.
Bug: web-platform-tests/wpt#17749Fix: web-platform-tests/wpt#17785
This bug would prevent the manifest from updating when local changes are
made in the working tree, which severely affects the daily workflow of
Blink engineers (bots are not affected).
Change-Id: Icf080553a8c8626c10d7973eb21ec4214c889d16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1697371
Reviewed-by: Luke Z <lpz@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676570}
In some setup (e.g. Chromium), the WPT root is a subdirectory of the main repository (i.e.
tests_root != repo_root
), in which case./wpt manifest
may fail to detect local changes. Here's my hypothesis:In
manifest.GitHasher._local_changes
, a list of changed files are populated with paths relative to the repo root (bygit status -z
, whose output isn't affected by CWD).wpt/tools/manifest/vcs.py
Lines 60 to 68 in 65d3f17
However, later paths relative to the tests root (
gs ls-tree -r -z HEAD
with CWD set to the tests root) are compared against the list generated above.wpt/tools/manifest/vcs.py
Lines 93 to 97 in 65d3f17
As a result, nothing is considered changed and the git hash will be used as the real hash of the working tree incorrectly.
The text was updated successfully, but these errors were encountered: