Skip to content

Commit

Permalink
add periods as allowed ids + fix http log (#1307)
Browse files Browse the repository at this point in the history
* add periods as allowed ids + fix http log

* add periods as allowed ids for pipelines
  • Loading branch information
maha-hajja authored Dec 7, 2023
1 parent adb7883 commit bda52d4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/conduit/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func (r *Runtime) serveHTTP(
) (net.Addr, error) {
ln, err := net.Listen("tcp", srv.Addr)
if err != nil {
return nil, cerrors.Errorf("failed to listen on address %q: %w", r.Config.API.GRPC.Address, err)
return nil, cerrors.Errorf("failed to listen on address %q: %w", r.Config.API.HTTP.Address, err)
}

t.Go(func() error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/conduitio/conduit/pkg/foundation/multierror"
)

var idRegex = regexp.MustCompile(`^[A-Za-z0-9-_:]*$`)
var idRegex = regexp.MustCompile(`^[A-Za-z0-9-_:.]*$`)

// Service manages connectors.
type Service struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func TestService_Create_ValidateSuccess(t *testing.T) {
},
}, {
name: "valid connector ID",
connID: "Aa0-_",
connID: "Aa0-_.",
data: Config{
Name: "test-connector",
Settings: map[string]string{"foo": "bar"},
Expand Down
2 changes: 1 addition & 1 deletion pkg/pipeline/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/conduitio/conduit/pkg/foundation/multierror"
)

var idRegex = regexp.MustCompile(`^[A-Za-z0-9-_:]*$`)
var idRegex = regexp.MustCompile(`^[A-Za-z0-9-_:.]*$`)

type FailureEvent struct {
// ID is the ID of the pipeline which failed.
Expand Down
6 changes: 3 additions & 3 deletions pkg/pipeline/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ func TestService_Create_ValidateSuccess(t *testing.T) {
Description: "",
},
}, {
name: "valid connector ID",
connID: "Aa0-_:",
name: "valid pipeline ID",
connID: "Aa0-_:.",
data: Config{
Name: "test-connector",
Name: "test-pipeline",
Description: "",
},
}}
Expand Down

0 comments on commit bda52d4

Please sign in to comment.