Exclude Python transforms from check entity task
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
## Description of the bug
The check entity task repeatedly logs updates for transforms and cards because Python transforms are being analyzed in a path that expects query-shaped entities. In the current flow, `instance-db-id` returns `nil` for Python transforms, which causes the `when-let` around the analysis upsert to skip marking them correctly.
This appears to happen when card/transform analysis runs on Python transforms. It may also be worth checking whether this is part of a broader class of dependency-analysis issues for non-query entities stored alongside query-shaped ones.
## Reproduction steps
1. Run the check entity task.
2. Include Python transforms in the analyzed entities.
3. Observe repeated log lines for `:transform` and `:card` updates.
4. Confirm the affected transform sources are of type `python`.
## Expected behavior
Python transforms should be excluded from the check entity task, or otherwise handled correctly so they do not cause repeated logging or skipped analysis upserts.
## Logs
The logs show repeated entries from `metabase-enterprise.dependencies.task.entity-check` such as updates to 41 entities of type `:transform` and 1 entity of type `:card`.
## Diagnostic information
Affects recent versions.
## Severity
p2
Contributor guide
Research direction
Start with metabase-enterprise.dependencies.task.entity-check and trace the instance-db-id path used during analysis upserts. Run the check entity task with Python transforms included and verify that Python transforms no longer produce repeated transform or card updates and are handled consistently by the analysis flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100