Python: Re-enable Azure OpenAI integration tests#6839
Open
giles17 wants to merge 1 commit into
Open
Conversation
Restore the env-based `skip_if_azure_openai_integration_tests_disabled` guard in the three Azure OpenAI test modules. These integration tests were temporarily hard-skipped in #6753 because they crashed the pytest-xdist runner in the merge queue (tracked in #6777). Verified locally: 36 passed, 1 skipped (pre-existing image-content skip), 0 failed when run serially. Re-enabling here to validate them in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Re-enables the Python Azure OpenAI integration test coverage by restoring conditional, environment-driven skipping logic (instead of unconditional skipping) in the Azure-specific OpenAI test modules. This aligns with the repo’s approach of running live-service integration tests only when real Azure configuration is present.
Changes:
- Replaced unconditional
pytest.mark.skip(...)withpytest.mark.skipif(...)guards driven byAZURE_OPENAI_ENDPOINTand the relevant deployment env vars. - Updated skip reasons to reflect missing/placeholder Azure configuration rather than CI runner instability.
- Applied the same pattern across chat (responses), chat-completions, and embeddings Azure integration test modules.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/packages/openai/tests/openai/test_openai_chat_client_azure.py | Restores env-based skip guard for Azure OpenAI responses integration tests. |
| python/packages/openai/tests/openai/test_openai_chat_completion_client_azure.py | Restores env-based skip guard for Azure OpenAI chat-completions integration tests. |
| python/packages/openai/tests/openai/test_openai_embedding_client_azure.py | Restores env-based skip guard for Azure OpenAI embeddings integration tests. |
Contributor
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 & Context
The Azure OpenAI integration tests were temporarily hard-skipped in #6753 because they were crashing the pytest-xdist runner in the merge queue (all workers reporting
node down: Not properly terminated). That work is tracked for re-enablement in #6777.Local investigation shows the tests themselves are healthy — they pass when run serially. The CI failure was a runner crash under high xdist parallelism against live Azure services, not a test defect. This PR re-enables the tests so we can validate them in CI (where the required Azure secrets are available).
Description & Review Guide
What are the major changes?
skip_if_azure_openai_integration_tests_disabledguard (pytest.mark.skipif(...)) in the three Azure OpenAI test modules, reverting the unconditionalpytest.mark.skip(...)introduced in Python: bump package versions for 1.10.0 release #6753:packages/openai/tests/openai/test_openai_chat_client_azure.pypackages/openai/tests/openai/test_openai_chat_completion_client_azure.pypackages/openai/tests/openai/test_openai_embedding_client_azure.pyWhat is the impact of these changes?
Related Issue
Part of #6777
Contribution Checklist