Skip to content

CI diagnostic: Windows test_cli_configoverrides failure - #287

Open
yarikoptic wants to merge 3 commits into
masterfrom
bf-diag-configoverrides
Open

CI diagnostic: Windows test_cli_configoverrides failure#287
yarikoptic wants to merge 3 commits into
masterfrom
bf-diag-configoverrides

Conversation

@yarikoptic

Copy link
Copy Markdown
Member

Important

Drop the TEMP commit before merge.

Summary

Windows test-datalad fails on a single test — test_cli_configoverrides — which passes on Ubuntu with the same git-annex and on datalad's own AppVeyor Windows CI with an older git-annex (10.20230126, 2023‑01). The failure is assert 1 == 0 (datalad run exits 1), but pytest patches stdout/stderr so the actual error never reaches the log.

This PR adds a diagnostic step that reproduces the failing invocation outside pytest so we can see exit code + stderr, and temporarily scopes the Windows CI down so iteration is ~2 min instead of ~90.

Once we have signal, next step is likely to bisect git-annex.

Commits

  • 10cfa9e CI: add Windows diagnostic for datalad test_cli_configoverrides failure
  • 5feffcd TEMP: shrink Windows CI to only the failing datalad test — REVERT BEFORE MERGE

Test plan

  • Windows CI runs the new diagnostic step and prints exit codes / stderr for the three attempts
  • Root-cause identified (git-annex regression? Windows Server 2025 quirk? datalad Windows-side bug?)
  • Drop TEMP commit 5feffcda0f before merge

yarikoptic and others added 3 commits August 5, 2026 09:05
Windows `test-datalad (master|maint|release)` all fail on the single
`datalad/cli/tests/test_main.py::test_cli_configoverrides` test with
`assert 1 == 0` (datalad `run` exits 1 instead of 0).  The pytest run
patches sys.stdout / sys.stderr, so the actual datalad/git error
never reaches the workflow log.

Reproduce the failing scenario before pytest and let all output flow
through, so we can see exit codes, stderr, and env from three angles:

  1. exact test invocation
     (`datalad -c ... run -d ... 'git config ...'`)
  2. same but with `env | grep` + `git config --show-origin` inside
     the run subshell, to see whether the override actually made it
     into GIT_CONFIG_PARAMETERS
  3. bare `git config` with a hand-set GIT_CONFIG_PARAMETERS, to rule
     out git's own handling of the env var on Windows

Only touches the Windows workflow; macOS / Ubuntu / macOS-ARM64
builds have no path-triggered dependency on this file so they don't
re-run.

Co-Authored-By: Claude Code 2.1.221 / Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ORE MERGE

To iterate on test_cli_configoverrides diagnosis:

- skip `test-annex` jobs entirely (`if: false`)
- reduce `test-datalad` matrix to `[master]` (all three variants fail
  identically, so one is enough)
- pass `--pyargs datalad.cli.tests.test_main -k test_cli_configoverrides`
  to pytest so the run finishes in ~2 min instead of ~90

Revert this commit before this PR is mergeable.

Co-Authored-By: Claude Code 2.1.221 / Claude Opus 4.7 (1M context) <noreply@anthropic.com>
windows-2025 runners put the actions workspace on D: while the default
user-profile TEMP is on C:.  Python's `tempfile` (and datalad's
`@with_tempfile`) create datasets on C:, but pytest CWD and
`datalad run -d <path>` execute on D:.  `datalad run` then computes
`os.path.relpath(dataset, cwd)` which, on Windows, raises

    ValueError: path is on mount 'D:', start on mount 'C:'

surfaced by datalad as `[ERROR] path is on mount 'D:', start on mount 'C:'`
and an exit code of 1.  That's what has been failing
`test_cli_configoverrides` (and would fail any other test that
combines `@with_tempfile` with `datalad run -d ...` on this runner).

Fix in-workflow by pointing TMP / TEMP / TMPDIR at `$RUNNER_TEMP`
(which lives on D:), so tempfiles and CWD share a drive.

Datalad-side bug tracked upstream — comment updated with issue URL
once filed.

Co-Authored-By: Claude Code 2.1.221 / Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant