Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions internal/datastore/postgres/common/cancelation.go

This file was deleted.

10 changes: 0 additions & 10 deletions internal/datastore/postgres/common/pgx.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ func ParseConfigWithInstrumentation(url string) (*pgx.ConnConfig, error) {
return connConfig, nil
}

// ConnectWithInstrumentation returns a pgx.Conn that has been instrumented for observability
func ConnectWithInstrumentation(ctx context.Context, url string) (*pgx.Conn, error) {
connConfig, err := ParseConfigWithInstrumentation(url)
if err != nil {
return nil, err
}

return pgx.ConnectConfig(ctx, connConfig)
}

// ConnectWithInstrumentationAndTimeout returns a pgx.Conn that has been instrumented for observability
func ConnectWithInstrumentationAndTimeout(ctx context.Context, url string, connectTimeout time.Duration) (*pgx.Conn, error) {
connConfig, err := ParseConfigWithInstrumentation(url)
Expand Down
2 changes: 0 additions & 2 deletions internal/logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@ func Fatal() *zerolog.Event { return Logger.Fatal() }

func WithLevel(level zerolog.Level) *zerolog.Event { return Logger.WithLevel(level) }

func Log() *zerolog.Event { return Logger.Log() }

func Ctx(ctx context.Context) *zerolog.Logger { return zerolog.Ctx(ctx) }
15 changes: 0 additions & 15 deletions internal/services/shared/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,6 @@ func (err MaxDepthExceededError) GRPCStatus() *status.Status {
)
}

// NewMaxDepthExceededError creates a new MaxDepthExceededError.
func NewMaxDepthExceededError(allowedMaximumDepth uint32, isCheckRequest bool) error {
if isCheckRequest {
return MaxDepthExceededError{
spiceerrors.NewWithAdditionalDetailsError(fmt.Errorf("the check request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. Try running zed with --explain to see the dependency. See "+sharederrors.MaxDepthErrorLink, allowedMaximumDepth)),
allowedMaximumDepth,
}
}

return MaxDepthExceededError{
spiceerrors.NewWithAdditionalDetailsError(fmt.Errorf("the request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. See %s", allowedMaximumDepth, sharederrors.MaxDepthErrorLink)),
allowedMaximumDepth,
}
}

func AsValidationError(err error) *SchemaWriteDataValidationError {
var validationErr SchemaWriteDataValidationError
if errors.As(err, &validationErr) {
Expand Down
Loading