Repository navigation
Add cancel as final state (#918) - #17352
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesPipeline operation logging
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
api/db/services/pipeline_operation_log_service.py (1)
59-68: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd regression coverage for cancellation and nonterminal states.
Test
_is_final_state()and_final_operation_statuses()forCANCEL,DONE,FAIL,RUNNING, and progress values1/-1; these branches now control both log creation and operation-status filtering.As per coding guidelines, “Preserve valid behavior with focused tests.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/db/services/pipeline_operation_log_service.py` around lines 59 - 68, Add focused regression tests for PipelineOperationLogService._is_final_state and _final_operation_statuses, covering CANCEL, DONE, FAIL, and RUNNING statuses plus progress values 1 and -1. Assert terminal statuses are included and recognized, RUNNING remains nonterminal unless progress is 1 or -1, and empty or supplied operation-status filters preserve the expected final-status results.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/db/services/pipeline_operation_log_service.py`:
- Around line 179-185: Update the status derivation around operation_status in
the fan-out task handling to preserve TaskStatus.CANCEL whenever the task is
canceled, before applying progress-based DONE, FAIL, or RUNNING mapping. Add a
focused regression test covering canceled tasks both while in progress and with
progress == -1, verifying they remain CANCEL.
---
Nitpick comments:
In `@api/db/services/pipeline_operation_log_service.py`:
- Around line 59-68: Add focused regression tests for
PipelineOperationLogService._is_final_state and _final_operation_statuses,
covering CANCEL, DONE, FAIL, and RUNNING statuses plus progress values 1 and -1.
Assert terminal statuses are included and recognized, RUNNING remains
nonterminal unless progress is 1 or -1, and empty or supplied operation-status
filters preserve the expected final-status results.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ed12a8f7-e894-4925-b65a-5e3a67d0469e
📒 Files selected for processing (1)
api/db/services/pipeline_operation_log_service.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17352 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 650 650
Misses 39 39
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.