Skip to content

Commit

Permalink
chore: load file upload (#3552)
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Jul 5, 2023
1 parent 9e7f117 commit a8abd1d
Show file tree
Hide file tree
Showing 9 changed files with 712 additions and 483 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ require (
github.com/xitongsys/parquet-go-source v0.0.0-20230312005205-fbbcdea5f512
go.etcd.io/etcd/api/v3 v3.5.9
go.etcd.io/etcd/client/v3 v3.5.9
go.uber.org/atomic v1.10.0
go.uber.org/automaxprocs v1.5.2
go.uber.org/goleak v1.2.1
golang.org/x/crypto v0.10.0
Expand Down Expand Up @@ -268,7 +269,6 @@ require (
go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/mod v0.10.0 // indirect
Expand Down
10 changes: 6 additions & 4 deletions warehouse/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"fmt"
"strings"

warehouseutils "github.com/rudderlabs/rudder-server/warehouse/utils"

"github.com/rudderlabs/rudder-server/warehouse/integrations/manager"
"github.com/rudderlabs/rudder-server/warehouse/internal/model"
)
Expand All @@ -24,9 +26,9 @@ type ErrorHandler struct {
// MatchErrorMappings matches the error with the error mappings defined in the integrations
// and returns the corresponding joins of the matched error type
// else returns UnknownError
func (e *ErrorHandler) MatchErrorMappings(err error) Tag {
func (e *ErrorHandler) MatchErrorMappings(err error) warehouseutils.Tag {
if e.Manager == nil || err == nil {
return Tag{Name: "error_mapping", Value: string(model.Noop)}
return warehouseutils.Tag{Name: "error_mapping", Value: string(model.Noop)}
}

var (
Expand All @@ -41,7 +43,7 @@ func (e *ErrorHandler) MatchErrorMappings(err error) Tag {
}

if len(errMappings) > 0 {
return Tag{Name: "error_mapping", Value: strings.Join(errMappings, ",")}
return warehouseutils.Tag{Name: "error_mapping", Value: strings.Join(errMappings, ",")}
}
return Tag{Name: "error_mapping", Value: string(model.UnknownError)}
return warehouseutils.Tag{Name: "error_mapping", Value: string(model.UnknownError)}
}
Loading

0 comments on commit a8abd1d

Please sign in to comment.