refactor(ingestion): reorganize progress capturing (connector declares, runner counts, registry reports)#29763
refactor(ingestion): reorganize progress capturing (connector declares, runner counts, registry reports)#29763ulixius9 wants to merge 13 commits into
Conversation
…sets ingested Pre-existing in-flight branch work: emit a DISCOVERY progress update at run start so short runs are visible before the reporting timer's first tick, and forward totalAssetsIngested through the SSE payload and server tracker. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…etadata/ingestion/progress package Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Progress facades Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ee root The extra open([], label, total) made the active-scope snapshot non-None after all groups are pruned, contradicting the established snapshot()-is-None behavior and reintroducing a parallel count path. Restore parity with the original _declare_progress_groups helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ssReporter Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…and PowerBI sources Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…icy behind NodeProgress handles Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… progress default-on with AUTO/MANUAL/OFF Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…mode The group-progress helpers on DashboardServiceSource were migrated to the manual_progress facade, which requires progress_mode=MANUAL. The _BareSource test double still used the default AUTO mode and raised ProgressModeError. Declare MANUAL on the double, matching how real PowerBI drives these helpers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…re_progress_totals hook Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ANUAL mode Guards a future dashboard-connector author from calling the group helpers on a default AUTO source, which would raise ProgressModeError and otherwise double-count against the runner's own tracking. Addresses the one latent trap from final review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dockerfile.ci was accidentally swept into this branch with a local build hack that pinned pip extras to [powerbi,snowflake,pii-processor]. Restore the canonical ARG-driven install so this file carries no branch-local change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ess_totals hook MySQL already inherits AUTO processed-counting from the topology runner; add the Tier-1 declare_progress_totals hook so the run renders %/ETA. MySQL is effectively single-database, so declare the Database denominator directly and mark DatabaseSchema reconcilable — the runner fills the schema total from the live inspector it queries anyway, and DatabaseSchema drives the ETA. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsReorganizes progress capturing into a modular architecture to enforce clear ownership between connectors, runners, and the registry. Resolved the Dockerfile.ci dependency issue, and all tests passed. ✅ 1 resolved✅ Bug: Dockerfile.ci hardcodes connector deps, ignoring INGESTION_DEPENDENCY
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
What & why
Reorganizes ingestion-side progress capturing so the responsibilities are clean and the code is easy to read/extend when adding a new connector. Pure reorganization — counting semantics, the SSE payload shape, and the ETA formula are behavior-preserving. Enforces one ownership split:
How
metadata/ingestion/progress/(registry.py,tracking.py,modes.py,_render.py,runner_tracker.py).progress_tracking_enabledflag:progress_mode = AUTO | MANUAL | OFF.declare_progress_totals(totals)and declares denominators through a denominator-onlyTotalsDeclarerfacade (structurally cannot increment counts). Runner calls it exactly once, at the first non-root node.ManualProgressfacade. Runner emits nothing for them → auto XOR manual, double-counting impossible by construction.topology_runner.pyprogress policy extracted intoTopologyProgressTracker+NodeProgresshandles; the walk methods now call handles unconditionally (zero progressifs in the runner).ProgressRegistryabsorbseta_seconds()/render_cli()/sse_payload(); the standaloneProgressReporteris dissolved.declare_progress_totalshook; PowerBI + query-parser family → MANUAL.Behavior changes (only two)
OFFis the per-connector fuse.Everything else — counting, tree shapes, payloads, ETA math, reconciliation — is byte-for-byte preserved.
Testing
make py_format_checkexits 0.Notes for reviewers
emit run-started progress update and thread total assets ingested) is pre-existing in-flight branch work bundled here.utils/progress_tracker.py(step-summary singleton) is intentionally kept — independent code path, out of scope.🤖 Generated with Claude Code