Skip to content

Conversation

@IgorChvyrov-sm
Copy link
Contributor

@IgorChvyrov-sm IgorChvyrov-sm commented Oct 29, 2025

Changes:

  1. Refactored ResourcApis to use facade pattern
  2. Updated Orkes clients to serialize objects returned from codegen to python models
  3. Added deprecation warnings for methods in Orkes clients and for attributes in OrkesBaseClient

Deprecated functionality:

  1. Asynchronous OrkesAuthorizationClient (src/conductor/asyncio_client/orkes/orkes_authorization_client.py):
  • create_user() - replaced with create_user_validated() (returns a validated ConductorUserAdapter)
  • update_user() - replaced with update_user_validated() (returns a validated ConductorUserAdapter)
  • create_group() - replaced with create_group_validated() (returns a validated GroupAdapter)
  • add_user_to_group() - replaced with add_user_to_group_validated() (returns None instead of object)
  • remove_user_from_group() - replaced with remove_user_from_group_validated() (returns None instead of object)
  • get_users_in_group() - replaced with get_users_in_group_validated() (returns a validated List[ConductorUserAdapter])
  • grant_permissions() - replaced with grant_permissions_validated() (returns None instead of object)
  • remove_permissions() - replaced with remove_permissions_validated() (returns None instead of object)
  • get_permissions() - replaced with get_permissions_validated() (returns a validated Dict[str, List[SubjectRefAdapter]])
  • create_access_key() - replaced with create_access_key_validated() (returns a validated CreatedAccessKeyAdapter)
  • get_access_keys() - replaced with get_access_keys_validated() (returns a validated List[AccessKeyAdapter])
  • toggle_access_key_status() - replaced with toggle_access_key_status_validated() (returns a validated AccessKeyAdapter)
  1. Asynchronous OrkesMetadataClient (src/conductor/asyncio_client/orkes/orkes_metadata_client.py):
  • register_task_def() - replaced with register_task_def_validated() (task_def argument was renamed to extended_task_def and its type changed from ExtendedTaskDefAdapter to List[ExtendedTaskDefAdapter])
  • get_task_def() - replaced with get_task_def_validated() (returns a validated TaskDefAdapter)
  • create_workflow_def() - replaced with create_workflow_def_validated() (returns None instead of object)
  • update_workflow_defs() - replaced with update_workflow_defs_validated() (returns None instead of object)
  • register_workflow_def() - replaced with register_workflow_def_validated() (returns None instead of object)
  • update_workflow_def() - replaced with async def update_workflow_def_validated() (returns None instead of object)
  1. Asynchronous OrkesPromptClient (src/conductor/asyncio_client/orkes/orkes_prompt_client.py):
  • put_tag_for_prompt_template() - replaced with update_tag_for_prompt_template() (renamed to follow naming from Synchronous OrkesPromptClient)
  1. Asynchronous OrkesSchedulerClient (src/conductor/asyncio_client/orkes/orkes_scheduler_client.py):
  • save_schedule() - replaced with save_schedule_validated() (returns None instead of object)
  • delete_schedule() - replaced with delete_schedule_validated() (returns None instead of object)
  • pause_schedule() - replaced with pause_schedule_validated() (returns None instead of object)
  • resume_schedule() - replaced with resume_schedule_validated() (returns None instead of object)
  • pause_all_schedules() - replaced with pause_all_schedules_validated() (returns None instead of Dict[str, object])
  • resume_all_schedules() - replaced with resume_all_schedules_validated() (returns None instead of object)
  • search_schedules() - replaced with search_schedule_executions() (renamed to follow naming from Synchronous OrkesSchedulerClient)
  • get_next_few_schedules() - replaced with get_next_few_schedule_execution_times() (renamed to follow naming from Synchronous OrkesSchedulerClient)
  • put_tag_for_schedule() - replaced with set_tags_for_schedule() (renamed to follow naming from Synchronous OrkesSchedulerClient)
  • get_tags_for_schedule() - replaced with get_scheduler_tags() (renamed to follow naming from Synchronous OrkesSchedulerClient)
  • delete_tag_for_schedule() - replaced with delete_scheduler_tags() (renamed to follow naming from Synchronous OrkesSchedulerClient)
  • requeue_all_execution_records() - replaced with requeue_all_execution_records_validated() (returns None instead of Dict[str, object])
  • create_schedule() - replaced with create_schedule_validated() (returns None instead of object)
  • update_schedule() - replaced with update_schedule_validated() (returns None instead of object)
  1. Asynchronous OrkesSchemaClient (src/conductor/asyncio_client/orkes/orkes_schema_client.py):
  • save_schemas() - replaced with register_schemas() (renamed to follow naming from Synchronous OrkesSchemaClient)
  • save_schema() - replaced with register_schema() (renamed to follow naming from Synchronous OrkesSchemaClient)
  1. Asynchronous OrkesSecretClient (src/conductor/asyncio_client/orkes/orkes_secret_client.py):
  • put_secret() - replaced with put_secret_validated() (returns None instead of object)
  • delete_secret() - replaced with delete_secret_validated() (returns None instead of object)
  • secret_exists() - replaced with secret_exists_validated() (returns bool instead of object)
  • clear_local_cache() - replaced with clear_local_cache_validated() (returns None instead of Dict[str, str])
  • clear_redis_cache() - replaced with clear_redis_cache_validated() (returns None instead of Dict[str, str])
  • update_secret() - replaced with update_secret_validated() (returns None instead of Dict[str, str])
  • has_secret() - replaced with has_secret_validated() (returns bool instead of object)
  1. Asynchronous OrkesTaskClient (src/conductor/asyncio_client/orkes/orkes_task_client.py):
  • poll_for_task() - replaced with poll_task() (renamed to follow naming from Synchronous OrkesTaskClient)
  • poll_for_task_batch() - replaced with batch_poll_tasks() (renamed to follow naming from Synchronous OrkesTaskClient)
  • get_poll_data() - replaced with get_task_poll_data() (renamed to follow naming from Synchronous OrkesTaskClient)
  • log_task() - replaced with add_task_log() (renamed to follow naming from Synchronous OrkesTaskClient)
  • get_queue_size_for_task_type() - replaced with get_queue_size_for_task() (renamed to follow naming from Synchronous OrkesTaskClient)
  1. Asynchronous OrkesWorkflowClient (src/conductor/asyncio_client/orkes/orkes_workflow_client.py):
  • decide_workflow() - replaced with decide() (renamed to follow naming from Synchronous OrkesWorkflowClient)
  1. Synchronous OrkesMetadataClient (src/conductor/client/orkes/orkes_metadata_client.py):
  • register_workflow_def() - replaced with register_workflow_def_validated() (returns None instead of object)
  • update_workflow_def() - replaced with update_workflow_def_validated() (returns None instead of object)
  • register_task_def() - replaced with register_task_def_validated() (returns None instead of object)
  • get_task_def() - replaced with get_task_def_validated() (returns a validated TaskDef)
  • get_workflow_tags() - replaced with get_workflow_tags_validated() (returns a validated List[Tag])
  • addTaskTag() - replaced with add_task_tag() (renamed to follow snake_case)
  • deleteTaskTag() - replaced with delete_task_tag() (renamed to follow snake_case)
  • getTaskTags() - replaced with get_task_tags() (renamed to follow snake_case)
  • setTaskTags() - replaced with set_task_tags() (renamed to follow snake_case)
  • setWorkflowRateLimit() - replaced with set_workflow_rate_limit() (renamed to follow snake_case)
  • getWorkflowRateLimit() - replaced with get_workflow_rate_limit() (renamed to follow snake_case)
  • removeWorkflowRateLimit() - replaced with remove_workflow_rate_limit() (renamed to follow snake_case)
  1. Synchronous OrkesSchedulerClient (src/conductor/client/orkes/orkes_scheduler_client.py):
  • set_scheduler_tags() - replaced with set_scheduler_tags_validated() (tags type changed from List[MetadataTag] to List[Tag])
  • delete_scheduler_tags() - replaced with delete_scheduler_tags_validated() (tags type changed from List[MetadataTag] to List[Tag])
  1. Synchronous OrkesSchemaClient (src/conductor/client/orkes/orkes_schema_client.py):
  • delete_schema() - replaced with delete_schema_by_name_and_version() (renamed to make naming more informative)
  1. Synchronous OrkesSecretClient (src/conductor/client/orkes/orkes_secret_client.py):
  • list_all_secret_names() - replaced with list_all_secret_names_validated() (returns List[str] instead of Set[str])
  1. Synchronous OrkesWorkflowClient (src/conductor/client/orkes/orkes_workflow_client.py):
  • start_workflow_by_name() - replaced with start_workflow_by_name_validated() (renamed correlationId argument to correlation_id)
  1. OrkesBaseClient (src/conductor/client/orkes/orkes_base_client.py and src/conductor/asyncio_client/orkes/orkes_base_client.py):

All legacy *ResourceApi attributes (e.g. metadataResourceApi, workflowResourceApi, taskResourceApi, etc.) are now deprecated.
Each of these APIs now has a dedicated facade client that should be used instead:

  • OrkesMetadataClient
  • OrkesWorkflowClient
  • OrkesTaskClient
  • OrkesAuthorizationClient
  • OrkesSchedulerClient
  • OrkesSecretClient
  • OrkesTagsClient
  • OrkesIntegrationClient
  • OrkesPromptClient
  • OrkesSchemaClient
  • OrkesServiceRegistryClient
  • OrkesEventClient

All deprecated attributes now emit DeprecationWarning and are annotated with @deprecated and @typing_deprecated.

  1. Added docstrings for methods in Orkes clients
  2. Added unit and integration tests for new methods

Reason:
Improve code quality and user experience

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 77.93881% with 548 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...tor/asyncio_client/orkes/orkes_scheduler_client.py 63.70% 45 Missing ⚠️
...lient/adapters/api/webhooks_config_resource_api.py 0.00% 31 Missing ⚠️
src/conductor/client/orkes/orkes_base_client.py 72.47% 30 Missing ⚠️
...onductor/asyncio_client/orkes/orkes_base_client.py 72.54% 28 Missing ⚠️
..._client/adapters/api/workflow_bulk_resource_api.py 0.00% 27 Missing ⚠️
...io_client/adapters/api/environment_resource_api.py 0.00% 26 Missing ⚠️
.../asyncio_client/adapters/api/admin_resource_api.py 0.00% 20 Missing ⚠️
...io_client/adapters/api/integration_resource_api.py 60.78% 20 Missing ⚠️
...lient/adapters/api/event_execution_resource_api.py 0.00% 16 Missing ⚠️
...yncio_client/adapters/api/workflow_resource_api.py 78.12% 14 Missing ⚠️
... and 57 more
Files with missing lines Coverage Δ
...io_client/adapters/api/application_resource_api.py 100.00% <100.00%> (+2.70%) ⬆️
..._client/adapters/api/authorization_resource_api.py 100.00% <100.00%> (ø)
...asyncio_client/adapters/api/schema_resource_api.py 100.00% <100.00%> (ø)
...yncio_client/adapters/models/access_key_adapter.py 100.00% <100.00%> (ø)
...ient/adapters/models/created_access_key_adapter.py 100.00% <100.00%> (ø)
...lient/adapters/models/workflow_schedule_adapter.py 89.47% <100.00%> (ø)
...adapters/models/workflow_schedule_model_adapter.py 89.47% <100.00%> (ø)
src/conductor/asyncio_client/adapters/utils.py 100.00% <100.00%> (ø)
...ctor/asyncio_client/configuration/configuration.py 97.67% <ø> (ø)
src/conductor/asyncio_client/event/event_client.py 86.36% <ø> (ø)
... and 106 more

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IgorChvyrov-sm IgorChvyrov-sm marked this pull request as ready for review November 5, 2025 09:31
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