Skip to content

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
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

// 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

{
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

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