temporalio / temporalio/temporal

Expose API version to API users

Open
#7,721 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Describe the solution you'd like

We need a way to expose the version of https://github.com/temporalio/api currently in use to users. This is helpful for companies with proxies and in general is a good practice when using versioned API. It is especially important for us because we not only add things, but we make incompatible changes in non-GA situations.

The first step here is to research possibilities and get consensus on how to do this. There are two problems to tackle:

  1. How to get the API version in code at runtime? This could be via manual const in api-go, build-flag that sets var in api-go, or maybe even obtained at runtime via debug.ReadBuildInfo if we don't strip debug info on build. Or maybe there are other options. Please research and get consensus on how to obtain this.

  2. How to expose the API version via the API itself? This cannot be via get system info since in some environments like cloud, the same "system" can have have different API versions depending upon which namespace is in use. It could be via response header, but do we want to add a new header to every response. It could be via DescribeNamespace but that only has partial cloud support since we encourage the cloud-ops-api namespace getter for proper namespace information. Please research and get consensus on how to expose this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by researching how api-go can obtain the API version at runtime, including a constant, build flag, or debug.ReadBuildInfo. Compare exposing it through response headers, DescribeNamespace, or another API path, considering cloud-ops-api namespace handling. Done means the options, tradeoffs, and a consensus recommendation are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.