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

Current "latest" sdk-go incompatible with just-released api-go v1.44.0 #1805

Open
dotwaffle opened this issue Feb 7, 2025 · 4 comments
Open
Labels
bug Something isn't working

Comments

@dotwaffle
Copy link

In the last few hours, https://github.com/temporalio/api-go had a new release: v1.44.0

The current released version of sdk-go, v1.32.1, does not work with it. Specifically, the removal of "ById" of the *ByIdRequest and *ByIdResponse within this commit and the file workflowservice/v1/request_response.go-helpers.pb.go.

Expected Behavior

Existing code compiles after upgrading all libraries to the latest versions.

Actual Behavior

Compilation failures due to missing symbols, which have been renamed.

Steps to Reproduce the Problem

  1. Use sdk-go v1.32.1 and api-go v1.43.2, in my case I was reading history events.
  2. Upgrade to api-go@latest (i.e. v1.44.0).
  3. Code no longer compiles.

Specifications

  • Version: sdk-go v1.32.1 (latest) + api-go v1.44.0 (latest)
  • Platform: all
@dotwaffle dotwaffle added the bug Something isn't working label Feb 7, 2025
@cretz
Copy link
Member

cretz commented Feb 7, 2025

I am struggling to replicate this. I have a go.mod with:

	go.temporal.io/api v1.44.0
	go.temporal.io/sdk v1.32.1

And I am able to compile a simple Go SDK app. The Go SDK doesn't use the API that was removed/changed. Can you give an example of code/project unable to compile with just these dependencies? Can you show the exact compilation error?

@dotwaffle
Copy link
Author

Sorry, I think I was confused, it's not sdk-go, it's go.temporal.io/server/API

The errors I'm seeing are about v1.PauseActivityByIdRequest etc, and the path shown with "go mod why" is:

go.temporal.io/server/common/authorisation
go.temporal.io/server/common/namespace
go.temporal.io/server/common
go.temporal.io/server/api/historyservice/v1

If I move go.temporal.io/API from v1.44.0 to v1.43.2 then the error goes away.

@cretz
Copy link
Member

cretz commented Feb 10, 2025

If you are using the server programmatically as a library, you must have the exact versions of SDK and API that are in the server's go.mod. The server is a very large application and including it programmatically has a few more limitations. You cannot upgrade the server's API beyond the version it is written for. We generally discourage using the server as a library, but if you must, we recommend not doing it in the same project where the rest of your Temporal SDK work is done (e.g. if you use an auth plugin or something, don't put that alongside your workflows).

@dotwaffle
Copy link
Author

It's related to the OIDC code for the codecserver in your sample, at: https://github.com/temporalio/samples-go/blob/main/codec-server/codec-server/oidc.go

Is there an alternative method I can use to provide the same functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants