openaddresses / batch

OpenAddresses/Machine based AWS Batch based ETL Processing
https://batch.openaddresses.io/
MIT License
6 stars 5 forks source link

fetch_repo was shadowing the built-in fetch #335

Closed iandees closed 1 year ago

iandees commented 1 year ago

The "OA_Sources" job from this weekend failed with:

[Error: ENOENT: no such file or directory, open '/usr/local/src/batch/https:/api.github.com/repos/openaddresses/openaddresses/commits/master/openaddresses.zip'] {
--
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/usr/local/src/batch/https:/api.github.com/repos/openaddresses/openaddresses/commits/master/openaddresses.zip'
}

I think this happened because the call to fetch() in get_sha() (here) was calling the fetch() in the file instead of the built-in fetch() HTTP client.

This renames that fetch() to something else so that it doesn't shadow the built-in.