Skip to content

Add FailureDetailsProvider E2E Test for Node - #3463

Merged
Naiyuan Tian (nytian) merged 16 commits into
devfrom
nytian/js-e2e-test-failure-details
Oct 20, 2026
Merged

Naiyuan Tian (nytian) merged 16 commits into
devfrom
nytian/js-e2e-test-failure-details

Conversation

@nytian

@nytian Naiyuan Tian (nytian) commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Add e2e test for custom exception provider for Node

Copilot AI lite review requested due to automatic review settings July 10, 2026 21:53

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

Adds end-to-end coverage for surfacing custom exception properties into FailureDetails.Properties when running Durable Functions with the Node (JavaScript) SDK, including a nested orchestration scenario to validate InnerFailure propagation.

Changes:

  • Enables the existing custom-exception-properties FailureDetails test for Node (and adds Node-specific assertions for JSON/protobuf type differences).
  • Adds a BasicNode function implementation that registers an ExceptionPropertiesProvider and throws a custom exception carrying structured properties.
  • Updates the BasicNode AzureManaged extension package reference.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/e2e/Tests/Tests/ErrorHandlingTests.cs Runs FailureDetails custom-properties validation for Node and adds a new nested FailureDetails propagation E2E test.
test/e2e/Apps/BasicNode/src/Shared/ExceptionTypes.ts Introduces a BusinessValidationException type to carry structured properties in Node.
test/e2e/Apps/BasicNode/src/functions/CustomExceptionProperties.ts Registers an exception-properties provider and adds orchestrations/activities used by the new/updated E2E tests.
test/e2e/Apps/BasicNode/extensions.csproj Bumps the AzureManaged extension package used by the BasicNode E2E app.

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

Copilot AI review requested due to automatic review settings July 17, 2026 21:17

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings August 12, 2026 03:52

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Use the SDK release that includes custom exception properties support required by the Node E2E tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 12, 2026 04:12

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Copilot AI review requested due to automatic review settings August 13, 2026 21:30

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Copilot AI review requested due to automatic review settings August 19, 2026 16:37

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file
Suppressed comments (1)

test/e2e/Tests/Tests/ErrorHandlingTests.cs:272

  • The Node-specific DateTime assertion uses Convert.ToDateTime(...), which is culture-sensitive and can become flaky depending on the test runner culture/format settings. Since the value is an ISO-8601 string from the JS SDK, parse it using invariant culture and assume/adjust to UTC.
            // Verify DateTime property (sent as ISO-8601 string by the JS SDK)
            Assert.True(failureDetails.Properties.ContainsKey("DateTimeProperty"));
            Assert.Equal(
                new DateTime(2025, 10, 15, 14, 30, 0, DateTimeKind.Utc),
                Convert.ToDateTime(failureDetails.Properties["DateTimeProperty"]).ToUniversalTime());

Copilot AI review requested due to automatic review settings August 20, 2026 16:27

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Copilot AI review requested due to automatic review settings August 20, 2026 18:54

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file
Suppressed comments (1)

test/e2e/Apps/BasicNode/src/functions/CustomExceptionProperties.ts:42

  • The value used for LongProperty (999999999) is still within the 32-bit integer range, so this scenario doesn’t actually validate that a 64-bit value round-trips correctly (or that int vs long differences are handled). Consider using a value > int.MaxValue but < 2^53 (e.g., 3000000000) and updating the corresponding C# assertions to strengthen the test signal.
    throw new BusinessValidationException(
        "Business logic validation failed",
        "validation-error-123",
        100,
        999999999,
        "2025-10-15T14:30:00.000Z",

Copilot AI lite review requested due to automatic review settings October 20, 2026 03:09

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.

🟢 Approval recommended

No unresolved review issues were identified.

3 open issues
1 file not reviewed
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 20, 2026 04:02

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.

🟢 Approval recommended

No unresolved review issues were identified.

3 open issues
1 file not reviewed
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Review effort: Lite

Copilot AI lite review requested due to automatic review settings October 20, 2026 16:11

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.

🟢 Approval recommended

No unresolved review issues were identified.

No open issues 🎉

3 resolved since last review
1 file not reviewed
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Review effort: Lite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings October 20, 2026 16:25

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.

🔵 Needs a closer look

Restore or retain DTS exclusions until backend support is available.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Restore DTS exclusion until FailureDetails support is added

test/​e2e/​Tests/​Tests/​ErrorHandlingTests.cs:228

This hunk removes the existing DTS exclusion, so the test is now scheduled in the DTS backend lane (language-e2e.yml:171-215) even though the removed comment records that DTS did not support FailureDetails properties. This PR only adds the Node provider and does not add a DTS capability change, so the new Node assertions can fail there instead of validating the intended Node path. Keep the DTS skip until that backend support is available (or add the corresponding backend change).

Medium severity Add DTS exclusion for Node-only nested test

test/​e2e/​Tests/​Tests/​ErrorHandlingTests.cs:347

The new nested test is also selected for the DTS backend, but unlike the existing FailureDetails test it has no DTS exclusion. That schedules a second scenario against the backend that the surrounding test matrix previously documented as unsupported; add the backend skip (or only remove it once DTS support is confirmed) so this Node-only test does not fail in the DTS lane for an unrelated reason.

1 file not reviewed
  • test/e2e/Apps/BasicNode/package-lock.json: Generated file

Review effort: Lite

@nytian
Naiyuan Tian (nytian) merged commit 47404c9 into dev Oct 20, 2026
36 checks passed
@nytian
Naiyuan Tian (nytian) deleted the nytian/js-e2e-test-failure-details branch October 20, 2026 22:02
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