temporalio / temporalio/temporal
Expose API version to API users
Nobody has claimed this yet.
- 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:
-
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.ReadBuildInfoif we don't strip debug info on build. Or maybe there are other options. Please research and get consensus on how to obtain this. -
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
DescribeNamespacebut 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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