Conversation
runpod-Henrik
left a comment
There was a problem hiding this comment.
PR #285 — fix: AE-2197: stable gpu sorting
Repo: runpod/flash
Severity: LOW
Key findings: No test covers the actual stated goal — that the same GPU set in different orders produces the same config hash and avoids a spurious redeploy.
1. Missing test for the user scenario this fix is meant to prevent
The purpose of this fix is: a user who deploys with gpuIds="AMPERE_24,ADA_24" and then redeploys the same config with gpuIds="ADA_24,AMPERE_24" should not trigger an unnecessary redeploy.
No test validates this end-to-end. The new tests cover the sort function in isolation, but nothing constructs two resource configs with the same GPU set in different orders and asserts they produce the same config_hash. If the normalization were ever disconnected from the hash path, this scenario would silently regress — the sort tests would still pass.
Nits
from_gpu_ids_strparsesself.gpuIdsbut does not write back the normalized form. No bug today, but it creates an implicit ordering dependency that could cause confusion for anyone reading that code path later.
Verdict
PASS WITH NITS — the fix is correct and the spurious-redeploy scenario is resolved. Add a hash-level round-trip test (same GPU set, different input order, same config_hash) to lock in the stated goal.
🤖 Reviewed by Henrik's AI-Powered Bug Finder
Summary
Why