Set up E2E testing infrastructure aligned with durabletask-python#74
Set up E2E testing infrastructure aligned with durabletask-python#74YunchuWang merged 14 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR sets up E2E testing infrastructure for durabletask-js aligned with the durabletask-python approach, using durabletask-go sidecar for standard tests and DTS emulator for Azure-managed tests.
Changes:
- Split CI workflow into separate lint/unit and E2E test jobs with Node.js 18.x, 20.x, 22.x matrix
- Replaced Docker-based sidecar with
durabletask-gobinary in standard E2E tests (matching Python SDK approach) - Added new Azure-managed E2E test suite using DTS emulator container
- Created supporting scripts and npm commands for local testing
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/orchestration.spec.ts | Added documentation comments explaining the durabletask-go sidecar requirement and setup |
| test/e2e-azuremanaged/orchestration.spec.ts | New Azure-managed test suite with 9 tests using DTS emulator (port 8080) |
| scripts/test-e2e.sh | Updated comments to document alignment with Python SDK testing approach |
| scripts/test-e2e-azuremanaged.sh | New script to run Azure-managed E2E tests locally with DTS emulator |
| package.json | Added npm scripts for Azure-managed E2E tests |
| .github/workflows/pr-validation.yaml | Refactored into separate jobs with Node.js matrix and durabletask-go sidecar |
| .github/workflows/dts-e2e-tests.yaml | New workflow for DTS emulator E2E tests with Node.js matrix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # run your container | ||
| echo "Starting DTS emulator" | ||
| docker run \ | ||
| --name dts-emulator -d --rm \ |
There was a problem hiding this comment.
The container name used in the script is "dts-emulator" (with hyphen), but in the GitHub workflow file .github/workflows/dts-e2e-tests.yaml line 36, it's "dtsemulator" (no hyphen). While this won't cause issues in CI since the workflow doesn't call this script, it creates an inconsistency that could confuse developers and potentially cause issues if someone tries to use both. Standardize the container name across both files.
Co-Authored-By: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
1eba3ca to
e54df6f
Compare
…to copilot/setup-e2e-testing-backend
This pull request introduces significant improvements to the Azure Managed gRPC client and worker for Durable Task, focusing on how metadata (such as authentication tokens and task hub information) is handled for both secure and insecure connections. It also enhances CI workflows and developer tooling. The most important changes are grouped below.
gRPC Metadata Handling Improvements
createMetadataGeneratorandcreateChannelCredentialsmethods in bothDurableTaskAzureManagedClientOptionsandDurableTaskAzureManagedWorkerOptionsto provide a unified, promise-based metadata generator for per-call metadata. This ensures that metadata (including auth tokens and headers) is consistently and securely attached to each gRPC call, regardless of connection security. Metadata is now passed per-call for insecure connections and via channel credentials for secure connections. [1] [2] [3] [4] [5]DurableTaskAzureManagedClientBuilderandDurableTaskAzureManagedWorkerBuilderto inject the new metadata generator into the core gRPC client/worker, ensuring correct metadata handling. [1] [2] [3] [4]TaskHubGrpcClientto accept an optionalmetadataGeneratorparameter, allowing metadata to be dynamically generated for each call. [1] [2] [3]Testing and CI Enhancements
dts-e2e-tests.yaml) to run end-to-end tests against the Durable Task Scheduler (DTS) emulator, increasing test coverage for Azure-managed scenarios.Developer Tooling and Compatibility