Skip to content

Remove pytest-azurepipelines plugin to fix Python 3.14 stall#936

Merged
Robbie-Microsoft merged 1 commit into
devfrom
ryauld/fix-py314-timeout
Jun 22, 2026
Merged

Remove pytest-azurepipelines plugin to fix Python 3.14 stall#936
Robbie-Microsoft merged 1 commit into
devfrom
ryauld/fix-py314-timeout

Conversation

@RyAuld

@RyAuld RyAuld commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Python 3.14 unit tests intermittently stall at 99-100% completion, hanging until the 5-minute step timeout. All other Python versions (3.9–3.13) complete in ~1.5 minutes. See #935.

Root Cause

The \pytest-azurepipelines\ plugin hooks into pytest's session finalization to upload test results to ADO. On Python 3.14, this intermittently hangs the process.

Evidence: Tests pass locally on Python 3.14 in 51 seconds (304 passed) without the plugin installed.

Fix

Remove \pytest-azurepipelines\ from pip install — it's unnecessary since:

  • --junitxml\ already captures test results to XML
  • The \PublishTestResults\ task handles uploading to ADO

Testing

  • Local Python 3.14: 304 passed in 50.98s ✅
  • CI results from this PR will confirm the fix across all versions

The pytest-azurepipelines plugin hooks into session finalization to
upload test results to ADO. On Python 3.14 this intermittently causes
the process to hang until the step timeout. The plugin is unnecessary
since test results are already captured via --junitxml and published
by the PublishTestResults task.

Tests pass locally on Python 3.14 without the plugin (304 passed in 51s).

Ref: #935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 22, 2026 19:38
@RyAuld RyAuld requested a review from a team as a code owner June 22, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the shared Azure Pipelines stages template to prevent intermittent pytest hangs on Python 3.14 by removing the pytest-azurepipelines plugin from the CI install step, relying instead on existing --junitxml output and PublishTestResults tasks for reporting.

Changes:

  • Remove pytest-azurepipelines from the dependency install commands in both UnitTests and E2ETests stages.
  • Keep JUnit XML generation + PublishTestResults@2 as the mechanism for publishing test results to Azure DevOps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Robbie-Microsoft Robbie-Microsoft merged commit 62a8047 into dev Jun 22, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants