[GH-ISSUE #397] setup.py: a refused engine archive is kept and reused, so "run this again in a few minutes" never updates the engine #184

Closed
opened 2026-11-04 01:40:44 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @alphastorm on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/397

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); engine/<asset> and its .done mark stay. The archive is deleted only after a successful install (#L1101-L1102). Every later run finds the mark, prints "Strata engine already downloaded" without fetching anything (#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, #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.

Originally created by @alphastorm on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/397 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.
Author
Owner

@Niko1221 commented on GitHub (Oct 1, 2026):

Thanks for the precise repro. This is fixed in 0.1.32: a refused engine archive is deleted together with its .done mark, so the next run downloads again. PR #399 does the same, so it's covered already. Closing.

<!-- gh-comment-id:5938379912 --> @Niko1221 commented on GitHub (Oct 1, 2026): Thanks for the precise repro. This is fixed in [0.1.32](https://github.com/Niko1221/Strata/releases/tag/v0.1.32): a refused engine archive is deleted together with its `.done` mark, so the next run downloads again. PR #399 does the same, so it's covered already. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#184
No description provided.