Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for orchestrator termination #3023

Merged
merged 9 commits into from
Feb 4, 2025

Conversation

andystaples
Copy link
Contributor

Adds a test for orchestrator termination to the new E2E test suite

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v2.x branch.
    • Otherwise: This change applies exclusively to WebJobs.Extensions.DurableTask v3.x. It will be retained only in the dev and main branches and will not be merged into the v2.x branch.

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

Glad to see we have these tests, and that they're exposing issues. I've added a few minor comments.

var outputs = new List<string>();

// Call our fake activity 100,000 times to simulate an orchestration that might run for >= 10,000s (2.7 hours)
for (int i = 0; i < 100000; i++)
Copy link
Member

Choose a reason for hiding this comment

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

I worry that a large fan-out like this may make the test unstable on the low-powered CI machines due to the memory and I/O requirements. Do we need a fan-out at all or could we just use an orchestration that sleeps for a long time or waits for an external event?

Copy link
Contributor Author

@andystaples andystaples Feb 4, 2025

Choose a reason for hiding this comment

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

This isn't a fan-out though, the activities are called sequentially. I agree, it's overkill though since most of the tests run in well under a minute, I can shorten it, the idea behind writing the orchestrator this way was to demonstrate what might cause an orchestration with problematic runtime.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry, I misread the code. OK, I'm less worried about this then.

test/e2e/Tests/Helpers/DurableHelpers.cs Outdated Show resolved Hide resolved
test/e2e/Tests/Helpers/DurableHelpers.cs Outdated Show resolved Hide resolved
test/e2e/Tests/Tests/TerminateOrchestratorTests.cs Outdated Show resolved Hide resolved
test/e2e/Tests/Tests/TerminateOrchestratorTests.cs Outdated Show resolved Hide resolved
Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

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

LGTM - just one small ask but otherwise I think this can be merged when you're ready.

@andystaples andystaples merged commit 0db8bcb into dev Feb 4, 2025
6 checks passed
@andystaples andystaples deleted the andystaples/add-terminate-orchestrator-test branch February 4, 2025 20:25
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.

2 participants