Skip to content

Comments

Howie/sample test report#45208

Merged
howieleung merged 6 commits intofeature/azure-ai-projects/2.0.0b4from
howie/sample-test-report
Feb 18, 2026
Merged

Howie/sample test report#45208
howieleung merged 6 commits intofeature/azure-ai-projects/2.0.0b4from
howie/sample-test-report

Conversation

@howieleung
Copy link
Member

@howieleung howieleung commented Feb 16, 2026

Always create reports for sample test during live mode. In .env.template, I recommend report name to have the word, passed, failed, or errors.
OpenAPI client write url, request and response by print statement that had been captured into the report. On the other hand, our emitted code write url, request and response content into logger that wasn't captured into the report. Now I capture them.
No matter how hard I fine tune the LLM instruction, LLM still thinks couple of samples have improper outputs although the outputs are valid. So I add feature to add them as exception and let the test pass.

Copilot AI review requested due to automatic review settings February 16, 2026 05:49
@howieleung howieleung changed the base branch from main to feature/azure-ai-projects/2.0.0b4 February 16, 2026 05:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds optional logging functionality to the sample test executor framework for the azure-ai-projects SDK. The primary purpose is to provide better debugging capabilities by capturing sample execution output (print statements) to log files when tests fail, pass, or encounter validation errors.

Changes:

  • Added two new logging methods (_write_error_log and _write_success_log) that conditionally write captured output to temp directory files based on environment variables
  • Enhanced exception handling in execute and execute_async methods to log output before re-raising exceptions
  • Updated validation result assertion to log both successful and failed validation results
  • Added environment variable templates for configuring log file naming patterns

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
sdk/ai/azure-ai-projects/tests/samples/sample_executor.py Implements core logging infrastructure with two new methods for writing error/success logs, integrates logging into execution and validation workflows
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_azure_function.py Minor formatting fix removing an extraneous blank line
sdk/ai/azure-ai-projects/.env.template Documents the new environment variables for configuring log file names

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-projects

@howieleung
Copy link
Member Author

/azp run python - pullrequest

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@howieleung howieleung merged commit 102f164 into feature/azure-ai-projects/2.0.0b4 Feb 18, 2026
20 checks passed
@howieleung howieleung deleted the howie/sample-test-report branch February 18, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants