Issues / #397
#397 setup.py: a refused engine archive is kept and reused, so "run this again in a few minutes" never updates the engine
closed · @alphastorm · 1 comentários · No GitHub
Descrição
At `9259cad` (0.1.31), when `get_prebuilt` refuses a downloaded engine archive because it is older than `MIN_ENGINE`, it deletes only the unpacked copy ([setup.py#L1077-L1086](https://github.com/Niko1221/Strata/blob/9259cad4cfa3543cd3b8decab5962672b968c649/setup.py#L1077-L1086)); `engine/<asset>` and its `.done` mark stay. The archive is deleted only after a successful install ([#L1101-L1102](https://github.com/Niko1221/Strata/blob/9259cad4cfa3543cd3b8decab5962672b968c649/setup.py#L1101-L1102)). Every later run finds the mark, prints "Strata engine already downloaded" without fetching anything ([#L604-L606](https://github.com/Niko1221/Strata/blob/9259cad4cfa3543cd3b8decab5962672b968c649/setup.py#L604-L606)), and refuses the same archive again, whatever the URL serves now.
On the update path this defeats the advice setup prints. While a release's assets are still uploading, setup falls back to `releases/latest`, refuses that older engine and says "run this again in a few minutes to update it". Every later run reuses the refused archive, so the engine is not updated until `engine/strata-windows-x64.zip` is deleted by hand.
Reproduced without a GPU or GitHub: `get_prebuilt(PREBUILT_URL, {"arch": 89, "archs": [89]}, vision=False, updating=True)`, with an installed 0.1.30 engine and `PREBUILT_URL` / `PREBUILT_TAG_URL` pointed at a local HTTP server:
1. Only `latest/download/` has an archive, a 0.1.30 build. After the 404 on `download/v0.1.31/`, setup downloads it and prints "engine 0.1.31 is not published yet (the release may still be uploading): run this again in a few minutes to update it". `engine/strata-linux-x64.zip` and its `.done` stay.
2. A 0.1.31 archive is published at `download/v0.1.31/`. The next two runs each send one `HEAD` to it (200), print "Strata engine already downloaded" and refuse the 0.1.30 archive again with the same message. No `GET` is sent.
3. With the archive and its `.done` deleted by hand, the next run downloads and installs 0.1.31.
Suggestion: delete the archive and its `.done` mark on both refusals too ([#L1085-L1086](https://github.com/Niko1221/Strata/blob/9259cad4cfa3543cd3b8decab5962672b968c649/setup.py#L1085-L1086), [#L1093-L1094](https://github.com/Niko1221/Strata/blob/9259cad4cfa3543cd3b8decab5962672b968c649/setup.py#L1093-L1094)), as the success path does. #324 did this along with its #214 changes, which 0.1.31 covers otherwise; it is closed now.
No site
Links install, modelos, releases.