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

Initial workflow client #14

Merged
merged 13 commits into from
Jan 30, 2023
Prev Previous commit
Next Next commit
PR fixes
  • Loading branch information
cretz committed Jan 24, 2023
commit e5464e004662d055b69d376e7eb6976a81bcb68d
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
with:
toolchain: stable

# Needed for tests currently
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: stable

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ bin/
obj/
/src/Temporalio/Bridge/target
/tests/Temporalio.Tests/TestResults
/tests/golangworker/golangworker
/.vs
/.vscode
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public virtual Task<WorkflowHandle<TResult>> StartWorkflowAsync<TResult>(
return Next.StartWorkflowAsync<TResult>(input);
}

// TODO(cretz): Document that this never returns an empty page while with a next page token
// is set (i.e. it immediately uses that token internally)

/// <summary>
/// Intercept a history event page fetch.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Temporalio/Client/TemporalClient.Workflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public override async Task<WorkflowHistoryEventPage> FetchWorkflowHistoryEventPa
resp.History.Events,
resp.NextPageToken.IsEmpty ? null : resp.NextPageToken.ToByteArray());
}
cretz marked this conversation as resolved.
Show resolved Hide resolved
req.NextPageToken = resp.NextPageToken;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Temporalio/Converters/ConverterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static Payload ToSearchAttributePayload(
}
if (value is DateTime dateTimeValue)
{
// 8601 with convert with timezone
// 8601 with timezone
value = dateTimeValue.ToString("o");
}
else if (value is not IEnumerable<string> && !value.GetType().IsPrimitive)
Expand Down
3 changes: 2 additions & 1 deletion tests/Temporalio.Tests/WorkflowEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public async Task DisposeAsync()
private KitchenSinkWorker StartKitchenSinkWorker()
{
// Build
var workerDir = Path.Join(TestUtils.CallerFilePath(), "../../golangworker");
var workerDir = Path.Join(
Path.GetDirectoryName(TestUtils.CallerFilePath())!, "../golangworker");
var exePath = Path.Join(workerDir, "golangworker");
var proc = Process.Start(new ProcessStartInfo("go")
{
Expand Down
Binary file removed tests/golangworker/golangworker
Binary file not shown.