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

Update Core #376

Merged
merged 8 commits into from
Dec 4, 2024
Merged

Update Core #376

merged 8 commits into from
Dec 4, 2024

Conversation

Sushisource
Copy link
Member

@Sushisource Sushisource commented Dec 4, 2024

Updating core to separate those changes from the PR for slot suppliers #372

Which I will rebase after this is merged

Makes it easier to run this without local tooling,
which is a massive pain on linux
@Sushisource Sushisource mentioned this pull request Dec 4, 2024
@@ -1227,7 +1227,7 @@ await ExecuteWorkerAsync<MiscHelpersWorkflow>(
// Now query after close to check that is replaying worked
var isReplayingValues = await Env.Client.GetWorkflowHandle<MiscHelpersWorkflow>(
workflowId).QueryAsync(wf => wf.GetEventsForIsReplaying());
Assert.Equal(new[] { false, true }, isReplayingValues);
Assert.Equal(new[] { false, true, true }, isReplayingValues);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is also due to the evict-on-finish change

Copy link
Member

Choose a reason for hiding this comment

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

Took me a sec to grok what was happening here. But now I see that on line 1214 above we issue a post-complete query which now causes full replay where it didn't before

@@ -538,8 +538,25 @@ public WorkflowActivationCompletion Activate(WorkflowActivation act)
{
// We must set the sync context to null so work isn't posted there
SynchronizationContext.SetSynchronizationContext(null);
// TODO: Temporary workaround in lieu of https://github.com/temporalio/sdk-dotnet/issues/375
var sortedJobs = act.Jobs.OrderBy(j =>
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit surprised we didn't order before. But I assume this order by matches previous Core versions before this update? Meaning we feel fairly confident that replays will work the same on .NET SDK upgrade here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this doesn't change anything. It matches the previous Core ordering

src/Temporalio/Worker/WorkflowInstance.cs Outdated Show resolved Hide resolved
@@ -1715,6 +1732,7 @@ public override Task DelayAsync(DelayAsyncInput input)
{
Seq = seq,
StartToFireTimeout = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(delay),
Summary = instance.PayloadConverter.ToPayload(string.Empty),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Summary = instance.PayloadConverter.ToPayload(string.Empty),

I think we want this to be null instead of a full payload (and we will add if summary is present as part of #359). Is there some kind of check Core-side forcing us to set this?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I was confused by something going on in one of the tests and forgot to clean this up

@@ -1227,7 +1227,7 @@ await ExecuteWorkerAsync<MiscHelpersWorkflow>(
// Now query after close to check that is replaying worked
var isReplayingValues = await Env.Client.GetWorkflowHandle<MiscHelpersWorkflow>(
workflowId).QueryAsync(wf => wf.GetEventsForIsReplaying());
Assert.Equal(new[] { false, true }, isReplayingValues);
Assert.Equal(new[] { false, true, true }, isReplayingValues);
Copy link
Member

Choose a reason for hiding this comment

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

Took me a sec to grok what was happening here. But now I see that on line 1214 above we issue a post-complete query which now causes full replay where it didn't before

@Sushisource Sushisource merged commit c219615 into main Dec 4, 2024
8 checks passed
@Sushisource Sushisource deleted the core-update branch December 4, 2024 17:27
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