Skip to content

Fix parity temp checkout roots on macOS - #2156

Open
kavemang wants to merge 1 commit into
ryanbr:mainfrom
kavemang:fix/parity-temp-root-2143
Open

kavemang wants to merge 1 commit into
ryanbr:mainfrom
kavemang:fix/parity-temp-root-2143

Conversation

@kavemang

Copy link
Copy Markdown

Fixes #2143

Summary:

  • resolve temporary checkout roots before scanning archived sources
  • cover both the authority-refresh and exact-base paths with a symlink regression test

Tests:

  • python3 -m unittest discover -s tests -p test_*.py (106 tests)
  • python3 Tools/parity_ledger.py --base upstream/main

@ryanbr

ryanbr commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Thanks @kavemang, and sorry: this landed second. The same change went in about an hour ago from @digitalerdude as #2158, which is why this now shows as conflicting.

Your diagnosis was right and independently reached. Both PRs found the same thing, name the same two call sites, and reproduce it with a symlink so the Linux runner catches it rather than leaving it to a macOS contributor.

I compared the two reproductions rather than assuming they were interchangeable:

  • yours patches parity_ledger.tempfile.TemporaryDirectory to hand back a symlinked alias
  • the merged one patches tempfile.tempdir, so the real TemporaryDirectory runs and creates its directory inside a symlinked parent

Equivalent in effect. Yours mocks the function, the merged one lets it run, and neither covers anything the other misses, so there is nothing here worth salvaging on top of what is already in.

One small thing for the record: the summary says it covers "both the authority-refresh and exact-base paths", but the test asserts only _base_semantic_state. The merged PR is in the same position, and its own analysis is that finding_identities_at_git_ref never actually crashes, since it passes no pre-built inventory, so neither path is under-tested by much. Worth knowing if you ever come back to it.

Nothing wrong with this work. It is a queue problem, not a quality one: two people fixed the same issue on the same day and only one could go in. Recommending it be dropped, and happy to be argued out of that if you think the mock-the-function shape is worth having instead.

@ryanbr

ryanbr commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Following up on the recommendation above: this now conflicts with main, since the same change is in.

Nothing further needed from you. Dropping it loses no coverage, for the reasons in the comparison above. If you would rather keep the mock-the-function shape of your regression test instead of the one that landed, say so and I will take it as a follow-up on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity_ledger.py --base and --refresh-derived crash on macOS: temp checkout root is not resolved

2 participants