test: Test fixes#1874
Open
gavin-aguiar wants to merge 17 commits into
Open
Conversation
…-worker into gaaguiar/ci_pipelines_update
…re/azure-functions-python-worker into gaaguiar/ci_pipelines_update
f0715b4 to
d66c05b
Compare
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
Speed up CI pipelines and fix flaky / failing tests
Performance
• Switch pip → uv in all install scripts and CI templates ( install-dependencies.sh , test-sdk.sh , test-extensions.sh , ci-dependency-check.yml , ci-fc-tests.yml ) for faster dependency resolution. Batched the worker installs into a single resolver pass.
• Enable real pytest-xdist parallelism: unit tests -n auto , emulator tests -n 2 , E2E kept serial (shared Azure resources). --dist loadfile alone was previously a no-op without -n .
• Build only the WebHost project instead of the whole WebJobs.Script.sln (~2.7x faster, far less disk, avoids restoring unrelated projects from the internal feed). Added set -e to test-setup.sh so build failures surface instead of being masked.
• Removed unused dev deps ( ptvsd , pre-commit , pytest-sugar , pytest-randomly ) from all three pyproject.toml .
• Split the install step into separate "Python deps (uv)" and "webhost build (dotnet)" stages so timings are visible.
Test reliability
• Fixed flaky test_unhandled_error (all 3 variants): the traceback is forwarded to the host asynchronously, so the log-check snapshot raced it. Added WebHostTestCase.wait_for_host_log() to wait for the line before asserting.
• Replaced the racy time.sleep(10) webhost startup with a real readiness probe polling /admin/host/status for Running (with master key).
• Fixed Azurite "InvalidHeaderValue" in emulator tests via --skipApiVersionCheck --loose ; added a ServiceBus emulator readiness wait.
Python 3.14 / version compatibility
• Made runtimes/v{1,2} installs and the uamqp-based ServiceBus binding install conditional (uv enforces requires-python ); loosened the fastapi pin to resolve a dev vs test-http-v2 conflict.
• Gated TestServiceBusSDKFunctions to Python 3.13 only (the binding needs protobuf ≥6.32/grpcio ≥1.74, incompatible with the ≤3.12 worker's pins).
New coverage
• Added a Flex Consumption test verifying blob SDK (deferred) bindings load under Flex ( BlobSdkBindings.zip fixture + test_blob_sdk_bindings , gated to 3.14).
Fixes #
Pull Request Checklist
Host-Worker Contract
Worker Execution Logic
If yes, please answer the following:
Python Version Coverage
Programming Model Compatibility (for Python 3.13+)