act-now-coalition / covid-data-model

Data backend providing computed data for the graphs displayed at https://covidactnow.org
https://covidactnow.org/
MIT License
149 stars 57 forks source link

Fix model artifact rename to work across devices. #1308

Closed mikelehen closed 2 years ago

mikelehen commented 2 years ago

This fixes an error I ran into when I was doing some perf testing on a new github actions runner. When I set up the runner, I gave it a small (10GB) OS drive and a large drive for the action runner / data file stuff. But this caused the PYSEIR_ARTIFACT_SNAPSHOT option to not work because it ended up trying to rename a file from one device to another, which apparently isn't supported.

OSError: [Errno 18] Invalid cross-device link: '/tmp/tmppf9_1nlo/data/api-results-3355' -> '/mnt/data/covid-data-model/covid-data-model/api-results-3355'