Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #24

Merged
merged 5 commits into from
Jul 26, 2021
Merged

Update CI #24

merged 5 commits into from
Jul 26, 2021

Conversation

hanahmily
Copy link
Contributor

Signed-off-by: Gao Hongtao hanahmily@gmail.com

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
Copy link
Contributor

@lujiajing1126 lujiajing1126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flatc installation can be also removed.

go.mod Outdated Show resolved Hide resolved
banyand/index/gomock_reflect_786311153/prog.go Outdated Show resolved Hide resolved
.github/workflows/go.yml Show resolved Hide resolved
Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
@@ -25,141 +25,141 @@ import (
v1 "github.com/apache/skywalking-banyandb/api/proto/banyandb/v1"
)

type shardEventBuilder struct {
type ShardEventBuilder struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exported func in this file return unexported types, which causes the lint check to fail. @lujiajing1126 Would you pls check whether the way I fixed is correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exported func in this file return unexported types, which causes the lint check to fail. @lujiajing1126 Would you pls check whether the way I fixed is correct?

Yes. I suppose the change is correct. I intended not to expose/export the structs and only allow users to create builder(s) by the given functions.

I don't know why this pattern is not recommended by the linter. Ref: https://stackoverflow.com/a/21470517

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a common pattern in go. If you want to force users to use the factory method, an interface should be better, which is a canonical pattern to gophers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a common pattern in go. If you want to force users to use the factory method, an interface should be better, which is a canonical pattern to gophers.

Sure. Make sense to me.

Copy link
Contributor

@lujiajing1126 lujiajing1126 Jul 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a common pattern in go. If you want to force users to use the factory method, an interface should be better, which is a canonical pattern to gophers.

I did some investigation. It seems this pattern does commonly used by developers.
See golang/lint#210

use:
- DEFAULT
except:
- RPC_REQUEST_STANDARD_NAME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I asked in the last PR #23 , do we need to impose these two rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the standard/common pattern to name the request. skywalking keeps using this pattern to build grpc service.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the standard/common pattern to name the request. skywalking keeps using this pattern to build grpc service.

So if we need to comply with the conventions, we have to change the request and response types as well as delete this except section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you fix this issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you fix this issue?

Sure I can do this later.

@rm -rf $(tool_include)/google
@mkdir -p $(tool_bin) $(tool_include)
$(eval protoc_tmp := $(shell mktemp -d))
cd $(protoc_tmp); curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v$(protoc_version)/protoc-$(protoc_version)-$(protoc_os)-$(protoc_arch).zip -o protoc.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment: this cannot work on osx-arm64 platform, i.e. Apple Chip.

(Unfortunately, I changed my working laptop last week....🤣)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can tweak it to build protoc from sources, or copy protoc into bin directory in the root path.

@lujiajing1126
Copy link
Contributor

LGTM

@hanahmily hanahmily merged commit 392bac0 into main Jul 26, 2021
@hanahmily hanahmily deleted the proto-ci branch July 26, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants