mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-22 06:39:33 +00:00
tests(system_e2e): tree fingerprints ignore server-written bytecode (__pycache__) — S19 flake under load
This commit is contained in:
parent
95762eed59
commit
4c32691ed2
2 changed files with 16 additions and 0 deletions
|
|
@ -694,6 +694,14 @@ def _tree_fingerprint():
|
|||
rel = path.relative_to(clone)
|
||||
if rel.parts and rel.parts[0] == ".git":
|
||||
continue
|
||||
# __pycache__ is machine-generated bytecode the SERVER SUBPROCESS writes
|
||||
# while importing this clone (the isolated server sets no
|
||||
# PYTHONPYCACHEPREFIX). It is never repo content, so a .pyc appearing
|
||||
# between the baseline and the assertion is not evidence that the
|
||||
# refused update touched the worktree — but it DID flip this digest
|
||||
# under load, when a late first-import landed after the snapshot.
|
||||
if "__pycache__" in rel.parts or path.suffix in {".pyc", ".pyo"}:
|
||||
continue
|
||||
if path.is_symlink():
|
||||
digest.update(b"L" + bytes(rel) + os.readlink(path).encode())
|
||||
elif path.is_file():
|
||||
|
|
|
|||
|
|
@ -201,6 +201,14 @@ def _tree_fingerprint(clone: pathlib.Path) -> str:
|
|||
rel = path.relative_to(clone)
|
||||
if rel.parts and rel.parts[0] == ".git":
|
||||
continue
|
||||
# __pycache__ is machine-generated bytecode the SERVER SUBPROCESS writes
|
||||
# while importing this clone (the isolated server sets no
|
||||
# PYTHONPYCACHEPREFIX). It is never repo content, so a .pyc appearing
|
||||
# between the baseline and the assertion is not evidence that the
|
||||
# refused update touched the worktree — but it DID flip this digest
|
||||
# under load, when a late first-import landed after the snapshot.
|
||||
if "__pycache__" in rel.parts or path.suffix in {".pyc", ".pyo"}:
|
||||
continue
|
||||
if path.is_symlink():
|
||||
digest.update(b"L" + bytes(rel) + os.readlink(path).encode())
|
||||
elif path.is_file():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue