[FIX] Fix HITL review screen showing "Never expires" despite TTL being set#1785
[FIX] Fix HITL review screen showing "Never expires" despite TTL being set#1785vishnuszipstack merged 1 commit intomainfrom
Conversation
…g set Fix two interacting bugs that prevented TTL from propagating to HITL queue records: 1. WorkflowUtil.get_hitl_ttl_seconds was an OSS stub that always returned None. Now delegates to get_hitl_ttl_seconds_by_workflow via try/except import, falling back to None in OSS environments. 2. _push_to_queue_for_api_deployment never fetched TTL. Now mirrors the connector path by calling WorkflowUtil.get_hitl_ttl_seconds and passing ttl_seconds through to _create_queue_result and _enqueue_to_packet_or_regular_queue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughThe changes add pluggable HITL (Human-in-the-Loop) TTL handling to workflow deployments. A utility function now dynamically retrieves TTL values from a cloud-specific helper module when available, falling back gracefully for OSS environments. The API deployment endpoint integrates this TTL computation into queue payload creation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
Test ResultsSummary
Runner Tests - Full Report
SDK1 Tests - Full Report
|
|



What
WorkflowUtil.get_hitl_ttl_secondsOSS stub to delegate to the realget_hitl_ttl_seconds_by_workflowimplementation_push_to_queue_for_api_deploymentso API deployment path propagates TTL to HITL queue recordsWhy
WorkflowUtil.get_hitl_ttl_secondsis an OSS stub that hardcodesreturn None, even though the real implementation exists inpluggable_apps.manual_review_v2.helper_push_to_queue_for_api_deploymentnever fetches TTL at all, unlike its sibling_push_to_queue_for_connectorHow
utils.py): Changedget_hitl_ttl_secondsto import and callget_hitl_ttl_seconds_by_workflowviatry/except ImportError, so it works in cloud environments and gracefully returnsNonein OSSdestination.py): Addedttl_seconds = WorkflowUtil.get_hitl_ttl_seconds(self.workflow)to the API deployment path and passed it through to_create_queue_resultand_enqueue_to_packet_or_regular_queue, mirroring the existing connector pathCan this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
try/except ImportErrorpattern ensures OSS environments without the pluggable app still getNone(unchanged behavior). The API deployment path previously never set TTL, so adding it is purely additive.Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
postgresql_queue.py enqueue())Dependencies Versions
Notes on Testing
ttl_hoursin HITLSettings for a workflow via the HITL settings UIScreenshots
N/A
Checklist
I have read and understood the Contribution Guidelines.