fix(job-orchestration): Set query job duration only when start_time is not None (fixes #1806).#1809
Conversation
WalkthroughFixed a crash in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (7)📚 Learning: 2025-09-19T18:28:26.747ZApplied to files:
📚 Learning: 2025-06-24T20:13:46.758ZApplied to files:
📚 Learning: 2024-11-15T20:07:22.256ZApplied to files:
📚 Learning: 2025-07-29T21:00:07.757ZApplied to files:
📚 Learning: 2025-08-08T06:59:42.436ZApplied to files:
📚 Learning: 2025-07-29T14:04:13.769ZApplied to files:
📚 Learning: 2025-11-17T22:58:50.056ZApplied to files:
🧬 Code graph analysis (1)components/job-orchestration/job_orchestration/scheduler/query/query_scheduler.py (1)
🪛 Ruff (0.14.10)components/job-orchestration/job_orchestration/scheduler/query/query_scheduler.py369-369: (DTZ005) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
junhaoliao
left a comment
There was a problem hiding this comment.
the changes in handle_cancelling_search_jobs look correct and optimal to me. i left a comment about splitting the fix of logging messages - correct me if i understood the fix wrong
for the title, i believe a better scope can be job-orchestration? i.e., fix(job-orchestration)
start_time is not None (fixes #1806).start_time is not None (fixes #1806).
… is not None (fixes y-scope#1806). (y-scope#1809) Co-authored-by: Junhao Liao <junhao.liao@yscope.com>
… is not None (fixes y-scope#1806). (y-scope#1809) Co-authored-by: Junhao Liao <junhao.liao@yscope.com>
… is not None (fixes y-scope#1806). (y-scope#1809) Co-authored-by: Junhao Liao <junhao.liao@yscope.com>
Description
This PR fixes #1806 by only setting the query job duration in database if local job's
start_timeis not None during job cancellation handling.This PR fixes another bug by checking database cursor
rowcountright afterexecuteinstead of aftercommit. Aftercommit,rowcountis always 0.Checklist
breaking change.
Validation performed
Follow the reproduce step in #1806, now
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.