|
|
|
|
|
by moon0917
31 days ago
|
|
Funny seeing Saleor in your benchmarks. I was digging through that codebase recently for something else and ran into a nasty bug along those same lines. They have a price recalculation task meant to only run on dirty listings, except someone forgot to assign the filtered queryset back to the variable. So it just recomputed every single listing on every run. The unit test still greenlit it for completely unrelated reasons, meaning it probably sat there burning cycles in prod for ages because the final output was technically valid. Does Mo catch that kind of silent no-op where the external state looks fine, or does it mostly hook into visible state diffs? |
|
Fixed here: https://github.com/saleor/saleor/pull/19984 The old test passed for the wrong reason, so we fixed that too.
Bonus: we've also created semgrep rule to prevent unassigned querysets: https://github.com/saleor/saleor/pull/19997