fitzee commented on PR #40008: URL: https://github.com/apache/superset/pull/40008#issuecomment-4422689097
## CodeAnt review findings — assessment CodeAnt posted three findings (second review, 2026-05-11). Summary for the record: **Finding 1 — `utils.py:156-158`: KeyError on unresolved UUID** — **False positive.** CodeAnt describes a `dataset_info[dataset_uuid]` direct indexing crash. The v4 code at this commit uses `dataset_info.get(dataset_uuid)` with an explicit `if info: / else: target.pop(...)` guard — no KeyError is possible in the new display-controls path. The unguarded access CodeAnt may have pattern-matched against is the pre-existing native-filter code at line ~140 (not new, not in scope of this PR). **Finding 2 — `export.py:153-168`: N+1 `DatasetDAO.find_by_id`** — **Valid observation, overstated severity (LOW, not Major).** One DB lookup per display-control target, no explicit cache. However: identical pattern exists in the native-filter block immediately above; SQLAlchemy's identity map caches same-session same-ID lookups; export is user-initiated and low-frequency. Pre-existing behavior extended consistently. **Finding 3 — `export.py:255-263`: Duplicate `ExportDatasetsCommand` calls** — **Valid observation, overstated severity (LOW, not Major).** `ExportDatasetsCommand([dataset_id]).run()` called once per target without deduplication. Same pattern exists in the native-filter export loop above. `ExportModelsCommand.run()` deduplicates filenames via a `seen` set so output is correct; the redundant command instantiations do wasted work but don't affect correctness. Pre-existing, consistent with existing code. None of these change the assessment. Findings 2 and 3 are worth a follow-up dedup/caching pass on both paths together; Finding 1 is a false positive. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
