Skip to content

Commit

Permalink
Merge pull request #2811 from redpanda-data/fix-lints
Browse files Browse the repository at this point in the history
Fix lints and add missing cloud components
  • Loading branch information
Jeffail authored Aug 27, 2024
2 parents 18c2226 + 654db76 commit 7b673f8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 29 deletions.
22 changes: 0 additions & 22 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ builds:
-X main.DateBuilt={{.Date}}
-X main.BinaryName=redpanda-connect
- id: connect-community
main: cmd/redpanda-connect-community/main.go
binary: redpanda-connect
goos: [ darwin, linux ]
goarch: [ amd64, arm64 ]
env:
- CGO_ENABLED=0
ldflags: >
-s -w
-X main.Version={{.Version}}
-X main.DateBuilt={{.Date}}
-X main.BinaryName=redpanda-connect
- id: connect-lambda
main: cmd/serverless/connect-lambda/main.go
binary: redpanda-connect-lambda
Expand Down Expand Up @@ -90,15 +77,6 @@ archives:
- CHANGELOG.md
- licenses

- id: connect-community
builds: [ connect-community ]
format: tar.gz
name_template: 'redpanda-connect-community_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
files:
- README.md
- CHANGELOG.md
- licenses

- id: connect-lambda
builds: [ connect-lambda ]
format: zip
Expand Down
1 change: 1 addition & 0 deletions internal/impl/aws/processor_bedrock.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/bedrockruntime"
bedrocktypes "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types"
"github.com/redpanda-data/benthos/v4/public/service"

"github.com/redpanda-data/connect/v4/internal/impl/aws/config"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/impl/azure/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ input:
require.True(t, pager.More())
page, err := pager.NextPage(ctx)
require.NoError(t, err)
require.Len(t, page.Segment.BlobItems, 0)
require.Empty(t, page.Segment.BlobItems)
})

t.Run("blob_storage_append", func(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions internal/impl/cassandra/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ func (d *decorator) Attempt(q gocql.RetryableQuery) bool {
return true
}

func getExponentialTime(min, max time.Duration, attempts int) time.Duration {
minFloat := float64(min)
func getExponentialTime(minDur, maxDur time.Duration, attempts int) time.Duration {
minFloat := float64(minDur)
napDuration := minFloat * math.Pow(2, float64(attempts-1))

// Add some jitter
napDuration += rand.Float64()*minFloat - (minFloat / 2)
if napDuration > float64(max) {
return max
if napDuration > float64(maxDur) {
return maxDur
}
return time.Duration(napDuration)
}
Expand Down
3 changes: 1 addition & 2 deletions internal/impl/gcp/integration_pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (

func TestIntegrationGCPPubSub(t *testing.T) {
integration.CheckSkip(t)
t.Parallel()

pool, err := dockertest.NewPool("")
require.NoError(t, err)
Expand All @@ -55,7 +54,7 @@ func TestIntegrationGCPPubSub(t *testing.T) {
assert.NoError(t, pool.Purge(resource))
})

require.NoError(t, os.Setenv("PUBSUB_EMULATOR_HOST", fmt.Sprintf("localhost:%v", resource.GetPort("8681/tcp"))))
t.Setenv("PUBSUB_EMULATOR_HOST", fmt.Sprintf("localhost:%v", resource.GetPort("8681/tcp")))
require.NotEqual(t, "localhost:", os.Getenv("PUBSUB_EMULATOR_HOST"))

_ = resource.Expire(900)
Expand Down
1 change: 1 addition & 0 deletions internal/impl/ollama/base_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/dustin/go-humanize"
"github.com/ollama/ollama/api"
"github.com/redpanda-data/benthos/v4/public/service"

"github.com/redpanda-data/connect/v4/internal/singleton"
)

Expand Down
9 changes: 9 additions & 0 deletions public/schema/cloud_allow_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,28 @@ websocket
workflow

# Broker and operational types
branch
broker
catch
parallel
processors
switch
for_each
drop
batched
resource
inproc
insert_part
sequence
read_until
sync_response
try
drop_on
fallback
reject
reject_errored
retry
switch
none
while

0 comments on commit 7b673f8

Please sign in to comment.