release: v0.5.15 — fix cache regression and structural cleanup

- cache.py: fix np.save extension bug from v0.5.13 — tmp path used
  final+".tmp" (abc.npy.tmp) but np.save auto-appends .npy to paths not
  ending in .npy, writing to abc.npy.tmp.npy instead; os.replace then
  raised FileNotFoundError silently, making every cache write a no-op
  and leaking *.npy.tmp.npy files. Fixed by inserting .tmp before .npy:
  tmp = final[:-4] + ".tmp.npy"

- config.py: remove str(default) round-trip in _getenv_int/_getenv_float
  — use raw = os.getenv(name); return default if raw is None else int(raw)
  so a future float default can't cause a spurious "not a valid integer"
  warning and return the wrong type

- executor.py: consolidate 4 progress.remove_task calls into one
  try/finally around the per-job body; continue inside try/finally
  executes the finally before the next iteration, making the invariant
  structurally enforced rather than relying on discipline across 4 sites
This commit is contained in:
2026-06-15 01:45:43 +00:00
parent 5bcc5975bc
commit fe5e1574ac
5 changed files with 125 additions and 111 deletions
+10 -6
View File
@@ -13,20 +13,24 @@ _LEGACY_CONFIG_FILE = Path(".immich_config.json") # pre-v0.6: lived in process
def _getenv_int(name: str, default: int) -> int:
val = os.getenv(name, str(default))
raw = os.getenv(name)
if raw is None:
return default
try:
return int(val)
return int(raw)
except ValueError:
logging.warning("%s=%r is not a valid integer — using default %s", name, val, default)
logging.warning("%s=%r is not a valid integer — using default %s", name, raw, default)
return default
def _getenv_float(name: str, default: float) -> float:
val = os.getenv(name, str(default))
raw = os.getenv(name)
if raw is None:
return default
try:
return float(val)
return float(raw)
except ValueError:
logging.warning("%s=%r is not a valid float — using default %s", name, val, default)
logging.warning("%s=%r is not a valid float — using default %s", name, raw, default)
return default