Skip to content

Add progress output to db enrich-history - #23

Merged
iross merged 1 commit into
mainfrom
feat/enrich-history-progress
Aug 24, 2026
Merged

Add progress output to db enrich-history#23
iross merged 1 commit into
mainfrom
feat/enrich-history-progress

Conversation

@iross

@iross iross commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • enrich_from_condor_history() ran completely silently until it returned, printing only a final summary line — no sign of life across many batched condor_history queries.
  • When there was nothing to enrich (e.g. events table not built yet, or --db pointed at the wrong file), it printed an unexplained wall of zeros with no indication why — this is exactly what surfaced in testing today.
  • Adds an optional on_progress callback: called before the first query with the total cluster_id/batch count, after each batch with running totals, and with a clear reason ("No new cluster_ids to enrich.") when there's nothing to do. Wired to typer.echo in mldag-query db enrich-history.

Test plan

  • uv run pytest tests/ -q — 276 passed, 2 skipped
  • ruff check / ty check clean on touched files
  • Manually verified: an empty-target run now prints "No new cluster_ids to enrich." instead of a bare zeroed summary

🤖 Generated with Claude Code

enrich_from_condor_history() ran silently until it returned, printing
only a final summary line -- no sign of life across many batched
condor_history queries, and no explanation when there was nothing to
enrich (e.g. events table not built yet, or --db pointed at the wrong
file) beyond an unexplained wall of zeros.

Adds an optional on_progress callback, invoked before the first query
with the total cluster_id/batch count, after each batch with running
totals, and with a clear reason when there's nothing to do. Wired to
typer.echo in `mldag-query db enrich-history` so it prints live;
defaults to a no-op so existing callers are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@iross
iross merged commit 0f1172e into main Aug 24, 2026
1 check passed
@iross iross mentioned this pull request Aug 24, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant