Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 10 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Checkout code
uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: Run linters
uses: golangci/golangci-lint-action@v8
with:
Expand All @@ -18,22 +18,21 @@ jobs:
go-test:
strategy:
matrix:
go-version: [1.23]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: go tests
run: go test -v -covermode=count -json ./... > test.json
- name: annotate go tests
if: always()
uses: guyarb/golang-test-annotations@v0.5.1
uses: guyarb/golang-test-annotations@v0.6.0
with:
test-results: test.json
test:
Expand All @@ -56,12 +55,12 @@ jobs:
CONNECTOR_PRINCIPAL: 'user:mysql.sys@localhost'
CONNECTOR_PRINCIPAL_TYPE: 'user'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Checkout code
uses: actions/checkout@v3
go-version-file: 'go.mod'
- name: Install baton
run: ./scripts/get-baton.sh && mv baton /usr/local/bin
- name: Build baton-mysql
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/main.yaml

This file was deleted.

21 changes: 13 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: "2"
run:
modules-download-mode: readonly
linters:
default: none
enable:
Expand Down Expand Up @@ -38,7 +40,11 @@ linters:
exhaustive:
default-signifies-exhaustive: true
gocritic:
enabled-checks:
- ruleguard
settings:
ruleguard:
rules: ${base-path}/tools/rules.go
underef:
skipRecvDeref: false
govet:
Expand Down Expand Up @@ -68,6 +74,7 @@ linters:
arguments:
- fmt.Printf
- fmt.Println
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
- os.Stderr.Sync
Expand All @@ -94,21 +101,19 @@ linters:
- linters:
- godot
source: (TODO)
- linters:
- forbidigo
- goconst
- gosec
- unused
path: _test\.go
- path: (.+)\.go$
text: third_party$
- path: (.+)\.go$
text: builtin$
- path: (.+)\.go$
text: examples$
paths:
- third_party$
- builtin$
- examples$
issues:
max-same-issues: 50
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
Expand Down
2 changes: 2 additions & 0 deletions cmd/baton-mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/conductorone/baton-mysql/pkg/connector"
"github.com/conductorone/baton-sdk/pkg/config"
"github.com/conductorone/baton-sdk/pkg/connectorbuilder"
"github.com/conductorone/baton-sdk/pkg/connectorrunner"
"github.com/conductorone/baton-sdk/pkg/field"
sdkTypes "github.com/conductorone/baton-sdk/pkg/types"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
Expand All @@ -27,6 +28,7 @@ func main() {
field.Configuration{
Fields: ConfigurationFields,
},
connectorrunner.WithDefaultCapabilitiesConnectorBuilder(&connector.Connector{}),
)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
module github.com/conductorone/baton-mysql

go 1.23.4

toolchain go1.23.9
go 1.25.2

require (
github.com/conductorone/baton-sdk v0.3.10
github.com/conductorone/baton-sdk v0.7.4
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
github.com/go-sql-driver/mysql v1.7.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jmoiron/sqlx v1.3.5
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
go.uber.org/zap v1.27.0
golang.org/x/text v0.22.0
)

require (
filippo.io/age v1.2.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/aws/aws-lambda-go v1.47.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
Expand Down Expand Up @@ -46,12 +47,11 @@ require (
github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.7.0 // indirect
github.com/dolthub/maphash v0.1.0 // indirect
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.9.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand All @@ -63,11 +63,11 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/maypok86/otter v1.2.4 // indirect
github.com/maypok86/otter/v2 v2.2.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
Expand All @@ -80,16 +80,15 @@ require (
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/shirou/gopsutil/v4 v4.25.11 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.9.0 // indirect
github.com/tklauser/go-sysconf v0.3.16 // indirect
github.com/tklauser/numcpus v0.11.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect
Expand All @@ -111,7 +110,8 @@ require (
golang.org/x/net v0.35.0 // indirect
golang.org/x/oauth2 v0.26.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.29.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
google.golang.org/grpc v1.71.0 // indirect
Expand Down
Loading