-
Notifications
You must be signed in to change notification settings - Fork 272
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
[WIP] Re-add ScheduledStartTime to orchestration scheduling in .NET isolated #2805
base: v2.x
Are you sure you want to change the base?
Conversation
InstanceIdStartsWith = query.InstanceIdStartsWith, | ||
LastModifiedFrom = query.LastModifiedFrom?.ToDateTime(), | ||
LastModifiedTo = query.LastModifiedTo?.ToDateTime(), | ||
IncludeTransient = query.IncludeTransient, | ||
IncludeState = query.IncludeState, | ||
ContinuationToken = query.ContinuationToken, | ||
PageSize = query.PageSize, | ||
InstanceIdStartsWith = query.InstanceIdStartsWith, | ||
LastModifiedFrom = query.LastModifiedFrom?.ToDateTime(), | ||
LastModifiedTo = query.LastModifiedTo?.ToDateTime(), | ||
IncludeTransient = query.IncludeTransient, | ||
IncludeState = query.IncludeState, | ||
ContinuationToken = query.ContinuationToken, | ||
PageSize = query.PageSize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ran a formatter and it fixed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I wonder if we should also use TaskHubClient
in other locations in this file? Probably for another PR/time.
string instanceId = await this.GetClient(context).StartNewAsync( | ||
request.Name, request.InstanceId, Raw(request.Input)); | ||
string instanceId = request.InstanceId ?? Guid.NewGuid().ToString("N"); | ||
TaskHubClient taskhubClient = new TaskHubClient(this.GetDurabilityProvider(context)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to also provider ILoggerFactory
to the ctor
TaskHubClient taskhubClient = new TaskHubClient(this.GetDurabilityProvider(context)); | ||
|
||
// TODO: Ideally, we'd have a single method in the taskhubClient that can handle both scheduled and non-scheduled starts. | ||
// TODO: the type of `ScheduledStartTimestamp` is not nullable. Can we change it to `DateTime?` in the proto file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe proto uses its own type: Timestamp
, which is an object, so it can be null
(whereas DateTime
and DateTimeOffset
are structs). So no, we cannot change it to DateTime?
.
string instanceId = request.InstanceId ?? Guid.NewGuid().ToString("N"); | ||
TaskHubClient taskhubClient = new TaskHubClient(this.GetDurabilityProvider(context)); | ||
|
||
// TODO: Ideally, we'd have a single method in the taskhubClient that can handle both scheduled and non-scheduled starts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was addressed in the durable-dotnet DurableTaskClient
abstraction.
await taskhubClient.CreateOrchestrationInstanceAsync(request.Name, request.Version, instanceId, Raw(request.Input)); | ||
} | ||
|
||
// TODO: should this not inclide the ExecutionId and other elements of the taskhubClient response? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never included those in the proto. Something to consider for later.
…e-extension into dajusto/add-scheduletime-dotnet-isolated
Hi, Is there any update on this? Several users are stuck trying to use the startAt and we can't ;( |
This is missing some tests still unfortunately. Looking to get back to this soon, but have some urgent competing threads at the moment. If anyone is willing to contribute some tests in the meantime (described in the PR description), I'd be happy to incorporate them. |
We are approaching 11 months since the ticket was open presenting this defect. Any ETA when this will be available? |
Is this missing anything else now that @cgillum's comments have been resolved? |
Thanks a million @cgillum and @davidmrdavid for bringing this closer to its completion. Any idea about when we can expect this to be shipped? |
Why has this pull request stalled? When can we expect these changes to be published? We are now at 13 months since this defect was opened. |
Sorry for the delay. David has moved to a different team and @andystaples and I should be able to take over this PR shortly. We're currently setting up some new end-to-end test infrastructure to make sure these kinds of regressions don't happen again. Fingers crossed that we can have this done and merged in the next couple weeks. 🤞 |
Follow up to:
#2634
#2544 (comment)
Fixes: microsoft/durabletask-dotnet#256
When refactoring the localGrpcListener (used by .NET isolated and Java) to use an IDurableClient (necessary for Distributed Tracing), we accidentally dropped the ability to set an orchestrator's "fireAt" time. This PR adds that back.
Since the IDurableClient does not expose functionality for scheduled orchestrators, this PR constructs the
TaskHubClient
, which does expose that functionality. It also leaves a few "TODO" comments to simplify the implementation in the future.Sitll pending:
* Manual E2E test
* Inclusion of distributed tracing regression test
* Inclusion of test of scheduled orchestrations test.
Issue describing the changes in this PR
resolves microsoft/durabletask-dotnet#256
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs