Skip to content

Set up E2E testing infrastructure aligned with durabletask-python#74

Merged
YunchuWang merged 14 commits intomainfrom
copilot/setup-e2e-testing-backend
Jan 28, 2026
Merged

Set up E2E testing infrastructure aligned with durabletask-python#74
YunchuWang merged 14 commits intomainfrom
copilot/setup-e2e-testing-backend

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 22, 2026

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

  • Refactored the createMetadataGenerator and createChannelCredentials methods in both DurableTaskAzureManagedClientOptions and DurableTaskAzureManagedWorkerOptions to 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]
  • Updated DurableTaskAzureManagedClientBuilder and DurableTaskAzureManagedWorkerBuilder to inject the new metadata generator into the core gRPC client/worker, ensuring correct metadata handling. [1] [2] [3] [4]
  • Enhanced TaskHubGrpcClient to accept an optional metadataGenerator parameter, allowing metadata to be dynamically generated for each call. [1] [2] [3]

Testing and CI Enhancements

  • Added a new GitHub Actions workflow (dts-e2e-tests.yaml) to run end-to-end tests against the Durable Task Scheduler (DTS) emulator, increasing test coverage for Azure-managed scenarios.
  • Refactored the main PR validation workflow to split lint/unit tests and E2E tests, and to run E2E tests across multiple Node.js versions using the Go-based sidecar. [1] [2]
  • Added new NPM scripts for Azure-managed E2E testing, and updated ignore patterns to avoid linting auto-generated version files. [1] [2]

Developer Tooling and Compatibility

  • Updated TypeScript build configuration to ensure correct module resolution for internal dependencies.
  • Updated unit tests to use the new async metadata generator API, improving reliability and clarity of test cases. [1] [2] [3]

@YunchuWang YunchuWang changed the title [WIP] Add E2E testing backend setup for durabletask-python [WIP] Add E2E testing backend setup Jan 22, 2026
Comment thread .github/workflows/dts-e2e-tests.yaml Fixed
Comment thread .github/workflows/pr-validation.yaml Fixed
Copilot AI changed the title [WIP] Add E2E testing backend setup Set up E2E testing infrastructure aligned with durabletask-python Jan 22, 2026
Copilot AI requested a review from YunchuWang January 22, 2026 19:54
@torosent torosent requested a review from Copilot January 26, 2026 17:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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-go binary 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 \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread test/e2e-azuremanaged/orchestration.spec.ts Outdated
Comment thread test/e2e-azuremanaged/orchestration.spec.ts Outdated
Co-Authored-By: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
@YunchuWang YunchuWang force-pushed the copilot/setup-e2e-testing-backend branch from 1eba3ca to e54df6f Compare January 28, 2026 17:17
@YunchuWang YunchuWang marked this pull request as ready for review January 28, 2026 22:28
@YunchuWang YunchuWang merged commit cb2d5ac into main Jan 28, 2026
7 checks passed
@YunchuWang YunchuWang deleted the copilot/setup-e2e-testing-backend branch January 28, 2026 22:36
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.

5 participants