Python: Tuning auto sample validation workflow#4218
Merged
Conversation
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tunes the Python sample validation workflow by consolidating setup steps into a reusable composite action, standardizing configuration across jobs, and improving report output visibility. The changes aim to streamline CI/CD for automated sample testing using GitHub Copilot agents. Two complex sample categories (04-hosting and 05-end-to-end) are temporarily disabled due to their complexity.
Changes:
- Created a new composite action (sample-validation-setup) that consolidates Node.js setup, Copilot CLI installation, Azure login, and Python setup into a single reusable step
- Standardized environment variable configuration across all validation jobs, moving from secrets to vars for most configuration values
- Enhanced report output by adding result sorting (failures first) and JSON output for better GitHub Actions visibility
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/python-sample-validation.yml | Updated all validation jobs to use the new composite action, standardized environment variables from secrets to vars, added global Copilot configuration, and disabled complex sample jobs |
| .github/actions/sample-validation-setup/action.yml | New composite action that consolidates environment setup including Node.js, Copilot CLI, Azure login, and Python installation |
| python/samples/_sample_validation/report.py | Added sorting to prioritize failures/errors in reports and JSON output for GitHub Actions visibility |
| python/samples/_sample_validation/create_dynamic_workflow_executor.py | Improved agent instructions for clarity and corrected punctuation |
Comments suppressed due to low confidence (1)
.github/workflows/python-sample-validation.yml:273
- Inconsistent GitHub variable references for OpenAI configuration. This job uses vars.OPENAI_CHAT_MODEL_ID and vars.OPENAI_RESPONSES_MODEL_ID (lines 272-273), while the validate-autogen-migration job uses vars.OPENAI_CHAT_MODEL_NAME and vars.OPENAI_REASONING_MODEL_NAME (lines 231-232). Both are setting the same environment variables (OPENAI_CHAT_MODEL_ID and OPENAI_RESPONSES_MODEL_ID), so they should reference the same GitHub variables. Additionally, other integration test workflows in this repository consistently use vars.OPENAI__CHATMODELID and vars.OPENAI__RESPONSESMODELID. All jobs should use the same variable names from GitHub vars.
OPENAI_CHAT_MODEL_ID: ${{ vars.OPENAI_CHAT_MODEL_ID }}
OPENAI_RESPONSES_MODEL_ID: ${{ vars.OPENAI_RESPONSES_MODEL_ID }}
Member
moonbox3
approved these changes
Feb 27, 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.
Motivation and Context
The current sample auto validation workflow is just a placeholder so that we can test the workflow in GH actions.
Description
This PR makes the workflow works and improves the sample validation scripts.
We have many failing samples. Will fix in another PR.
Contribution Checklist