mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #399] [CLOSED] fix(setup): drop a refused engine archive instead of reusing it #2622
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2622
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/399
Author: @alphastorm
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:fix/397-refused-engine-archive📝 Commits (1)
bafaf0afix(setup): drop a refused engine archive instead of reusing it📊 Changes
2 files changed (+34 additions, -5 deletions)
View changed files
📝
setup.py(+6 -4)📝
tools/test_setup_pins.py(+28 -1)📄 Description
Fixes #397.
When
get_prebuiltrefused a downloaded engine archive (older thanMIN_ENGINE, or without code for the GPU), it keptengine/<asset>and its.donemark.download()trusts the mark, so every later run unpacked the same refused archive again instead of downloading. On the update path, "run this again in a few minutes to update it" could not work until the archive was deleted by hand.Change
setup.py(get_prebuilt): the archive and its.donemark are deleted in afinallyright after unpacking, so a refused or unreadable archive is not kept. The success path already deleted both; those two lines move into thefinally.Behavior changes
strata-windows-x64.zipat 0.1.31) before refusing it, instead of reusing the refused copy.engine/.Tests (
python -m unittest tools.test_setup_pins, no network)Engine.test_an_archive_refused_as_too_old_is_not_reusedandEngine.test_an_archive_refused_for_the_gpu_is_not_reusedrunget_prebuiltwith the realdownload()over a--prebuiltfolder that first holds a refused archive and then the right one. Both fail on9259cad(the second run returnsNone) and pass with the change.serve/test_*.py,tools/test_*.py, 17 modules) gives the same result as on9259cadapart from the two new tests: 219 tests, 7 skipped, withSTRATA_GGUF_PYset fortools.test_iq_pack. This was on Python 3.13.15, macOS arm64. ruff and pyright report nothing new in the changed files.Also checked
PREBUILT_URLandPREBUILT_TAG_URLpatched, realdownload()), with an installed 0.1.30 engine and at first only a 0.1.30 archive underlatest/. On9259cad, after the 0.1.31 archive is published, the next two runs each send oneHEAD, print "Strata engine already downloaded" and refuse the 0.1.30 archive again. With the change, the next run downloads and installs 0.1.31, and the run after that keeps it without a request.BadZipFile; on9259cadthe archive and its.donestay, with the change both are gone.Not run: Windows, a GPU, or a real release download.
This change was part of #324, which 0.1.31 superseded.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.