Repository navigation
Fall back to the cached test data when gin cannot be reached in CI - #1938
Conversation
|
Yes, this looks right to me. What #1912 needed was that no cache gets saved under an empty key, and that check stays in Three things I checked:
One limit, not a blocker: the cron builds the cache with |
zm711
left a comment
There was a problem hiding this comment.
I think this is worth a try. Since I’m bad at actions in general I’ll trust you Heberto and we can tweak as necessary.
|
@AxelNoun and @zm711 thanks for the review I agree with the comments above and now:
I checked both by hand on local datalad datasets, one with an unreachable remote and one with two remotes and no tracking branch, which is one of the cases that gives I also went through the CI history to see how often the timeout happens. Since August four test runs waited about 135 s on almost every The run of this PR today already went through the fallback. In the 3.14 job gin answered the hash step with a 403, the most recent cache was restored, the 93 updates failed with a 403 and all the tests passed: |
zm711
left a comment
There was a problem hiding this comment.
Merge this as soon as tests pass. This will be crucial for all our other PRs :)
|
We need to fix one more thing. RTD builds still failing. But I don’t think they have access to a cache right? So we just let our docs fail or we remove any g-node from the docs. Maybe we only use g-node for releases and force them to eventually pass like I did last release? Maybe I’ll open an issue? |
|
Let's open an issue and take a look at that. I am unsure how the docs use gin. The will not be able to use the cache of github so most likely we should avoid them accessing gin. |
|
On how the docs use gin: five places, six distinct files, about 30 MiB in total.
All five call The consequence is not limited to a red check. The 0.14.6 docs were never published: Keeping the docs off gin seems right to me. Mirroring those six files, as a release asset or a Zenodo record, leaves the tests on gin untouched and keeps the examples runnable for readers who copy them; freezing the outputs into static blocks would also work, at the cost of no longer exercising the IOs. I can open the issue with this inventory, and send the PR that switches |
Right now the IO tests fail before running whenever gin answers 403 to the runner, as on #1924, #1925 and #1926 on October 27. #1912 made the hash step fail so that no cache is built with an empty key, but the test workflows only restore caches, and even with a restored cache the tests failed on the same 403 because
download_datasetalways updates from gin (see #1896).This PR follows what we do in SpikeInterface. The hash check now fails only in
caches_cron_job.yml, where the cache is built, andio-test.ymlandplexon2-testing.ymlwarn and restore the most recent cache through their existingrestore-keys, as in SpikeInterface/spikeinterface#4772.download_datasetnow warns and uses the local copy when the update from gin fails. SpikeInterface goes further and never updates an existing copy and checks each file against its annex MD5 instead (SpikeInterface/spikeinterface#2937), but I kept the update here so that a pull request still picks up data merged on gin before the next cron run. I checked the fallback by hand with a local dataset whose remote points to an unreachable address: on masterdownload_datasetraisesIncompleteResultsError, with this change it warns and returns the local data. @AxelNoun, as you wrote #1912, does this look right to you?