Repository navigation
CI: fail when the ephy_testing_data HEAD hash cannot be resolved - #1912
Merged
Merged
Conversation
The hash step wrote `dataset_hash=$(git ls-remote ... | cut -f1)` with echo, so its exit status was the one of echo. When git ls-remote failed against gin (HTTP 403, connection failure), the step stayed green, wrote an empty dataset_hash and the cache key degraded to `Linux-datasets-`. Enable pipefail, test both the assignment and the emptiness of the result, emit an ::error:: annotation and exit 1. The step id and names are unchanged, so steps.ephy_testing_data.outputs.dataset_hash still resolves. See NeuralEnsemble#1896.
h-mayorquin
approved these changes
Oct 8, 2026
h-mayorquin
left a comment
Contributor
There was a problem hiding this comment.
LGTM, sorry for taking so long to review this. Thanks for your contribution.
Contributor
|
Once this merges, I will erase the other cache that was created accidentally. |
alejoe91
approved these changes
Oct 8, 2026
Contributor
Author
No problem, it's with pleasure! Do not hesitate to contact me if you need me! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1896.
The step that computes the
ephy_testing_datahash writesdataset_hash=$(git ls-remote ... | cut -f1)withecho, so its exit status is that ofecho. Whengit ls-remotefails against gin, the step stays green,dataset_hashis empty and the cache key becomesLinux-datasets-.This PR replaces the body of that step in
io-test.yml,caches_cron_job.ymlandplexon2-testing.yml:Step ids (
ephy_testing_data) and step names are unchanged, sosteps.ephy_testing_data.outputs.dataset_hashstill resolves. The assignment is inside theifon purpose:caches_cron_job.ymlruns steps underbash -e, where, withpipefailon, a bare assignment exits with git's code before the::error::line. The snippet I first posted in #1896 had that problem and the wrong step id; the issue body is now corrected.What the logs show
Counts use the latest attempt of each run, as of 2026-10-07.
NeoIoTest-automatic-trigger), runs created 2026-07-13 to 2026-10-06: in 9 runs (8 failed, 1 cancelled), one job got HTTP 403 ongit ls-remote, computedLinux-datasets-, got an exact cache hit on it, and pytest then reported 94 to 100 errors, all dataladIncompleteResultsError(595 to 631error: 403lines per job). In all 9, the other job of the same run computed a valid key and logged no 403. None of the 112 jobs of the 56 green runs in that period had an empty key. Recent examples: master, run 37334011073 (2026-10-05); Release 0.14.6 #1910, run 37214229194 (2026-10-04). The first attempt of run 37517882872 (Read the lower word of PLX timestamps as unsigned #1904, 2026-10-06) showed the same pattern; its rerun on 2026-10-07 passed, so that run is counted as green.Cache saved with key: Linux-datasets-; that entry (882,953,306 bytes) is still listed.Linux-datasets-43e19611…, and both logs showCache hit for restore-key: Linux-datasets-and a cache size of 882,953,306 bytes, i.e. the degenerate entry rather than the most recent regular entry at that time (Linux-datasets-d7796f59…, 745,114,516 bytes). Tests passed there;download_datasetrunsdataset.update(merge=True)on an existing clone before fetching files.Cost
fail-fast: true, the other job of the run is then cancelled within seconds rather than after 130 to 199 s (the duration of the failing jobs above); it was already cancelled in all 9 io-test runs above.Why no retry loop
In the two failing jobs I read in full (111844044441 and 111471365590), every access to gin got a 403, from the hash step to the last datalad fetch about 2 min 18 s and 2 min 8 s later (no successful fetch), while the other job of the same run reached gin normally. In the timeout mode, one
git ls-remoteattempt took about 134 to 136 s. A retry inside the same job would therefore mostly add time.After merge
Could a maintainer delete the
Linux-datasets-entry (id 8181158804, created 2026-09-27)? I do not have the rights to do so. After this change no job computes that key any more, but the entry can still be restored throughrestore-keys, as shown above. The command would begh cache delete 8181158804 -R NeuralEnsemble/python-neo.Testing
bash -e,bash -eo pipefail,bash -landbash --noprofile --norc -eo pipefail, with a temporaryGITHUB_OUTPUT:fatal:line followed by the::error::line, nothing written toGITHUB_OUTPUT;dataset_hash=43e19611e863ec40fa40243c4ce42bdff1ba1320written;ls-remoteof a nonexistent ref): exit 1 with the::error::line;dataset_hash=in every failure case, under all four invocations.yaml.safe_load, and each step keepsid: ephy_testing_data.io-test.yml(called fromio-test_trigger.ymlthrough a localuses:), which covers the success path.caches_cron_job.ymlruns on push to master, so the merge will exercise it.plexon2-testing.ymlonly runs weekly or on dispatch, and currently fails for an unrelated reason (CI: drop Python 3.9 from the NeoPlexon2Test matrix #1911).