-
Notifications
You must be signed in to change notification settings - Fork 37
Feature migrate adapters to facade pattern #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IgorChvyrov-sm
wants to merge
22
commits into
feature_mypy_support
Choose a base branch
from
feature_migrate_adapters_to_facade_pattern
base: feature_mypy_support
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature migrate adapters to facade pattern #355
IgorChvyrov-sm
wants to merge
22
commits into
feature_mypy_support
from
feature_migrate_adapters_to_facade_pattern
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…warnings for public properties
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Deprecated functionality:
src/conductor/asyncio_client/orkes/orkes_authorization_client.py):create_user()- replaced withcreate_user_validated()(returns a validatedConductorUserAdapter)update_user()- replaced withupdate_user_validated()(returns a validatedConductorUserAdapter)create_group()- replaced withcreate_group_validated()(returns a validatedGroupAdapter)add_user_to_group()- replaced withadd_user_to_group_validated()(returnsNoneinstead ofobject)remove_user_from_group()- replaced withremove_user_from_group_validated()(returnsNoneinstead ofobject)get_users_in_group()- replaced withget_users_in_group_validated()(returns a validatedList[ConductorUserAdapter])grant_permissions()- replaced withgrant_permissions_validated()(returnsNoneinstead ofobject)remove_permissions()- replaced withremove_permissions_validated()(returnsNoneinstead ofobject)get_permissions()- replaced withget_permissions_validated()(returns a validatedDict[str, List[SubjectRefAdapter]])create_access_key()- replaced withcreate_access_key_validated()(returns a validatedCreatedAccessKeyAdapter)get_access_keys()- replaced withget_access_keys_validated()(returns a validatedList[AccessKeyAdapter])toggle_access_key_status()- replaced withtoggle_access_key_status_validated()(returns a validatedAccessKeyAdapter)src/conductor/asyncio_client/orkes/orkes_metadata_client.py):register_task_def()- replaced withregister_task_def_validated()(task_defargument was renamed toextended_task_defand its type changed fromExtendedTaskDefAdaptertoList[ExtendedTaskDefAdapter])get_task_def()- replaced withget_task_def_validated()(returns a validatedTaskDefAdapter)create_workflow_def()- replaced withcreate_workflow_def_validated()(returnsNoneinstead ofobject)update_workflow_defs()- replaced withupdate_workflow_defs_validated()(returnsNoneinstead ofobject)register_workflow_def()- replaced withregister_workflow_def_validated()(returnsNoneinstead ofobject)update_workflow_def()- replaced withasync def update_workflow_def_validated()(returnsNoneinstead ofobject)src/conductor/asyncio_client/orkes/orkes_prompt_client.py):put_tag_for_prompt_template()- replaced withupdate_tag_for_prompt_template()(renamed to follow naming from Synchronous OrkesPromptClient)src/conductor/asyncio_client/orkes/orkes_scheduler_client.py):save_schedule()- replaced withsave_schedule_validated()(returnsNoneinstead ofobject)delete_schedule()- replaced withdelete_schedule_validated()(returnsNoneinstead ofobject)pause_schedule()- replaced withpause_schedule_validated()(returnsNoneinstead ofobject)resume_schedule()- replaced withresume_schedule_validated()(returnsNoneinstead ofobject)pause_all_schedules()- replaced withpause_all_schedules_validated()(returnsNoneinstead ofDict[str, object])resume_all_schedules()- replaced withresume_all_schedules_validated()(returnsNoneinstead ofobject)search_schedules()- replaced withsearch_schedule_executions()(renamed to follow naming from Synchronous OrkesSchedulerClient)get_next_few_schedules()- replaced withget_next_few_schedule_execution_times()(renamed to follow naming from Synchronous OrkesSchedulerClient)put_tag_for_schedule()- replaced withset_tags_for_schedule()(renamed to follow naming from Synchronous OrkesSchedulerClient)get_tags_for_schedule()- replaced withget_scheduler_tags()(renamed to follow naming from Synchronous OrkesSchedulerClient)delete_tag_for_schedule()- replaced withdelete_scheduler_tags()(renamed to follow naming from Synchronous OrkesSchedulerClient)requeue_all_execution_records()- replaced withrequeue_all_execution_records_validated()(returnsNoneinstead ofDict[str, object])create_schedule()- replaced withcreate_schedule_validated()(returnsNoneinstead ofobject)update_schedule()- replaced withupdate_schedule_validated()(returnsNoneinstead ofobject)src/conductor/asyncio_client/orkes/orkes_schema_client.py):save_schemas()- replaced withregister_schemas()(renamed to follow naming from Synchronous OrkesSchemaClient)save_schema()- replaced withregister_schema()(renamed to follow naming from Synchronous OrkesSchemaClient)src/conductor/asyncio_client/orkes/orkes_secret_client.py):put_secret()- replaced withput_secret_validated()(returnsNoneinstead ofobject)delete_secret()- replaced withdelete_secret_validated()(returnsNoneinstead ofobject)secret_exists()- replaced withsecret_exists_validated()(returnsboolinstead ofobject)clear_local_cache()- replaced withclear_local_cache_validated()(returnsNoneinstead ofDict[str, str])clear_redis_cache()- replaced withclear_redis_cache_validated()(returnsNoneinstead ofDict[str, str])update_secret()- replaced withupdate_secret_validated()(returnsNoneinstead ofDict[str, str])has_secret()- replaced withhas_secret_validated()(returnsboolinstead ofobject)src/conductor/asyncio_client/orkes/orkes_task_client.py):poll_for_task()- replaced withpoll_task()(renamed to follow naming from Synchronous OrkesTaskClient)poll_for_task_batch()- replaced withbatch_poll_tasks()(renamed to follow naming from Synchronous OrkesTaskClient)get_poll_data()- replaced withget_task_poll_data()(renamed to follow naming from Synchronous OrkesTaskClient)log_task()- replaced withadd_task_log()(renamed to follow naming from Synchronous OrkesTaskClient)get_queue_size_for_task_type()- replaced withget_queue_size_for_task()(renamed to follow naming from Synchronous OrkesTaskClient)src/conductor/asyncio_client/orkes/orkes_workflow_client.py):decide_workflow()- replaced withdecide()(renamed to follow naming from Synchronous OrkesWorkflowClient)src/conductor/client/orkes/orkes_metadata_client.py):register_workflow_def()- replaced withregister_workflow_def_validated()(returnsNoneinstead ofobject)update_workflow_def()- replaced withupdate_workflow_def_validated()(returnsNoneinstead ofobject)register_task_def()- replaced withregister_task_def_validated()(returnsNoneinstead ofobject)get_task_def()- replaced withget_task_def_validated()(returns a validatedTaskDef)get_workflow_tags()- replaced withget_workflow_tags_validated()(returns a validatedList[Tag])addTaskTag()- replaced withadd_task_tag()(renamed to follow snake_case)deleteTaskTag()- replaced withdelete_task_tag()(renamed to follow snake_case)getTaskTags()- replaced withget_task_tags()(renamed to follow snake_case)setTaskTags()- replaced withset_task_tags()(renamed to follow snake_case)setWorkflowRateLimit()- replaced withset_workflow_rate_limit()(renamed to follow snake_case)getWorkflowRateLimit()- replaced withget_workflow_rate_limit()(renamed to follow snake_case)removeWorkflowRateLimit()- replaced withremove_workflow_rate_limit()(renamed to follow snake_case)src/conductor/client/orkes/orkes_scheduler_client.py):set_scheduler_tags()- replaced withset_scheduler_tags_validated()(tagstype changed fromList[MetadataTag]toList[Tag])delete_scheduler_tags()- replaced withdelete_scheduler_tags_validated()(tagstype changed fromList[MetadataTag]toList[Tag])src/conductor/client/orkes/orkes_schema_client.py):delete_schema()- replaced withdelete_schema_by_name_and_version()(renamed to make naming more informative)src/conductor/client/orkes/orkes_secret_client.py):list_all_secret_names()- replaced withlist_all_secret_names_validated()(returnsList[str]instead ofSet[str])src/conductor/client/orkes/orkes_workflow_client.py):start_workflow_by_name()- replaced withstart_workflow_by_name_validated()(renamedcorrelationIdargument tocorrelation_id)src/conductor/client/orkes/orkes_base_client.pyandsrc/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:
All deprecated attributes now emit DeprecationWarning and are annotated with @deprecated and @typing_deprecated.
Reason:
Improve code quality and user experience