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.
Fixes #1744
And hopefully also fixes #1740
The opensafely CLI, study github actions and jobserver now all call the new codelist check endpoing /api/v1/check. Mostly this is a pretty fast call, but for very large dm+d codelists, and/or studies that have a lot of codelists, especially dm+d ones, it can be slow, and it seems to be the cause of tech-support issue #1740
We can cache these shas so we don't have to go through the VMP mapping checks every time. dm+d is release once a week, so at most we need to re-cache weekly. There are under 700 dm+d codelist versions that would need to be re-cached, and locally this is quick to do, so it can be done as part of the weekly import.
Since caching the shas involves fetching the CSV data for downloading, we can also cache that. It's caching with a key that includes the function parameters so that we can cache different calls (e.g. OSI will always pass
fixed_headers=True
)