Keep online endpoint/deployment operations pinned to workspace scope for registry-backed clients - #48325
Open
Chakradhar886 with Copilot wants to merge 4 commits into
Open
Keep online endpoint/deployment operations pinned to workspace scope for registry-backed clients#48325Chakradhar886 with Copilot wants to merge 4 commits into
Chakradhar886 with Copilot wants to merge 4 commits into
Conversation
…d clients Co-authored-by: Chakradhar886 <259224138+Chakradhar886@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Chakradhar886
July 29, 2026 06:16
View session
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
…0 chars) Co-authored-by: Chakradhar886 <259224138+Chakradhar886@users.noreply.github.com>
Chakradhar886
marked this pull request as ready for review
July 29, 2026 11:07
Chakradhar886
requested review from
JustinFirsching,
NonStatic2014,
achauhan-scc,
arunsu,
jayesh-tanna,
kingernupur,
nick863,
novaturient95,
rtanase,
sharma-riti and
vivram
as code owners
July 29, 2026 11:08
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Pins online endpoint and deployment operations to workspace scope while preserving registry scope for assets.
Changes:
- Adds workspace-scoped online operation clients and scopes.
- Adds regression coverage for mixed workspace/registry configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
azure/ai/ml/_ml_client.py |
Routes online operations through workspace-scoped clients. |
tests/internal_utils/unittests/test_ml_client.py |
Tests workspace and registry scope isolation. |
Comment on lines
+549
to
+563
| online_endpoint_scope = captured["OnlineEndpointOperations"]["scope"] | ||
| online_deployment_scope = captured["OnlineDeploymentOperations"]["scope"] | ||
| model_scope = captured["ModelOperations"]["scope"] | ||
| data_scope = captured["DataOperations"]["scope"] | ||
|
|
||
| assert online_endpoint_scope.subscription_id == workspace_sub | ||
| assert online_endpoint_scope.resource_group_name == workspace_rg | ||
| assert online_endpoint_scope.workspace_name == workspace_name | ||
| assert online_deployment_scope.subscription_id == workspace_sub | ||
| assert online_deployment_scope.resource_group_name == workspace_rg | ||
| assert online_deployment_scope.workspace_name == workspace_name | ||
| assert model_scope.subscription_id == registry_sub | ||
| assert model_scope.resource_group_name == registry_rg | ||
| assert data_scope.subscription_id == registry_sub | ||
| assert data_scope.resource_group_name == registry_rg |
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.
Online deployment requests could be sent to the registry resource group when a client was initialized to consume registry assets and target a workspace in a different resource group. In that configuration, endpoint/deployment operations looked up the workspace endpoint under the wrong RG and failed with
ResourceNotFound.Scope isolation for online operations
OperationScopefor online endpoint and online deployment operations.Dedicated service clients for online calls
OnlineEndpointOperationsandOnlineDeploymentOperationsthrough those workspace-scoped clients instead of the registry-shifted shared scope.Regression coverage
MLClientwith a registry plusworkspace_referenceand asserts:Behavioral effect