Backfill cluster_id for pre-rc21 job.assigned events - #29
Open
iross wants to merge 1 commit into
Open
Conversation
capture_job_ad_fields() only started including cluster_id/proc_id as of v0.1.0rc21. job.assigned events written by jobs pinned to an older MLDAG_VERSION have neither field, so enrich_from_jobad_events() silently skipped every one of them -- confirmed against a real database: 86 job.assigned events, 0 with cluster_id. job.assigned events lacking cluster_id are now backfilled by cross-referencing any other event sharing the same run_id (job.executing/job.queued/etc from log_monitor.py always carry both run_id and cluster_id together). proc_id defaults to 0 when backfilled this way. An event with neither its own cluster_id nor a same-run_id fallback is skipped, not counted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
capture_job_ad_fields()only started includingcluster_id/proc_idas of v0.1.0rc21.job.assignedevents written by jobs pinned to an olderMLDAG_VERSIONhave neither field, soenrich_from_jobad_events()silently skipped every one of them — confirmed against a real database (86job.assignedevents, 0 withcluster_id).job.assignedevents lackingcluster_idare now backfilled by cross-referencing any other event sharing the samerun_id(job.executing/job.queued/etc fromlog_monitor.pyalways carry bothrun_idandcluster_idtogether).proc_iddefaults to 0 when backfilled this way. An event with neither its owncluster_idnor a same-run_idfallback is skipped, not counted.Test plan
uv run pytest tests/ -q— 278 passed, 2 skippedruff check/ty checkclean🤖 Generated with Claude Code