feat(training): support Foundry storage connections - #9568
Conversation
Preserve named output asset metadata, allow selecting a storage connection for local uploads, and pass through azureai dataset references. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ae5c051-9d4b-4017-9a48-670d3611949b
|
Azure Pipelines: 7 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds Foundry storage connection support and named training output assets.
Changes:
- Adds YAML/CLI storage connection configuration.
- Preserves
azureai://code and input references. - Maps
asset_nameandasset_versioninto job outputs with tests and docs.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents new job options. |
pkg/models/dataset.go |
Adds upload connection serialization. |
pkg/models/dataset_test.go |
Tests request wire format. |
pkg/client/datasets.go |
Sends the storage connection. |
internal/utils/yaml_parser.go |
Parses new fields and URI scheme. |
internal/utils/yaml_parser_test.go |
Tests YAML parsing and URI preservation. |
internal/service/upload_service.go |
Propagates connection configuration. |
internal/service/upload_service_test.go |
Tests connection propagation. |
internal/service/resolver_test.go |
Covers remote azureai:// references. |
internal/cmd/job_submit.go |
Adds CLI override and output mapping. |
internal/cmd/job_submit_test.go |
Tests flags, precedence, and outputs. |
internal/cmd/init_template.go |
Adds storage configuration guidance. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ae5c051-9d4b-4017-9a48-670d3611949b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ae5c051-9d4b-4017-9a48-670d3611949b
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Suppressed comments (2)
cli/azd/extensions/azure.ai.training/internal/cmd/init_template.go:76
- [azd-code-reviewer] The generated file still declares the Azure ML command-job schema, whose top-level
additionalProperties: falsedoes not include this extension-only property. As soon as a user uncomments this line, YAML tooling reportsstorage_connection_nameas invalid even though the CLI accepts it. Update the template to use a schema that includes the extension fields, remove the incompatible$schema, or avoid advertising the field in this schema-bound template.
# storage_connection_name: <optional Foundry storage connection for local uploads>
cli/azd/extensions/azure.ai.training/README.md:20
- [azd-code-reviewer] This is not the complete default output:
job submitalways callsPrintObject, and its default--outputformat is JSON (job_submit.go:139,160). Label this as the initial status output and mention the following JSON result so users do not mistake the example for the command's full stdout.
Expected output:
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ae5c051-9d4b-4017-9a48-670d3611949b
|
Addressed the latest suppressed review feedback in
The earlier cross-connection deduplication comment was addressed in |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Suppressed comments (1)
cli/azd/extensions/azure.ai.training/pkg/models/dataset.go:23
- azd-code-reviewer: The linked design documentation still describes this request as containing only
pendingUploadType(design/design.md:500-504,design/execution-plan.md:411-414) and showsStartPendingUploadwithout a connection argument (design/design.md:981,design/execution-plan.md:518). Update those request examples and signatures to include the optionalconnectionName, otherwise the extension's design reference contradicts the new API behavior.
ConnectionName string `json:"connectionName,omitempty"` // Optional Foundry storage connection
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2ae5c051-9d4b-4017-9a48-670d3611949b
|
Addressed the final multi-agent Standards findings in
Full extension tests, build, vet, |
|
/check-enforcer override |
Fixes #9569
Summary
asset_nameandasset_versionfor training job outputsstorage_connection_nameand--storage-connection-nameazureai://code and input references instead of treating them as local pathsCross-connection deduplication issue
Previously, local upload versions were derived only from the content hash. If content had already been uploaded using default storage, submitting the same content with
--storage-connection-namecould reuse the default-storage dataset and never callstartPendingUploadfor the requested connection. This can reproduce the original storage-resolution failure even after the user selects a working BYOS connection.The dataset version remains content-hash based for default storage. For an explicit connection, it is deterministically derived from both the content hash and connection name, preserving deduplication within a connection while preventing reuse across connections.
Validation
go test ./... -count=1go build ./...go vet ./...git diff --checkgo fix -diff ./...