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

backend: pin proto tooling versions, make github action run verify ta… #988

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/backend-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version-file: 'backend/go.mod'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Install Task
uses: arduino/setup-task@v1
with:
version: v1.55.2
args: --timeout=5m
working-directory: backend
version: 3.x
bojand marked this conversation as resolved.
Show resolved Hide resolved
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: test
run: go test -v -race --tags=integration -p=1 ./...
- name: verify
run: task backend:verify
working-directory: backend
2 changes: 1 addition & 1 deletion backend/pkg/api/connect/integration/topic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (s *APISuite) TestCreateTopic() {
httpReq := createTopicRequest{
Name: topicName,
PartitionCount: partitionCount,
ReplicationFactor: -1,
ReplicationFactor: 1,
Configs: []struct {
Name string `json:"name"`
Value string `json:"value"`
Expand Down
2 changes: 1 addition & 1 deletion backend/pkg/kafka/testdata/proto/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
plugins:
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: backend/pkg/kafka/testdata/proto/gen
opt: paths=source_relative
2 changes: 1 addition & 1 deletion backend/pkg/kafka/testdata/proto_update/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
plugins:
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: backend/pkg/kafka/testdata/proto_update/gen
opt: paths=source_relative
576 changes: 289 additions & 287 deletions backend/pkg/protogen/redpanda/api/dataplane/v1alpha1/topic.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/pkg/serde/testdata/proto/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
plugins:
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: backend/pkg/serde/testdata/proto/gen
opt: paths=source_relative
2 changes: 1 addition & 1 deletion backend/pkg/serde/testdata/proto_update/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
plugins:
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: backend/pkg/serde/testdata/proto_update/gen
opt: paths=source_relative
2 changes: 1 addition & 1 deletion backend/pkg/testutil/testdata/proto/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: v1
plugins:
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: backend/pkg/testutil/testdata/proto/gen
opt: paths=source_relative
8 changes: 4 additions & 4 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ managed:
- buf.build/bufbuild/protovalidate
plugins:
# Go Plugins
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
opt: paths=source_relative
out: backend/pkg/protogen

- plugin: connect-go
- plugin: buf.build/connectrpc/go:v1.14.0
opt:
- paths=source_relative
- require_unimplemented_servers=false
out: backend/pkg/protogen

# Typescript plugins
- plugin: buf.build/bufbuild/es
- plugin: buf.build/bufbuild/es:v1.6.0
opt:
- target=ts
- import_extension=
out: frontend/src/protogen

- plugin: buf.build/connectrpc/es
- plugin: buf.build/connectrpc/es:v1.2.0
opt:
- target=ts
- import_extension=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ export class CreateTopicRequest extends Message<CreateTopicRequest> {
*/
export class CreateTopicRequest_Topic extends Message<CreateTopicRequest_Topic> {
/**
* Name is the topic's name.
*
* @generated from field: string name = 1;
*/
name = "";
Expand Down
10 changes: 5 additions & 5 deletions proto/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ managed:
- buf.build/envoyproxy/protoc-gen-validate
plugins:
# Go Plugins
- plugin: buf.build/protocolbuffers/go
- plugin: buf.build/protocolbuffers/go:v1.31.0
opt: paths=source_relative
out: backend/pkg/protogen
- plugin: buf.build/grpc/go
- plugin: buf.build/grpc/go:v1.3.0
opt: paths=source_relative
out: backend/pkg/protogen
- plugin: buf.build/connectrpc/go
- plugin: buf.build/connectrpc/go:v1.14.0
opt:
- paths=source_relative
- require_unimplemented_servers=false
out: backend/pkg/protogen
# Typescript plugins
- plugin: buf.build/bufbuild/es
- plugin: buf.build/bufbuild/es:v1.6.0
opt:
- target=ts
- import_extension=
out: frontend/src/protogen

- plugin: buf.build/connectrpc/es
- plugin: buf.build/connectrpc/es:v1.2.0
opt:
- target=ts
- import_extension=
Expand Down
2 changes: 1 addition & 1 deletion proto/gen/openapi/openapi.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions proto/gen/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ components:
$ref: '#/components/schemas/Config'
type: array
name:
description: Name is the topic's name.
type: string
partition_count:
description: |-
Expand Down
4 changes: 3 additions & 1 deletion taskfiles/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,15 @@ tasks:
cmds:
- |
GOBIN={{ .BUILD_ROOT }}/bin/go go test -v -race --tags=integration -p=1 ./...

cover:
dir: "{{.BACKEND_ROOT}}"
desc: Run integration tests with code coverage
deps:
- install-tparse
- generate
cmds:
- task: 'lint'
- |
GOBIN={{ .BUILD_ROOT }}/bin/go go test -race --tags=integration -json -cover ./... | {{ .BUILD_ROOT }}/bin/go/tparse

Expand All @@ -144,4 +146,4 @@ tasks:
desc: Run lint and tests
cmds:
- task: 'lint'
- task: 'cover'
- task: 'test-integration'
Loading