Skip to content

Conversation

@stephanos
Copy link
Collaborator

@stephanos stephanos commented Jul 29, 2025

What was changed

Framework for checking kitchensink actions across SDKs.

(more tests to be added later ...)

Why?

To ensure actions are supported correctly and comprehensively; and document missing implementations.

Especially for new actions this helps ensure you've implemented them correctly.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@stephanos stephanos force-pushed the kitchensink-validation branch 2 times, most recently from cd53095 to 1215eaa Compare August 1, 2025 19:48
stephanos added a commit that referenced this pull request Aug 5, 2025
<!--- Note to EXTERNAL Contributors -->
<!-- Thanks for opening a PR! 
If it is a significant code change, please **make sure there is an open
issue** for this.
We work best with you when we have accepted the idea first before you
code. -->

<!--- For ALL Contributors 👇 -->

## What was changed
<!-- Describe what has changed in this PR -->

Move code to build and start worker from `main` into `workers` package.

No behavior change expected.

## Why?
<!-- Tell your future self why have you made these changes -->

Reusability. The [kitchensink parity
test](#180) needs to start
workers for testing.

## Checklist
<!--- add/delete as needed --->

1. Closes <!-- add issue number here -->

2. How was this tested:
<!--- Please describe how you tested your changes/how we can test them
-->

3. Any docs updates needed?
<!--- update README if applicable
      or point out where to update docs.temporal.io -->
@stephanos stephanos changed the title Kitchensink parity test Kitchensink test Aug 5, 2025
@stephanos stephanos force-pushed the kitchensink-validation branch 3 times, most recently from d83fd6a to 838e3c1 Compare August 5, 2025 23:06
Comment on lines -44 to -48
scenarioName := r.ScenarioID.Scenario()
scenario := loadgen.GetScenario(scenarioName)
if scenario == nil {
return fmt.Errorf("scenario %v not found", scenarioName)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not needed; already done by caller.


echo "Installing .NET $DOTNET_VERSION..."
mise use dotnet-core@"$DOTNET_VERSION"
mise use dotnet@"$DOTNET_VERSION"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

core was not sufficient, actually.

func (r *workerRunner) preRun() {
r.builder.preRun()
r.Runner.Builder = r.builder.Builder
r.TaskQueueName = loadgen.TaskQueueForRun(r.ScenarioID.Scenario, r.ScenarioID.RunID)
Copy link
Collaborator Author

@stephanos stephanos Aug 5, 2025

Choose a reason for hiding this comment

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

Moved here to avoid circular dependency on loadgen.

Comment on lines +12 to +13
Scenario string
RunID string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Simpler than the getters, actually.

args = append(args, "--build-arg", arg)
}
args = append(args, rootDir())
args = append(args, repoDir())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think repo is clearer than root.

throw new ApplicationFailure('ExecuteNexusOperation is not supported');
} else {
throw new ApplicationFailure('Unknown action ' + JSON.stringify(action));
throw new ApplicationFailure('unrecognized action ' + JSON.stringify(action));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The other SDKs all call it that.

@stephanos stephanos force-pushed the kitchensink-validation branch from 838e3c1 to b8e75e3 Compare August 5, 2025 23:09
Comment on lines +250 to +252
func BaseDir(repoDir string, lang cmdoptions.Language) string {
return filepath.Join(repoDir, "workers", lang.String())
}
Copy link
Collaborator Author

@stephanos stephanos Aug 5, 2025

Choose a reason for hiding this comment

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

Made reusable.

PS: Can't hide this detail since the caller often wants to cleanup this dir; if we hide it internally, they don't know what to cleanup.

@stephanos stephanos force-pushed the kitchensink-validation branch 10 times, most recently from 5eac796 to a9c0069 Compare August 6, 2025 00:20
@stephanos stephanos closed this Aug 6, 2025
@stephanos stephanos force-pushed the kitchensink-validation branch from a9c0069 to aa6de40 Compare August 6, 2025 00:26
@stephanos stephanos reopened this Aug 6, 2025
@stephanos stephanos force-pushed the kitchensink-validation branch from c76810a to f635e08 Compare August 6, 2025 00:29
@stephanos stephanos force-pushed the kitchensink-validation branch 15 times, most recently from 2a22bc0 to 6d3cb6c Compare August 6, 2025 17:21
severity: error

build-lint-test-go:
test-omes:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this since the CI wasn't actually running the Omes tests themselves.

@stephanos stephanos force-pushed the kitchensink-validation branch 2 times, most recently from 6699ae9 to a7be1b2 Compare August 6, 2025 17:39
@stephanos stephanos marked this pull request as ready for review August 6, 2025 17:47
@stephanos stephanos requested a review from Sushisource August 6, 2025 17:47
@stephanos stephanos force-pushed the kitchensink-validation branch from a7be1b2 to f8a4d45 Compare August 6, 2025 22:43
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Dude this is slick. I saw the history matching thing at first and alarm bells went off but when I saw what it was, it's cool. A lot like some of the tests in Core.

if: ${{ !inputs.do-push || github.event.pull_request.head.repo.fork }}
with:
go-version: '^1.24'
go-version-file: 'go.mod'
Copy link
Member

Choose a reason for hiding this comment

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

Whaaaat you can do that?

Fields map[string]any
}

func requireHistoryMatches(t *testing.T, actualEvents []*historypb.HistoryEvent, expectedSpec string) {
Copy link
Member

Choose a reason for hiding this comment

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

Doc of the expected spec would be very welcome here. I was worried at first this was a much tighter match than it actually is.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call! 👍 The whole thing is inspired by Alex's version in OSS Server, but much much shorter (partly thanks to Claude).

@stephanos stephanos force-pushed the kitchensink-validation branch from b177b99 to eeb920e Compare August 6, 2025 23:30
@stephanos stephanos closed this Aug 7, 2025
@stephanos stephanos reopened this Aug 7, 2025
Comment on lines +116 to +125
WorkflowExecutionStarted
WorkflowTaskScheduled
WorkflowTaskStarted
WorkflowTaskCompleted
TimerStarted {"startToFireTimeout":"0.001s"}
TimerFired
WorkflowTaskScheduled
WorkflowTaskStarted
WorkflowTaskCompleted
WorkflowExecutionCompleted`,

Choose a reason for hiding this comment

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

Server has printHistory helper func to print history in this format. You might want it here too.

@stephanos stephanos merged commit 784fcda into main Aug 7, 2025
64 checks passed
@stephanos stephanos deleted the kitchensink-validation branch August 7, 2025 16:42
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.

4 participants