From 3f929599f1ff7f8a3359325cb9be9f9ef204a0f0 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:50:13 -0700 Subject: [PATCH 01/11] add a readme file --- Makefile | 2 +- README.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/Makefile b/Makefile index 3eec3b7..7951b92 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ $(PROTO_OUT): mkdir $(PROTO_OUT) ##### Compile proto files for go ##### -grpc: buf-lint go-grpc +grpc: buf-lint buf-breaking go-grpc go-grpc: clean $(PROTO_OUT) printf $(COLOR) "Compile for go-gRPC..." diff --git a/README.md b/README.md new file mode 100644 index 0000000..6bd862a --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Temporal cloud api proto files + +## How to use + +Copy over the proto files under [temporal](temporal) to the project directory and use [protobuf](https://protobuf.dev/overview/) to compile and generate code in the desired language. + +## URL + +The grpc apis URL: +``` +saas-api.tmprl.cloud:443 +``` + +## Samples + +Refere [cloud-samples-go](https://github.com/temporalio/cloud-samples-go) repository for demonstration of how a project can copy and build Go clients for the temporal cloud apis. From a682e0f53f5c9d64555c9490833d25f5b309f116 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:00:37 -0700 Subject: [PATCH 02/11] add ci --- .github/workflows/build.yaml | 15 +++++++++++++++ Makefile | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..226a26b --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,15 @@ +name: CI +on: push +jobs: + build: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + check-latest: true + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - name: Validate and build go bindings from the proto files + run: make ci-build diff --git a/Makefile b/Makefile index 7951b92..127b7f0 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ buf-lint: buf lint buf-breaking: - @printf $(COLOR) "Run buf breaking changes check against master branch..." + @printf $(COLOR) "Run buf breaking changes check against main branch..." buf breaking --against '.git#branch=main' ##### Clean ##### From 48b58fcbacd1b0668a248fb788daa45b19e04f4c Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:02:05 -0700 Subject: [PATCH 03/11] remove self-hosted flag --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 226a26b..f140b7e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,6 @@ name: CI on: push jobs: build: - runs-on: self-hosted steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 From 85dfd195037a01ee7beb470636eacd68af6aec46 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:04:02 -0700 Subject: [PATCH 04/11] fix self-hosted flag --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f140b7e..08b2475 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,7 @@ name: CI on: push jobs: build: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 From 2533d00cc9286250e6106a4bac83c60cae66971c Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:16:28 -0700 Subject: [PATCH 05/11] fix buf breaking --- .github/workflows/build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 08b2475..54be678 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,4 +12,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v2 - name: Validate and build go bindings from the proto files - run: make ci-build + run: make install buf-lint + env: + BUF_INPUT_HTTPS_USERNAME: ${{github.actor}} + BUF_INPUT_HTTPS_PASSWORD: ${{github.token}} From 840db3a2cb7b181e45de45e099fcc81374c79088 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:18:43 -0700 Subject: [PATCH 06/11] fix buf breaking --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 54be678..0a6e382 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v2 - name: Validate and build go bindings from the proto files - run: make install buf-lint + run: make ci-build env: BUF_INPUT_HTTPS_USERNAME: ${{github.actor}} BUF_INPUT_HTTPS_PASSWORD: ${{github.token}} From 497c2ba5a1ce208d59845177901f0a9deff618c7 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:23:45 -0700 Subject: [PATCH 07/11] more fixes for buf --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 127b7f0..0079e78 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ buf-lint: buf-breaking: @printf $(COLOR) "Run buf breaking changes check against main branch..." - buf breaking --against '.git#branch=main' + buf breaking --against 'https://github.com/temporalio/api-cloud.git#branch=main' ##### Clean ##### clean: From 5b98236893b8cd15beb87f9882e99c4a121c1356 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:34:16 -0700 Subject: [PATCH 08/11] more fixes --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0079e78..cf901cd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ $(VERBOSE).SILENT: ci-build: install proto # Install dependencies. -install: buf-install openapiv2-install +install: buf-install grpc-install openapiv2-install # Run all linters and compile proto files. proto: grpc @@ -35,8 +35,13 @@ buf-install: printf $(COLOR) "Install/update buf..." go install github.com/bufbuild/buf/cmd/buf@v1.25.1 +grpc-install: + printf $(COLOR) "Install/update go and grpc protoc gen ..." + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31 + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3 + openapiv2-install: - printf $(COLOR) "Install/update ..." + printf $(COLOR) "Install/update openapiv2 protoc gen..." go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.16.2 ##### Linters ##### From a160017ac64961efa0524089c4a82de62abedd0a Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:37:29 -0700 Subject: [PATCH 09/11] minor gix --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0a6e382..76f49c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: CI +name: Build on: push jobs: build: From 68070c23022e0bd6e4bd4f27d3fda3859735ab5d Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:44:18 -0700 Subject: [PATCH 10/11] add License --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5a9d090 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2023 Temporal Technologies Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. From 5aaa1d1837a271850dc5cb9ca5cdb7c882c434f9 Mon Sep 17 00:00:00 2001 From: Abhinav Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Tue, 26 Sep 2023 07:49:32 -0700 Subject: [PATCH 11/11] updates to readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6bd862a..e5233ef 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@ ## How to use -Copy over the proto files under [temporal](temporal) to the project directory and use [protobuf](https://protobuf.dev/overview/) to compile and generate code in the desired language. +Copy over the protobuf files under [temporal](temporal) directory to the project directory and then use [grpc](https://grpc.io/docs/) to compile and generate code in the desired programming language. ## URL -The grpc apis URL: +The grpc URL the clients should connect to: ``` saas-api.tmprl.cloud:443 ``` ## Samples -Refere [cloud-samples-go](https://github.com/temporalio/cloud-samples-go) repository for demonstration of how a project can copy and build Go clients for the temporal cloud apis. +Refer [cloud-samples-go](https://github.com/temporalio/cloud-samples-go) repository for demonstration on how a project can copy and build Go clients.