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

temporal SDK not compatible with temporal API v1.9.0 #832

Closed
gregorhollmig opened this issue Jun 17, 2022 · 8 comments
Closed

temporal SDK not compatible with temporal API v1.9.0 #832

gregorhollmig opened this issue Jun 17, 2022 · 8 comments

Comments

@gregorhollmig
Copy link

Expected Behavior

I cannot build my service using temporal anymore.

With release v1.9.0 of https://github.com/temporalio/api-go/releases/tag/v1.9.0 the latest temporal SDK is not compatible anymore

Actual Behavior

When building the service I get the message. Checking the latest code hier in master this is already adapted and I think just a release is required.

go.temporal.io/sdk/client/service_proxy.go:50:9: cannot use &workflowServiceProxyServer{…} (value of type *workflowServiceProxyServer) as type workflowservice.WorkflowServiceServer in return statement:
	*workflowServiceProxyServer does not implement workflowservice.WorkflowServiceServer (missing GetWorkerBuildIdOrdering method)

Steps to Reproduce the Problem

  1. Build application with latest temporal API&SDK

Specifications

  • Version: v1.15.0
  • Platform: MacOS
@cretz
Copy link
Member

cretz commented Jun 17, 2022

Yes, you have to use the dependency specified in the go.mod of the SDK version you are using. These are not meant to be upgraded independently.

(if you must use v1.9.0 of the API dependency, you can use the latest master, but of course we always suggest a properly tagged release)

@twmb
Copy link

twmb commented Jun 19, 2022

Technically, api-go's change was a breaking change, as evidenced here -- if I go get -u ./..., my compilation should not break.

There isn't really a great solution for this AFAICT since these are separate repos. In my own projects, once I've frozen an interface with 1.0, I've either added extension interfaces or bumped the major version.

@gregorhollmig
Copy link
Author

Thanks for the input.
In my services I do vendor updates on a regular base as @twmb describes with go get -u -t ./... usually this doesn't introduce breaking changes between dependencies but helps me keep my dependencies up to date.
I manually resolved now with go get -t go.temporal.io/api@v1.8.0

Are you already planning to release a new version of the go sdk with support for api v.1.9.0?

@cretz
Copy link
Member

cretz commented Jun 20, 2022

if I go get -u ./..., my compilation should not break.

In theory yes, however with many Go libraries these days, doing things such as adding a method to an interface in a point release is common due to major version change hurtles.

or bumped the major version

This is difficult in Go due to being forced to change everyone's import path (e.g. /v2)

Are you already planning to release a new version of the go sdk with support for api v.1.9.0?

Yes, next release will have that. In the meantime, please continue to use the version required in go.mod or use master (not recommended of course).

@Tarang
Copy link

Tarang commented Jun 28, 2022

I'm receiving this error across multiple projects. I upgraded from temporal 1.12 to temporal 1.15 while building my project.

# go.temporal.io/sdk/client
../../../../go/pkg/mod/go.temporal.io/sdk@v1.15.0/client/service_proxy.go:50:9: cannot use &workflowServiceProxyServer{…} (value of type *workflowServiceProxyServer) as type workflowservice.WorkflowServiceServer in return statement:
        *workflowServiceProxyServer does not implement workflowservice.WorkflowServiceServer (missing GetWorkerBuildIdOrdering method)

I have used go get -u to upgrade all my packages to the latest versions & additionally used go get -u go.temporal.io/sdk@latest to get the latest temporal version.

I think its related to this issue.

I think there is an indirect reference to the other package

require (
	go.temporal.io/api v1.9.0 // indirect
)

@cretz
Copy link
Member

cretz commented Jun 28, 2022

I have used go get -u to upgrade all my packages

You can't really do this with the current version. Rather you would just go get go.temporal.io/sdk@latest (not -u), but since you did -u, you can downgrade to the exact expected API version expected (go get go.temporal.io/api@v1.8.0).

@cretz
Copy link
Member

cretz commented Jun 28, 2022

I think what I am going to do here is at least embed UnimplementedWorkflowServiceServer so that new APIs don't break older SDKs. I will update when I have a PR.

@cretz
Copy link
Member

cretz commented Aug 9, 2022

This has been solved.

@cretz cretz closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants