refactor(remote): rework remote submission code#601
Merged
michael-johnston merged 27 commits intomaj_execution_contextsfrom Feb 24, 2026
Merged
refactor(remote): rework remote submission code#601michael-johnston merged 27 commits intomaj_execution_contextsfrom
michael-johnston merged 27 commits intomaj_execution_contextsfrom
Conversation
Made with Bob Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
It's now required for remote execution Signed-off-by: Alessandro Pomponio <alessandro.pomponio1@ibm.com>
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
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
--remoteinstead of--execution-contextin ado cliargvarguments to thedispatchmethodAdoConfiguration's builtin validation instead of custom validation forProjectContextRemoteSubmissionFlagSpec,RemoteSubmissionFlagMatch,ParsedRemoteSubmissionFlagspydantic models for handling flags for remote submissionorchestrator/cli/utils/remote/arg_parser.pyorchestrator/cli/utils/remote/dispatch.pyuvto dependenciesAI - generated PR changes
Summary
This pull request refactors the remote execution feature by renaming
ExecutionContexttoRemoteExecutionContext, changing the CLI flag from--execution-contextto--remote, and introducing a more maintainable, extensible argument parsing system for remote submission preparation.Files Changed
📄
orchestrator/cli/core/cli.pyRefactored the CLI entry point to use the new
--remoteflag instead of--execution-context. Updated thecommon_optionsfunction to useRemoteExecutionContextand simplified_handle_remote_dispatchto pass theProjectContextinstance directly instead of a file path, eliminating the need to resolve context file paths.📄
orchestrator/cli/core/config.pyRemoved
ExecutionContexttracking fromAdoConfiguration. The_execution_contextfield and its accessor methods (execution_contextproperty andset_execution_contextmethod) were deleted as they are no longer needed.📄
orchestrator/cli/models/__init__.pyAdded module-level exports for the new remote submission flag models and specifications, making them available for import from the models package.
📄
orchestrator/cli/models/remote_submission.pyNew file introducing a declarative, data-driven approach to handling CLI flags during remote submission preparation. Defines
RemoteSubmissionFlagSpecfor flag specifications,RemoteSubmissionFlagMatchfor parsed flag instances, andParsedRemoteSubmissionFlagsfor parsing results. Includes predefined flag specifications (REMOTE_FLAG,CONTEXT_FLAG,FILE_FLAG,WITH_FLAG) and flag groups for common operations.📄
orchestrator/cli/utils/remote/__init__.pyAdded module-level exports for remote dispatch utilities, including the new flag models and parsing functions.
📄
orchestrator/cli/utils/remote/arg_parser.pyNew file providing position-aware argument parsing utilities. Implements
parse_argv_with_positionsfor parsing argv with position tracking,strip_flagsfor removing specified flags, andrewrite_flag_valuesfor transforming flag values. Replaces ad-hoc argument parsing with a generic, reusable approach.📄
orchestrator/cli/utils/remote/dispatch.pyRefactored the remote dispatch implementation to use
RemoteExecutionContextand the new argument parser. Updateddispatchto accept aProjectContextinstance instead of a file path, serializing it directly to YAML. Replaced manual argument parsing with calls tostrip_flagsandrewrite_flag_values. Updated_copy_files_and_rewrite_argsto use the new parsing utilities. ChangedclusterUrlto usepydantic.HttpUrltype.📄
orchestrator/core/remotecontext/__init__.pyRenamed from
orchestrator/core/executioncontext/__init__.py. Updated exports to useRemoteExecutionContextinstead ofExecutionContext.📄
orchestrator/core/remotecontext/config.pyRenamed from
orchestrator/core/executioncontext/config.py. RenamedExecutionContexttoRemoteExecutionContext. ChangedclusterUrlinClusterExecutionTypeto usepydantic.HttpUrlwith validation constraints instead of manual URL validation, removing the customvalidate_cluster_urlmethod.📄
requirements.txtAdded
uv==0.10.4dependency with multiple platform-specific hashes for secure installation.📄
tests/ado/test_remote_submission.pyRenamed from
tests/ado/test_remote_dispatch.py. Comprehensive test suite updates to reflect the renaming and new argument parsing system. Added tests for the genericstrip_flagsandrewrite_flag_valuesfunctions, flag specification matching, and edge cases. Updated all test fixtures and assertions to useRemoteExecutionContextand the new flag models.📄
tests/core/test_executioncontext.pyUpdated all tests to use
RemoteExecutionContextinstead ofExecutionContext. Updated assertions to account forclusterUrlnow being apydantic.HttpUrl(which includes trailing slash in string representation).