Fix dev channel selection to only use dev manifest when allowed

This commit is contained in:
Aaron
2025-12-14 17:35:47 -05:00
parent 50ddc3e211
commit 15da438625

View File

@@ -146,7 +146,11 @@ def fetch_manifest_for_channel(channel: str, with_meta: bool = False):
dev_manifest_url = os.environ.get("PIKIT_DEV_MANIFEST_URL") or DEFAULT_DEV_MANIFEST_URL
stable_manifest_url = os.environ.get("PIKIT_STABLE_MANIFEST_URL") or DEFAULT_MANIFEST_URL
manifest = None
manual_dev_manifest = None
version_dates: Dict[str, Optional[str]] = {}
# Explicit dev manifest (raw file) only used for dev channel
if channel == "dev":
manual_dev_manifest = _try_fetch(dev_manifest_url)
try:
manifest = fetch_manifest(stable_manifest_url)
except Exception:
@@ -252,8 +256,8 @@ def fetch_manifest_for_channel(channel: str, with_meta: bool = False):
manifest["_release_date"] = version_dates[mver]
if channel == "dev":
# Choose the newest by version comparison across stable/dev/base candidates
candidates = [c for c in (latest_dev, latest_stable, manifest) if c]
# Choose the newest by version comparison across stable/dev/base/manual-dev candidates
candidates = [c for c in (latest_dev, manual_dev_manifest, latest_stable, manifest) if c]
best = None
best_ver = None
for c in candidates: