Skip to content

Conversation

@v1r3n
Copy link
Contributor

@v1r3n v1r3n commented Dec 25, 2025

Summary

This PR introduces comprehensive authorization client support and critical concurrency improvements for the Conductor Python SDK. It adds a full-featured authorization client for managing applications, users, groups, and access keys in Orkes Conductor, along with significant bug
fixes for async task execution and worker thread safety.

Key Changes

🔐 Authorization & Authentication

  • New Authorization Client (orkes_authorization_client.py): Complete implementation for managing:
    • Applications (create, update, delete, list)
    • Users and groups management
    • Access keys lifecycle (create, toggle status, delete)
    • Role-based access control
    • Application tags and metadata
  • Enhanced Authentication: Improved token refresh with graceful fallback for Conductor OSS (404 handling)
  • Authorization Examples: New comprehensive journey examples (authorization_journey.py)

🔧 Concurrency & Performance Fixes

  • Thread Safety: Fixed race conditions in Worker._pending_async_tasks with proper locking
  • Async Task Runner:
    • Added graceful shutdown support
    • Improved resource cleanup with context manager support
    • Fixed task cleanup issues (removed manual cleanup, using add_done_callback)
  • Semaphore Management: Proper semaphore usage for entire task lifecycle to prevent exceeding thread limits

📚 Documentation Improvements

  • Reorganized documentation structure (moved from nested README.md files to top-level docs)
  • New comprehensive guides:
    • AUTHORIZATION.md - Complete authorization guide
    • INTEGRATION.md - Integration patterns
    • METADATA.md - Metadata management
    • WORKFLOW_TESTING.md - Testing strategies
    • AGENTS.md - Agent patterns

🧪 Testing

  • New test suites for concurrency issues:
    • test_concurrency_bugs.py - Reproduces race conditions
    • test_concurrency_fixes.py - Validates fixes
    • test_python_style_improvements.py - Style improvements

🎯 Additional Improvements

  • Enhanced prompt template support with improved models
  • Better workflow schedule management
  • Updated examples with real-world scenarios
  • Improved API client error handling

Breaking Changes

None - All changes are backward compatible.

@mp-orkes mp-orkes self-requested a review January 9, 2026 21:09
Copy link

@mp-orkes mp-orkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Client for AuthZ and concurrency fixes
@v1r3n v1r3n merged commit ea63569 into main Jan 10, 2026
1 check passed
@v1r3n v1r3n deleted the authz_client branch January 10, 2026 18:07
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.

3 participants