Skip to content

Commit da662ab

Browse files
authored
[BB-762] Add account provisioning (#25)
* add account provisioning * add account deletion * update deps * use v0.3.9 * fix lint * update golangci version * format * fix golangci version in main.yaml
1 parent 669d8dc commit da662ab

File tree

511 files changed

+141755
-3966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

511 files changed

+141755
-3966
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Checkout code
1212
uses: actions/checkout@v4
1313
- name: Run linters
14-
uses: golangci/golangci-lint-action@v6
14+
uses: golangci/golangci-lint-action@v8
1515
with:
1616
version: latest
1717
args: --timeout=3m

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616
- name: Run linters
17-
uses: golangci/golangci-lint-action@v6
17+
uses: golangci/golangci-lint-action@v8
1818
with:
1919
version: latest
2020
args: --timeout=3m
@@ -38,4 +38,4 @@ jobs:
3838
if: always()
3939
uses: guyarb/[email protected]
4040
with:
41-
test-results: test.json
41+
test-results: test.json

.golangci.yml

Lines changed: 112 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,116 @@
1-
#AUTO GENERATED CODE. UPDATE THE CONFIG IN BATON-TEMPLATE FIRST
2-
linters-settings:
3-
exhaustive:
4-
default-signifies-exhaustive: true
5-
gocritic:
6-
enabled-checks:
7-
- ruleguard
8-
# The list of supported checkers can be find in https://go-critic.github.io/overview.
9-
settings:
10-
underef:
11-
# Whether to skip (*x).method() calls where x is a pointer receiver.
12-
skipRecvDeref: false
13-
ruleguard:
14-
rules: "${configDir}/tools/rules.go"
15-
govet:
16-
enable-all: true
17-
disable:
18-
- fieldalignment # too strict
19-
- shadow # complains too much about shadowing errors. All research points to this being fine.
20-
nakedret:
21-
max-func-lines: 0
22-
nolintlint:
23-
allow-no-explanation: [forbidigo, tracecheck, gomnd, gochecknoinits, makezero]
24-
require-explanation: true
25-
require-specific: true
26-
revive:
27-
ignore-generated-header: true
28-
severity: error
29-
rules:
30-
- name: atomic
31-
- name: line-length-limit
32-
arguments: [200]
33-
# These are functions that we use without checking the errors often. Most of these can't return an error even
34-
# though they implement an interface that can.
35-
- name: unhandled-error
36-
arguments:
37-
- fmt.Printf
38-
- fmt.Println
39-
- fmt.Fprint
40-
- fmt.Fprintf
41-
- fmt.Fprintln
42-
- os.Stderr.Sync
43-
- sb.WriteString
44-
- buf.WriteString
45-
- hasher.Write
46-
- os.Setenv
47-
- os.RemoveAll
48-
- name: var-naming
49-
arguments: [["ID", "URL", "HTTP", "API"], []]
50-
tenv:
51-
all: true
1+
version: "2"
522
linters:
53-
disable-all: true
3+
default: none
544
enable:
55-
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
56-
- gosimple # Linter for Go source code that specializes in simplifying a code
57-
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
58-
- ineffassign # Detects when assignments to existing variables are not used
59-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
60-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
61-
- unused # Checks Go code for unused constants, variables, functions and types
62-
- asasalint # Check for pass []any as any in variadic func(...any)
63-
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
64-
- bidichk # Checks for dangerous unicode character sequences
65-
- bodyclose # checks whether HTTP response body is closed successfully
66-
- durationcheck # check for two durations multiplied together
67-
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
68-
- exhaustive # check exhaustiveness of enum switch statements
69-
- forbidigo # Forbids identifiers
70-
- gochecknoinits # Checks that no init functions are present in Go code
71-
- goconst # Finds repeated strings that could be replaced by a constant
72-
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
73-
- godot # Check if comments end in a period
74-
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt.
75-
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
76-
- goprintffuncname # Checks that printf-like functions are named with f at the end
77-
- gosec # Inspects source code for security problems
78-
- nakedret # Finds naked returns in functions greater than a specified function length
79-
- nilerr # Finds the code that returns nil even if it checks that the error is not nil.
80-
- noctx # noctx finds sending http request without context.Context
81-
- nolintlint # Reports ill-formed or insufficient nolint directives
82-
- nonamedreturns # Reports all named returns
83-
- nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
84-
- predeclared # find code that shadows one of Go's predeclared identifiers
85-
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
86-
- tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
87-
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
88-
- unconvert # Remove unnecessary type conversions
89-
- usestdlibvars # detect the possibility to use variables/constants from the Go standard library
90-
- whitespace # Tool for detection of leading and trailing whitespace
5+
- asasalint
6+
- asciicheck
7+
- bidichk
8+
- bodyclose
9+
- durationcheck
10+
- errcheck
11+
- errorlint
12+
- exhaustive
13+
- forbidigo
14+
- gochecknoinits
15+
- goconst
16+
- gocritic
17+
- godot
18+
- gomoddirectives
19+
- goprintffuncname
20+
- gosec
21+
- govet
22+
- ineffassign
23+
- nakedret
24+
- nilerr
25+
- noctx
26+
- nolintlint
27+
- nonamedreturns
28+
- nosprintfhostport
29+
- predeclared
30+
- revive
31+
- staticcheck
32+
- tparallel
33+
- unconvert
34+
- unused
35+
- usestdlibvars
36+
- whitespace
37+
settings:
38+
exhaustive:
39+
default-signifies-exhaustive: true
40+
gocritic:
41+
enabled-checks:
42+
- ruleguard
43+
settings:
44+
ruleguard:
45+
rules: ${base-path}/tools/rules.go
46+
underef:
47+
skipRecvDeref: false
48+
govet:
49+
disable:
50+
- fieldalignment
51+
- shadow
52+
enable-all: true
53+
nakedret:
54+
max-func-lines: 0
55+
nolintlint:
56+
require-explanation: true
57+
require-specific: true
58+
allow-no-explanation:
59+
- forbidigo
60+
- tracecheck
61+
- gomnd
62+
- gochecknoinits
63+
- makezero
64+
revive:
65+
severity: error
66+
rules:
67+
- name: atomic
68+
- name: line-length-limit
69+
arguments:
70+
- 200
71+
- name: unhandled-error
72+
arguments:
73+
- fmt.Printf
74+
- fmt.Println
75+
- fmt.Fprint
76+
- fmt.Fprintf
77+
- fmt.Fprintln
78+
- os.Stderr.Sync
79+
- sb.WriteString
80+
- buf.WriteString
81+
- hasher.Write
82+
- os.Setenv
83+
- os.RemoveAll
84+
- name: var-naming
85+
arguments:
86+
- - ID
87+
- URL
88+
- HTTP
89+
- API
90+
- []
91+
exclusions:
92+
generated: lax
93+
presets:
94+
- comments
95+
- common-false-positives
96+
- legacy
97+
- std-error-handling
98+
rules:
99+
- linters:
100+
- godot
101+
source: (TODO)
102+
paths:
103+
- third_party$
104+
- builtin$
105+
- examples$
91106
issues:
92107
max-same-issues: 50
93-
exclude-rules:
94-
# Don't require TODO comments to end in a period
95-
- source: "(TODO)"
96-
linters: [godot]
108+
formatters:
109+
enable:
110+
- goimports
111+
exclusions:
112+
generated: lax
113+
paths:
114+
- third_party$
115+
- builtin$
116+
- examples$

go.mod

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
module github.com/conductorone/baton-databricks
22

3-
go 1.23
3+
go 1.23.4
44

5-
toolchain go1.23.6
5+
toolchain go1.24.2
66

77
require (
8-
github.com/conductorone/baton-sdk v0.2.67
8+
github.com/conductorone/baton-sdk v0.3.9
99
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
1010
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
1111
github.com/quasilyte/go-ruleguard/dsl v0.3.22
1212
github.com/spf13/viper v1.19.0
1313
go.uber.org/zap v1.27.0
14-
golang.org/x/oauth2 v0.25.0
15-
google.golang.org/protobuf v1.36.4
14+
golang.org/x/oauth2 v0.26.0
15+
google.golang.org/protobuf v1.36.5
1616
)
1717

1818
require (
1919
filippo.io/age v1.2.1 // indirect
2020
filippo.io/edwards25519 v1.1.0 // indirect
2121
github.com/deckarep/golang-set/v2 v2.7.0 // indirect
2222
github.com/ncruces/go-strftime v0.1.9 // indirect
23-
go.opentelemetry.io/otel v1.34.0 // indirect
24-
go.opentelemetry.io/otel/metric v1.34.0 // indirect
23+
go.opentelemetry.io/otel v1.35.0 // indirect
24+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
2525
)
2626

2727
require (
28-
github.com/aws/aws-sdk-go-v2 v1.34.0 // indirect
29-
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 // indirect
28+
github.com/aws/aws-lambda-go v1.47.0 // indirect
29+
github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
30+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
3031
github.com/aws/aws-sdk-go-v2/config v1.29.2 // indirect
3132
github.com/aws/aws-sdk-go-v2/credentials v1.17.55 // indirect
3233
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 // indirect
3334
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55 // indirect
34-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.29 // indirect
35-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.29 // indirect
35+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
36+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
3637
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
3738
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29 // indirect
3839
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
3940
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 // indirect
4041
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 // indirect
4142
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 // indirect
43+
github.com/aws/aws-sdk-go-v2/service/lambda v1.71.0 // indirect
4244
github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 // indirect
4345
github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 // indirect
4446
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 // indirect
4547
github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 // indirect
4648
github.com/aws/smithy-go v1.22.2 // indirect
4749
github.com/benbjohnson/clock v1.3.5 // indirect
4850
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
51+
github.com/conductorone/dpop v0.2.3 // indirect
52+
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 // indirect
53+
github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3 // indirect
4954
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5055
github.com/dolthub/maphash v0.1.0 // indirect
5156
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
@@ -54,15 +59,16 @@ require (
5459
github.com/fsnotify/fsnotify v1.8.0 // indirect
5560
github.com/gammazero/deque v1.0.0 // indirect
5661
github.com/glebarez/go-sqlite v1.22.0 // indirect
57-
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
62+
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
5863
github.com/go-logr/logr v1.4.2 // indirect
5964
github.com/go-logr/stdr v1.2.2 // indirect
6065
github.com/go-ole/go-ole v1.3.0 // indirect
6166
github.com/golang/protobuf v1.5.4 // indirect
6267
github.com/google/uuid v1.6.0 // indirect
63-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect
68+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
6469
github.com/hashicorp/hcl v1.0.0 // indirect
6570
github.com/inconshreveable/mousetrap v1.1.0 // indirect
71+
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
6672
github.com/klauspost/compress v1.17.11 // indirect
6773
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
6874
github.com/magiconair/properties v1.8.9 // indirect
@@ -72,7 +78,9 @@ require (
7278
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
7379
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7480
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
81+
github.com/pquerna/cachecontrol v0.2.0 // indirect
7582
github.com/pquerna/xjwt v0.3.0 // indirect
83+
github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f // indirect
7684
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
7785
github.com/sagikazarmark/locafero v0.7.0 // indirect
7886
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@@ -90,23 +98,27 @@ require (
9098
github.com/tklauser/numcpus v0.9.0 // indirect
9199
github.com/yusufpapurcu/wmi v1.2.4 // indirect
92100
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
101+
go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect
93102
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
103+
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0 // indirect
94104
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
95105
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
96-
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
97-
go.opentelemetry.io/otel/trace v1.34.0 // indirect
106+
go.opentelemetry.io/otel/log v0.11.0 // indirect
107+
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
108+
go.opentelemetry.io/otel/sdk/log v0.11.0 // indirect
109+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
98110
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
99111
go.uber.org/multierr v1.11.0 // indirect
100112
go.uber.org/ratelimit v0.3.1 // indirect
101-
golang.org/x/crypto v0.32.0 // indirect
113+
golang.org/x/crypto v0.34.0 // indirect
102114
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
103-
golang.org/x/net v0.34.0 // indirect
115+
golang.org/x/net v0.35.0 // indirect
104116
golang.org/x/sync v0.11.0 // indirect
105-
golang.org/x/sys v0.29.0 // indirect
106-
golang.org/x/text v0.21.0 // indirect
107-
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect
108-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287 // indirect
109-
google.golang.org/grpc v1.70.0 // indirect
117+
golang.org/x/sys v0.30.0 // indirect
118+
golang.org/x/text v0.22.0 // indirect
119+
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
120+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
121+
google.golang.org/grpc v1.71.0 // indirect
110122
gopkg.in/ini.v1 v1.67.0 // indirect
111123
gopkg.in/yaml.v2 v2.4.0 // indirect
112124
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)