Skip to content

Commit 7b9d8a3

Browse files
fix: typo in thrift (#230)
* fix typo Signed-off-by: David Porter <[email protected]> * adding lint rule Signed-off-by: David Porter <[email protected]> * fix lint Signed-off-by: David Porter <[email protected]> --------- Signed-off-by: David Porter <[email protected]>
1 parent 0fc4c90 commit 7b9d8a3

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.buildkite/pipeline.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,18 @@ steps:
2626
command:
2727
- |-
2828
make proto-lint
29+
30+
- label: "thrift compile"
31+
agents:
32+
queue: "buildkite-gcp"
33+
plugins:
34+
- kubernetes:
35+
<<: *kubernetes
36+
podSpec:
37+
<<: *podSpec
38+
containers:
39+
- <<: *commandContainer
40+
command:
41+
- |-
42+
apt-get update && apt-get install -y thrift-compiler
43+
make thriftlint

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.DEFAULT_GOAL := all
22

3+
.PHONY: thriftlint
4+
35
# M1 macs may need to switch back to x86, until arm releases are available
46
EMULATE_X86 =
57
ifeq ($(shell uname -sm),Darwin arm64)
@@ -44,6 +46,8 @@ PROTO_DIRS = $(sort $(dir $(PROTO_FILES)))
4446
proto-lint: $(PROTO_FILES) $(BIN)/$(BUF_VERSION_BIN)
4547
@$(BIN)/$(BUF_VERSION_BIN) lint
4648

49+
THRIFT_FILES=$(shell find . -name "*.thrift")
50+
4751
# https://www.grpc.io/docs/languages/go/quickstart/
4852
# protoc-gen-gogofast (yarpc) are versioned via tools.go + go.mod (built above) and will be rebuilt as needed.
4953
# changing PROTOC_VERSION will automatically download and use the specified version
@@ -89,6 +93,14 @@ proto-go: $(PROTO_FILES) $(BIN)/$(PROTOC_VERSION_BIN) $(BIN)/protoc-gen-gogofast
8993
@mv $(PROTO_GO_OUT)/uber/cadence/* $(PROTO_GO_OUT)
9094
@rm -r $(PROTO_GO_OUT)/uber
9195

96+
thriftlint:
97+
@for file in $(THRIFT_FILES); do \
98+
if ! thrift --gen go "$$file"; then \
99+
echo "FAILED: $$file"; \
100+
exit 1; \
101+
fi; \
102+
done
103+
92104
all: proto-lint proto-go
93105

94106
# generally not necessary unless we change library versions, but this DOES impact codegen

thrift/shared.thrift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ struct UpdateDomainResponse {
12091209
struct FailoverDomainRequest {
12101210
10: optional string domainName
12111211
20: optional string domainActiveClusterName
1212-
// only applicable to active-active domains where
1212+
// only applicable to active-active domains where
12131213
// specific cluster-attributes are being failed over
12141214
30: optional ActiveClusters activeClusters
12151215
}
@@ -1262,7 +1262,7 @@ struct FailoverEvent {
12621262
// Can be passed with the ID to fetch a specific event.
12631263
20: optional i64 (js.type = "Long") createdTime
12641264
30: optional FailoverType failoverType
1265-
40: optional List<ClusterFailover> clusterFailovers
1265+
40: optional list<ClusterFailover> clusterFailovers
12661266
}
12671267

12681268
struct ClusterFailover {

0 commit comments

Comments
 (0)