Skip to content

Sync from main - #746

Merged
v1r3n merged 43 commits into
ai_modulefrom
main
Jan 31, 2026
Merged

Sync from main#746
v1r3n merged 43 commits into
ai_modulefrom
main

Conversation

@v1r3n

@v1r3n v1r3n commented Jan 31, 2026

Copy link
Copy Markdown
Collaborator

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Describe the new behavior from this PR, and why it's needed
Issue #

Alternatives considered

Describe alternative implementation you have considered

v1r3n and others added 30 commits January 24, 2026 23:28
…ion)

Fixed regression from PR #703 where workflows could hang indefinitely:

1. WorkflowExecutorOps.decide() - Removed buggy conditional that only
   rescheduled workflows if postpone != timeout. Now always reschedules
   non-terminal workflows.

2. ExecutorUtils.computePostpone() - Added missing logic from old sweeper:
   - HUMAN task handling (use default timeout)
   - Max postpone duration capping
   - Jitter (±1/3 of duration) to prevent thundering herd

These changes restore the behavior from the old sweeper that was lost
when PR #703 introduced the new sweeper implementation.
Moved WorkflowSweeper and related classes from org.conductoross.conductor
to com.netflix.conductor package to make them available as common
implementation for both OSS and Orkes Conductor.

Changes:
- Deleted old disabled WorkflowSweeper from com.netflix.conductor.core.reconciliation
- Moved WorkflowSweeper: org.conductoross...execution -> com.netflix...reconciliation
- Moved ExecutorUtils: org.conductoross...execution -> com.netflix...execution
- Moved SweeperProperties: org.conductoross...execution -> com.netflix...reconciliation
- Added sweepAsync() method to WorkflowSweeper for compatibility
- Updated imports in WorkflowExecutorOps
- Add TestExecutorUtils.java with 15 unit tests for postpone logic
- Tests validate HUMAN task handling, max postpone capping, and jitter
- Remove broken TestWorkflowSweeper.java (incompatible with new sweeper API)
- Add TestExecutorUtils.java with 15 unit tests for postpone logic
- Tests validate HUMAN task handling, max postpone capping, and jitter
- Rewrite tests to use new WorkflowSweeper constructor signature
- Update tests to test sweep() method instead of removed unack() method
- Tests now verify workflow sweep behavior: terminal workflow removal, lock handling, task repair, subworkflow handling
…ctor OSS

- Replaced complex OSS WorkflowSweeper with simple Orkes version from org.conductoross
- Added SweeperProperties to OSS reconciliation package
- Removed ExecutorUtils with complex computePostpone() logic
- Simplified WorkflowExecutorOps.decide() to use basic workflowOffsetTimeout
- Updated WorkflowReconciler to use sweep() instead of sweepAsync()
- Simplified TestWorkflowSweeper (removed tests for removed methods)
- Deleted TestExecutorUtils

The Orkes WorkflowSweeper now in OSS has:
✅ Simple pollAndSweep() with continuous loop
✅ Task repair logic (verifyAndRepairTask)
✅ Subworkflow repair logic
✅ Parent workflow queue management
✅ NO @async annotation
✅ NO sweepAsync() method
✅ NO complex postpone calculations
Changed import from:
  org.conductoross.conductor.core.execution.WorkflowSweeper
to:
  com.netflix.conductor.core.reconciliation.WorkflowSweeper

This completes the package migration after moving WorkflowSweeper
from org.conductoross to com.netflix.conductor OSS package.

Fixes compilation error in test-harness module.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Inline task repair with detailed warning logs
- Fixed queueDAO.push to use 3-parameter version
- Added subworkflow repair logic for terminal subworkflow states
- Handles COMPLETED, FAILED, TERMINATED, TIMED_OUT states
- All tests pass
- Restored org.conductoross.conductor.core.execution.WorkflowSweeper
- Restored org.conductoross.conductor.core.execution.SweeperProperties
- Keep both old and new sweeper implementations
- Old sweeper (org.conductoross): original simple implementation
- New sweeper (com.netflix): has simplified improvements without Orkes-specific code
- Restored org.conductoross.conductor.core.execution.ExecutorUtils.java
- Now both old (org.conductoross) and new (com.netflix) packages have ExecutorUtils
- No files moved, both versions exist
… revert WorkflowExecutorOps and TestWorkflowSweeper
- Added ExecutionLockService with explicit acquireLock/releaseLock
- Changed from decideWithLock() to decide() after acquiring lock
- Lock is now acquired at start of sweep() and released in finally block
- Aligns OSS WorkflowSweeper locking pattern with OrkesWorkflowSweeper
- Makes OSS the common base implementation for both OSS and Orkes

This fix ensures workflows are properly locked before running decide,
preventing race conditions and concurrent modifications.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add @Autowired annotation to setEnvironment() method to ensure Spring
properly injects Environment instance. This enables legacy property
fallback logic in @PostConstruct init() method during integration tests.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
manan164 and others added 13 commits January 30, 2026 14:44
Update AbstractSpecification in both test-harness and test-util to import
WorkflowSweeper from new package location org.conductoross.conductor.core.execution
instead of deprecated com.netflix.conductor.core.reconciliation package.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…-from-old-sweeper

Make WorkflowSweeper simpler and robust.
Annotation support for system task workers
@v1r3n
v1r3n merged commit 640537e into ai_module Jan 31, 2026
11 checks passed
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.

2 participants