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

[Nexus] Set OnConflictOptions for WorkflowRunOperation #1797

Merged
merged 3 commits into from
Feb 24, 2025

Conversation

rodrigozhou
Copy link
Contributor

@rodrigozhou rodrigozhou commented Jan 30, 2025

What was changed

Add OnConflictOptions to StartWorkflowOptions, and set it for Nexus WorkflowRunOperation.

Tests are done in #1828

Why?

Enabling attaching callbacks to running Nexus workflows.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@rodrigozhou rodrigozhou requested a review from a team as a code owner January 30, 2025 19:32
@cretz
Copy link
Member

cretz commented Feb 3, 2025

@rodrigozhou - I see this is Go SDK only? Do you have plans to author this for other SDKs (at least Java if Nexus only)? We don't consider Go any more important than others. If we want this feature in all SDKs, without favoritism, can you open an issue at https://github.com/temporalio/features and we can add this to all SDKs (including Go) when prioritized?

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-conflict-options branch from 2013dfc to f90603d Compare February 3, 2025 18:22
@rodrigozhou rodrigozhou requested a review from bergundy February 6, 2025 00:22
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

LGTM but we'll need a tagged api before merging this.

@cretz
Copy link
Member

cretz commented Feb 6, 2025

but we'll need a tagged api before merging this.

I'd argue we need a test confirming this even works before merging. If it's not going to be in a stable dev server release anytime soon, we can discuss a dev server RC release.

@bergundy
Copy link
Member

bergundy commented Feb 6, 2025

but we'll need a tagged api before merging this.

I'd argue we need a test confirming this even works before merging. If it's not going to be in a stable dev server release anytime soon, we can discuss a dev server RC release.

@rodrigozhou can you add a test in the server for now with this SDK version? There's going to be a server 1.27.0 RC fairly soon, we can open an issue to add a test SDK side once that's ready.

@cretz also note that there are existing server tests for this functionality, they just don't cover the e2e flow with SDK.

@Quinn-With-Two-Ns
Copy link
Contributor

Maybe I just missed it, but shouldn't some user facing SDK docs be updated as part of this PR? This is a new feature, but nothing in docs describe this new behaviour.

@Quinn-With-Two-Ns
Copy link
Contributor

Don't we need workflow test environment support?

@bergundy
Copy link
Member

bergundy commented Feb 6, 2025

Maybe I just missed it, but shouldn't some user facing SDK docs be updated as part of this PR? This is a new feature, but nothing in docs describe this new behaviour.

Yeah, good callout, this should be documented on the temporalnexus methods (e.g. NewWorkflowRunOperation+WithOptions, ExecuteWorkflow, ExecuteUntypedWorkflow).

@bergundy
Copy link
Member

bergundy commented Feb 6, 2025

Don't we need workflow test environment support?

I'd say yes but low priority. We can track this separately.

@Quinn-With-Two-Ns
Copy link
Contributor

Quinn-With-Two-Ns commented Feb 6, 2025

I consider workflow test environment support a requirement

edit: for GA

@cretz
Copy link
Member

cretz commented Feb 6, 2025

they just don't cover the e2e flow with SDK.

I think we need an e2e flow with the SDK (should be no rush to ship something to our users that doesn't work in a server they can use anyways). Obviously it's more of a smoke test than full coverage, but it reasonable to confirm it works from where the user uses it.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-conflict-options branch 2 times, most recently from 1ee8bda to 1210104 Compare February 14, 2025 23:07
@rodrigozhou
Copy link
Contributor Author

rodrigozhou commented Feb 14, 2025

@cretz @Quinn-With-Two-Ns I created a separate PR (#1828) that adds supports for this in the test framework, and added some tests there as well.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-conflict-options branch from 1210104 to 45f6370 Compare February 15, 2025 00:30
@cretz
Copy link
Member

cretz commented Feb 18, 2025

I created a separate PR (#1828) that adds supports for this in the test framework, and added some tests there as well.

I would like to make sure the integration test in that PR passes before merging this into master (feel free to move that integration test from there to here since it is unrelated to the test suite stuff done in that PR)

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Still need @Quinn-With-Two-Ns approval

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-conflict-options branch from ffadd11 to 8ceb55c Compare February 20, 2025 20:25
@Quinn-With-Two-Ns
Copy link
Contributor

Now that we have the CLI release can we add integration tests?

@rodrigozhou
Copy link
Contributor Author

@Quinn-With-Two-Ns I added in #1828.
However, it needs the latest server tag, which is not in the latest CLI tag.

@Quinn-With-Two-Ns
Copy link
Contributor

@rodrigozhou you mean v1.3.0-versioning.0 does not work?

@rodrigozhou
Copy link
Contributor Author

Yes, v1.3.0-versioning.0 uses v1.27.0-128.4, but it needs a fix that in the main branch, but not in the cloud branch.

@cretz
Copy link
Member

cretz commented Feb 20, 2025

Mentioned in comment above (though I marked approved since thinking it was there which I now see it's not), I think for things to get to master we need a working integration test to get merged with it

@rodrigozhou
Copy link
Contributor Author

rodrigozhou commented Feb 20, 2025

@cretz I'm gonna create a new tag for the CLI, and update the reference here in the SDK for the tests in the other PR to pass. I think this will resolve.

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-conflict-options branch from 8ceb55c to 66dc27e Compare February 24, 2025 17:16
@rodrigozhou rodrigozhou enabled auto-merge (squash) February 24, 2025 18:44
@rodrigozhou rodrigozhou merged commit b2b75c9 into master Feb 24, 2025
15 checks passed
@rodrigozhou rodrigozhou deleted the rodrigozhou/nexus-conflict-options branch February 24, 2025 19:02
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