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

[Schemas] Connector SDK: Create and get a schema from Conduit #96

Merged
merged 40 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c042fc0
[Schemas] Connector SDK: Create and get a schema from Conduit
hariso May 31, 2024
2fadefb
Merge branch 'schema-support' into haris/schema-support-connector-sdk
hariso May 31, 2024
221949a
remove replace
hariso Jun 10, 2024
c0b5b4d
change port
hariso Jun 11, 2024
36454fc
add mocks
hariso Jun 11, 2024
5ede4ee
Get by name and version
hariso Jun 12, 2024
acf859a
update commons
hariso Jun 13, 2024
6c1f722
add tests
hariso Jun 13, 2024
19bbc11
a couple of tests, move around
hariso Jun 13, 2024
ab9dc45
update commons
hariso Jun 13, 2024
0a29f5c
move around
hariso Jun 13, 2024
0a9b1b5
update commons
hariso Jun 19, 2024
35b5297
fix compilation
hariso Jun 19, 2024
c0c7d14
update commons
hariso Jun 19, 2024
2476e66
fix compilation
hariso Jun 19, 2024
b6ace30
update commons
hariso Jun 21, 2024
9df2b7f
update commons
hariso Jun 21, 2024
3e374e4
fix
hariso Jun 21, 2024
636d910
add in memory schema service
hariso Jun 24, 2024
175b589
simplify
hariso Jun 24, 2024
1e9d356
comments
hariso Jun 24, 2024
fbb27f5
rename name to subject
hariso Jun 24, 2024
469f0be
rename package to pschema
hariso Jun 25, 2024
da1f64d
typed mock
hariso Jun 25, 2024
d6381d2
update commons
hariso Jun 25, 2024
9c87126
Merge branch 'schema-support' into haris/schema-support-connector-sdk
hariso Jun 25, 2024
d24ebd2
go mod tidy
hariso Jun 25, 2024
f28a6a9
update commons use schema
raulb Jun 28, 2024
56a0ed7
update to latest commons
raulb Jul 1, 2024
68e3b92
simplify proto
raulb Jul 1, 2024
23c5660
unwrap error and create internal/errors.go
raulb Jul 2, 2024
74adabd
provide target to client
raulb Jul 2, 2024
4513705
update proto schema
raulb Jul 2, 2024
fab5aa6
update schema type
raulb Jul 2, 2024
5538273
remove dependency
raulb Jul 2, 2024
9e93075
update grpc_client
raulb Jul 2, 2024
3530789
update service schema methods
raulb Jul 2, 2024
6e40b79
update naming to follow convention
raulb Jul 2, 2024
3d6f82b
refactor leftover
raulb Jul 2, 2024
2cd8c41
Schema support proposed changes (#105)
lovromazgon Jul 2, 2024
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
134 changes: 77 additions & 57 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,124 @@
run:
timeout: 5m

linters-settings:
depguard:
rules:
main:
deny:
- pkg: github.com/golang/mock
desc: github.com/golang/mock is deprecated, use go.uber.org/mock instead
gofmt:
simplify: false
govet:
check-shadowing: false
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: true # require nolint directives to mention the specific linter being suppressed
gocyclo:
min-complexity: 20
goconst:
ignore-tests: true
goheader:
template-path: '.golangci.goheader.template'
values:
regexp:
copyright-year: 20[2-9]\d
wrapcheck:
ignoreSigs:
- .Errorf(
- errors.New(
- errors.Unwrap(
- errors.Join(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
- (context.Context).Err()

issues:
exclude-rules:
- path: _test\.go
linters:
- dogsled
- gosec
- gocognit
- errcheck
- forcetypeassert
- funlen
- dupl
- maintidx

linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- depguard
- containedctx
- contextcheck
- decorder
# - depguard
- dogsled
- dupl
- dupword
- durationcheck
# - err113
- errcheck
- errchkjson
- errname
# - errorlint
# - exhaustive
# - exhaustivestruct
- errorlint
- exhaustive
- exportloopref
# - forbidigo
# - forcetypeassert
# - funlen
# - gochecknoinits
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
# - cyclop # not interested in package complexities at the moment
# - godot
- godot
- gofmt
# - gofumpt
- gofumpt
- goheader
- goimports
- revive
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
# - ifshort
- grouper
- importas
- ineffassign
# - importas
# - lll
# - misspell
- interfacebloat
# - ireturn # Doesn't have correct support for generic types https://github.com/butuzov/ireturn/issues/37
- loggercheck
- maintidx
- makezero
# - nakedret
# - nilerr
# - nilnil
# - nlreturn
- mirror
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
# - paralleltest
- nosprintfhostport
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- sqlclosecheck
# - tagliatelle
# - tenv
# - thelper
# - tparallel
- typecheck
- tenv
- testableexamples
- thelper
- unconvert
# - unparam
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
# - wrapcheck
# - wsl

# don't enable:
# - asciicheck
# - dupl
# - gochecknoglobals
# - gocognit
# - godox
# - goerr113
# - maligned
# - nestif
# - prealloc
# - testpackage
# - wsl
# - wrapcheck
- zerologlint
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ proto-generate:

.PHONY: proto-update
proto-update:
cd proto && buf mod update
cd proto && buf dep update

.PHONY: proto-lint
proto-lint:
Expand Down
51 changes: 0 additions & 51 deletions conduit/schema/v1/fromproto/schema.go

This file was deleted.

59 changes: 0 additions & 59 deletions conduit/schema/v1/toproto/schema.go

This file was deleted.

6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
github.com/bufbuild/buf v1.34.0
github.com/conduitio/conduit-commons v0.2.1-0.20240625112558-36c8cf1d5447
github.com/conduitio/conduit-commons v0.2.1-0.20240701165122-3948a38f3667
github.com/golangci/golangci-lint v1.59.1
github.com/google/go-cmp v0.6.0
github.com/hashicorp/go-hclog v1.6.3
Expand Down Expand Up @@ -154,7 +154,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mgechev/revive v1.3.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.5.0 // indirect
Expand All @@ -166,7 +166,7 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.16.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9
github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/conduitio/conduit-commons v0.2.1-0.20240625112558-36c8cf1d5447 h1:viTwGsFjy9s/vriR8K8O4Vns6ZAayPnrsr8Hbf6dU4c=
github.com/conduitio/conduit-commons v0.2.1-0.20240625112558-36c8cf1d5447/go.mod h1:S7zRUQc8goT3gFRbS6jLHV9SxzAeiJ/JKe7FxMX5B1U=
github.com/conduitio/conduit-commons v0.2.1-0.20240701165122-3948a38f3667 h1:3HUOjmhoFGwanbq8GOqbCVCKzQom31s9EILVAGGW1R4=
github.com/conduitio/conduit-commons v0.2.1-0.20240701165122-3948a38f3667/go.mod h1:S7zRUQc8goT3gFRbS6jLHV9SxzAeiJ/JKe7FxMX5B1U=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
Expand Down Expand Up @@ -486,8 +486,8 @@ github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE=
github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 h1:7GoSOOW2jpsfkntVKaS2rAr1TJqfcxotyaUcuxoZSzg=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
Expand Down Expand Up @@ -515,8 +515,8 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk=
github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU=
Expand Down
10 changes: 5 additions & 5 deletions conduit/doc.go → pconduit/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

/*
Package conduit contains definitions of Conduit services available to connectors,
as well as client that enable the usage of those.
*/
package conduit
package pconduit

import "errors"

var ErrUnimplemented = errors.New("method not implemented")
Loading
Loading