Issue(medcat):CU-869c570zv stability on windows and macos#338
Conversation
This reverts commit 7d2147b.
| mock_get_version.return_value = cls.use_version | ||
| cls.scripts_path = download_scripts.fetch_scripts(cls._temp_dir.name) | ||
| with unittest.mock.patch( | ||
| "medcat.utils.download_scripts._find_latest_scripts_tag" |
There was a problem hiding this comment.
Totally agree that this fixes it
I'm not 100% if we should mock stuff in the stability check though - maybe we can just add some retries with back off? Is there any chance that we actually break this but dont test it, eg we delete all the tags in github (accidentally...), this action still says success but the scripts are broken. Now I say that seems like 0% chance of that...
There was a problem hiding this comment.
Ignore my comment altogether actually - just saw that this is a regular test. 100% ignore my above, and carry on as you were
There was a problem hiding this comment.
Yeah, a regular test that also gets run during the stability workflow. But during that there's A LOT of them which means we get rate limited (apparently).
This PR (hopefully) fixes the stability workflow failures on Windows and MacOS.
The Windows failure was due to how temporary files are used on Windows. They can't be opened multiple times (i.e to write and read).
The MacOS issue seems to have been a rate limiting one. So hopefully mocking the GH call will fix it.
EDIT:
I had the stability workflow run in the 2nd to last commit to double check that everything works. And it did. So that's why the change to run the workflow was reverted.