Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates test recordings and adds comprehensive test coverage for resource management samples (connections, files, deployments, and datasets) in the azure-ai-projects SDK. The changes also improve dataset samples by making the CONNECTION_NAME environment variable optional with automatic fallback to default Azure Storage connections.
Changes:
- Added four new test methods (connections, files, deployments, datasets) for both sync and async sample execution with LLM-based validation using resource_management_instructions
- Enhanced dataset samples to automatically resolve default Azure Storage connections when CONNECTION_NAME is not provided
- Added sanitizers for GitHub personal access tokens and improved SAS URI sanitization in test recordings
- Removed "sample_agent_openapi.py" from the skip list to enable testing
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/tests/samples/test_samples_helpers.py | Added resource_management_instructions for validating resource-focused sample output |
| sdk/ai/azure-ai-projects/tests/samples/test_samples_async.py | Added async test methods for connections, files, deployments, and datasets samples |
| sdk/ai/azure-ai-projects/tests/samples/test_samples.py | Added sync test methods for connections, files, deployments, and datasets samples; removed "sample_agent_openapi.py" from skip list |
| sdk/ai/azure-ai-projects/tests/conftest.py | Added GitHub PAT sanitizer and improved SAS URI sanitization with full URL format |
| sdk/ai/azure-ai-projects/samples/datasets/sample_datasets_download.py | Made CONNECTION_NAME optional, added get_default() fallback, improved output messages |
| sdk/ai/azure-ai-projects/samples/datasets/sample_datasets_async.py | Made CONNECTION_NAME optional, added get_default() fallback with comprehensive error handling |
| sdk/ai/azure-ai-projects/samples/datasets/sample_datasets.py | Made CONNECTION_NAME optional, added get_default() fallback with comprehensive error handling |
| sdk/ai/azure-ai-projects/assets.json | Updated test recording tag reference |
Comments suppressed due to low confidence (1)
sdk/ai/azure-ai-projects/samples/datasets/sample_datasets_async.py:23
- There is inconsistent indentation in the documentation. Line 23 has an extra leading space before "2)" that should be removed to match the formatting of other numbered items in the list.
2) CONNECTION_NAME - Optional. The name of the Azure Storage Account connection to use for uploading files.
dargilco
reviewed
Feb 24, 2026
sdk/ai/azure-ai-projects/samples/datasets/sample_datasets_download.py
Outdated
Show resolved
Hide resolved
dargilco
approved these changes
Feb 24, 2026
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.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines