Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: temporalio/api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.37.0
Choose a base ref
...
head repository: temporalio/api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 11,761 additions and 1,637 deletions.
  1. +2 −0 .github/PULL_REQUEST_TEMPLATE.md
  2. +135 −0 .github/workflows/create-release.yml
  3. +20 −0 .github/workflows/push-to-buf.yml
  4. +13 −0 .github/workflows/trigger-api-go-delete-release.yml
  5. +13 −0 .github/workflows/trigger-api-go-publish-release.yml
  6. +13 −21 .github/workflows/trigger-api-go-update.yml
  7. +2 −2 Makefile
  8. +4 −2 buf.yaml
  9. +4,935 −1,177 openapi/openapiv2.json
  10. +4,206 −318 openapi/openapiv3.yaml
  11. +67 −0 temporal/api/activity/v1/message.proto
  12. +53 −1 temporal/api/batch/v1/message.proto
  13. +6 −0 temporal/api/command/v1/message.proto
  14. +83 −1 temporal/api/common/v1/message.proto
  15. +252 −0 temporal/api/deployment/v1/message.proto
  16. +1 −0 temporal/api/enums/v1/batch_operation.proto
  17. +21 −0 temporal/api/enums/v1/common.proto
  18. +96 −0 temporal/api/enums/v1/deployment.proto
  19. +12 −7 temporal/api/enums/v1/event_type.proto
  20. +2 −0 temporal/api/enums/v1/failed_cause.proto
  21. +42 −0 temporal/api/enums/v1/nexus.proto
  22. +7 −3 temporal/api/enums/v1/reset.proto
  23. +14 −13 temporal/api/enums/v1/update.proto
  24. +47 −2 temporal/api/enums/v1/workflow.proto
  25. +13 −1 temporal/api/errordetails/v1/message.proto
  26. +16 −0 temporal/api/failure/v1/message.proto
  27. +107 −14 temporal/api/history/v1/message.proto
  28. +21 −0 temporal/api/nexus/v1/message.proto
  29. +9 −2 temporal/api/query/v1/message.proto
  30. +112 −0 temporal/api/rules/v1/message.proto
  31. +5 −0 temporal/api/schedule/v1/message.proto
  32. +6 −0 temporal/api/sdk/v1/workflow_metadata.proto
  33. +92 −14 temporal/api/taskqueue/v1/message.proto
  34. +18 −19 temporal/api/update/v1/message.proto
  35. +277 −0 temporal/api/workflow/v1/message.proto
  36. +677 −38 temporal/api/workflowservice/v1/request_response.proto
  37. +362 −2 temporal/api/workflowservice/v1/service.proto
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._

<!-- Describe what has changed in this PR -->
**What changed?**

135 changes: 135 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: "Create release"

on:
workflow_dispatch:
inputs:
branch:
description: "Branch to be tagged"
required: true
default: master
tag:
description: "Tag for new version (v1.23.4)"
required: true
base_tag:
description: "Base tag to generate commit list for release notes"
required: true
skip_sdk_check:
description: "Skip sdk-go compatibility check"
type: boolean

jobs:
prepare-inputs:
name: "Prepare inputs"
runs-on: ubuntu-latest
outputs:
api_commit_sha: ${{ steps.pin_commits.outputs.api_commit_sha }}
api_go_commit_sha: ${{ steps.pin_commits.outputs.api_go_commit_sha }}
steps:
- name: Checkout api
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
fetch-tags: true
path: api

- name: Checkout api-go
uses: actions/checkout@v4
with:
repository: temporalio/api-go
ref: ${{ github.event.inputs.branch }}
submodules: true
path: api-go

- name: Validate inputs
env:
BRANCH: ${{ github.event.inputs.branch }}
TAG: ${{ github.event.inputs.tag }}
BASE_TAG: ${{ github.event.inputs.base_tag }}
working-directory: ./api
run: |
if ! [[ "${TAG}" =~ ^v.* ]]; then
echo "::error::Tag is not prefixed with 'v'"
exit 1
fi
if [[ -n "$(git tag -l "$TAG")" ]]; then
echo "::error::Tag already exists"
exit 1
fi
if [[ -z "$BASE_TAG" || -z "$(git tag -l "$BASE_TAG")" ]]; then
echo "::error::Base tag not specified or does not exist"
exit 1
fi
- name: Pin commits sha
id: pin_commits
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ github.event.inputs.branch }}
run: |
API_COMMIT_SHA=$(git -C ./api rev-parse HEAD)
API_GO_COMMIT_SHA=$(git -C ./api-go rev-parse HEAD)
API_GO_API_COMMIT_SHA=$(git -C ./api-go rev-parse HEAD:proto/api)
if [[ "${API_GO_API_COMMIT_SHA}" != "${API_COMMIT_SHA}" ]]; then
echo "::error::api-go ref ${API_GO_COMMIT_SHA} does not reference api ref ${API_COMMIT_SHA}, api-go repo might not be up-to-date."
exit 1
fi
echo "api_commit_sha=$API_COMMIT_SHA" >> "$GITHUB_OUTPUT"
echo "api_go_commit_sha=$API_GO_COMMIT_SHA" >> "$GITHUB_OUTPUT"
check-compatibility-sdk-go:
needs: prepare-inputs
if: ${{ github.event.inputs.skip_sdk_check == false || github.event.inputs.skip_sdk_check == 'false' }}
uses: temporalio/api-go/.github/workflows/check-sdk-compat.yml@master
with:
sdk_ref: latest
api_ref: ${{ needs.prepare-inputs.outputs.api_go_commit_sha }}

create-release:
name: "Create release"
needs: [prepare-inputs, check-compatibility-sdk-go]
if: |
!cancelled() &&
needs.prepare-inputs.result == 'success' &&
contains(fromJSON('["success", "skipped"]'), needs.check-compatibility-sdk-go.result)
runs-on: ubuntu-latest

steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare-inputs.outputs.api_commit_sha }}
token: ${{ steps.generate_token.outputs.token }}

- name: Create release
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
REF: ${{ needs.prepare-inputs.outputs.api_commit_sha }}
TAG: ${{ github.event.inputs.tag }}
BASE_TAG: ${{ github.event.inputs.base_tag }}
run: |
gh repo set-default ${{ github.repository }}
gh release create "$TAG" --target "$REF" --latest --generate-notes --notes-start-tag "$BASE_TAG" --draft
release-api-go:
needs: [prepare-inputs, create-release]
if: |
!cancelled() &&
needs.create-release.result == 'success'
uses: temporalio/api-go/.github/workflows/create-release.yml@master
with:
ref: ${{ needs.prepare-inputs.outputs.api_go_commit_sha }}
tag: ${{ github.event.inputs.tag }}
api_commit_sha: ${{ needs.prepare-inputs.outputs.api_commit_sha }}
base_tag: ${{ github.event.inputs.base_tag }}
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/push-to-buf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Push to Buf Registry

on:
push:
tags:
- 'v**'
branches:
- master
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: bufbuild/buf-action@v1
with:
version: 1.49.0
token: ${{ secrets.BUF_TEMPORALIO_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/trigger-api-go-delete-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Trigger api-go delete release"

on:
release:
types: [deleted]

jobs:
trigger-api-go-delete-release:
uses: temporalio/api-go/.github/workflows/delete-release.yml@master
with:
tag: ${{ github.event.release.tag_name }}
api_commit_sha: ${{ github.event.release.target_commitish }}
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/trigger-api-go-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Trigger api-go publish release"

on:
release:
types: [published]

jobs:
trigger-api-go-publish-release:
uses: temporalio/api-go/.github/workflows/publish-release.yml@master
with:
tag: ${{ github.event.release.tag_name }}
api_commit_sha: ${{ github.event.release.target_commitish }}
secrets: inherit
34 changes: 13 additions & 21 deletions .github/workflows/trigger-api-go-update.yml
Original file line number Diff line number Diff line change
@@ -30,39 +30,31 @@ jobs:
owner: ${{ github.repository_owner }}
repositories: api-go # generate a token with permissions to trigger GHA in api-go repo

- name: Prepare inputs
id: prepare_inputs
- name: Dispatch api-go Github Action
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
EVENT_PUSH_BRANCH: ${{ github.event.ref }}
EVENT_PUSH_COMMIT_AUTHOR: ${{ github.event.head_commit.author.name }}
EVENT_PUSH_COMMIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
EVENT_PUSH_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
EVENT_WF_DISPATCH_BRANCH: ${{ github.event.inputs.branch }}
run: |
case "${{ github.event_name }}" in
"push")
BRANCH=${{ github.event.ref }}
BRANCH=${BRANCH#refs/heads/}
COMMIT_AUTHOR=${{ toJSON(github.event.head_commit.author.name) }}
COMMIT_AUTHOR_EMAIL=${{ toJSON(github.event.head_commit.author.email) }}
COMMIT_MESSAGE=${{ toJSON(github.event.head_commit.message) }}
BRANCH="${EVENT_PUSH_BRANCH#refs/heads/}"
COMMIT_AUTHOR="${EVENT_PUSH_COMMIT_AUTHOR}"
COMMIT_AUTHOR_EMAIL="${EVENT_PUSH_COMMIT_AUTHOR_EMAIL}"
COMMIT_MESSAGE="${EVENT_PUSH_COMMIT_MESSAGE}"
;;
"workflow_dispatch")
BRANCH="${{ github.event.inputs.branch }}"
BRANCH="${EVENT_WF_DISPATCH_BRANCH}"
COMMIT_AUTHOR="Temporal Data"
COMMIT_AUTHOR_EMAIL="commander-data@temporal.io"
COMMIT_MESSAGE="Update proto"
;;
esac
echo "BRANCH=${BRANCH}" >> $GITHUB_OUTPUT
echo "COMMIT_AUTHOR=${COMMIT_AUTHOR}" >> $GITHUB_OUTPUT
echo "COMMIT_AUTHOR_EMAIL=${COMMIT_AUTHOR_EMAIL}" >> $GITHUB_OUTPUT
echo "COMMIT_MESSAGE=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT
- name: Dispatch api-go Github Action
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
BRANCH: ${{ steps.prepare_inputs.outputs.BRANCH }}
COMMIT_AUTHOR: ${{ steps.prepare_inputs.outputs.COMMIT_AUTHOR }}
COMMIT_AUTHOR_EMAIL: ${{ steps.prepare_inputs.outputs.COMMIT_AUTHOR_EMAIL }}
COMMIT_MESSAGE: ${{ steps.prepare_inputs.outputs.COMMIT_MESSAGE }}
run: |
gh workflow run update-proto.yml -R https://github.com/temporalio/api-go \
-r master \
-f branch="${BRANCH}" \
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SHELL=/bin/bash -o pipefail
SHELL=bash -o pipefail

$(VERBOSE).SILENT:
############################# Main targets #############################
@@ -76,7 +76,7 @@ http-api-docs:
##### Plugins & tools #####
grpc-install:
@printf $(COLOR) "Install/update protoc and plugins..."
@go install go.temporal.io/api/cmd/protogen@latest
@go install go.temporal.io/api/cmd/protogen@master
@go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
6 changes: 4 additions & 2 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: v1
name: buf.build/temporalio/api
deps:
- buf.build/grpc-ecosystem/grpc-gateway
- buf.build/googleapis/googleapis
build:
excludes:
# Buf won't accept a local dependency on the google protos but we need them
@@ -11,8 +13,8 @@ breaking:
- WIRE_JSON
ignore:
- google
# Remove after applying nexus spec description change
- temporal/api/nexus/v1/message.proto
# TODO (yuri) remove this
- temporal/api/workflow/v1/message.proto
lint:
use:
- DEFAULT
Loading