Skip to content
Closed
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ go 1.26
require (
github.com/go-redis/redismock/v9 v9.2.0
github.com/redis/go-redis/v9 v9.18.0
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
github.com/streamingfast/dgrpc v0.0.0-20260420180129-8b81f2664993
github.com/streamingfast/logging v0.0.0-20260108192805-38f96de0a641
github.com/stretchr/testify v1.11.1
Expand Down Expand Up @@ -75,9 +77,7 @@ require (
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/cobra v1.10.2 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/viper v1.21.0 // indirect
github.com/streamingfast/dmetrics v0.0.0-20250711072030-f023e918a175 // indirect
github.com/streamingfast/sf-tracing v0.0.0-20251218140752-bafd5572499f // indirect
github.com/streamingfast/shutter v1.5.0 // indirect
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfU
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
Expand Down Expand Up @@ -212,7 +212,6 @@ github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
Expand Down
6 changes: 3 additions & 3 deletions grpc/services/hosted.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewHosted(k8sClient kubernetes.Interface, namespace string, redisClient *re
}

func (s *Hosted) Deploy(ctx context.Context, req *pbservice.DeploymentRequest) (*pbservice.DeploymentResult, error) {
s.logger.Info("deploy request received")
s.logger.Info("deploy request received", zap.String("user_id", req.GetUserId()))

deploymentRequest := req.GetDeploymentRequest()
if deploymentRequest == nil {
Expand All @@ -51,7 +51,7 @@ func (s *Hosted) Deploy(ctx context.Context, req *pbservice.DeploymentRequest) (
return nil, fmt.Errorf("creating deployer: %w", err)
}

if err := d.Deploy(ctx, req.GetDeploymentId(), req.GetOrganizationId(), req.GetApiKey()); err != nil {
if err := d.Deploy(ctx, req.GetDeploymentId(), req.GetOrganizationId(), req.GetUserId(), req.GetApiKey()); err != nil {
s.logger.Error("failed to deploy", zap.Error(err))
return nil, fmt.Errorf("deploying: %w", err)
}
Expand All @@ -60,7 +60,7 @@ func (s *Hosted) Deploy(ctx context.Context, req *pbservice.DeploymentRequest) (
s.logger.Error("failed to start tracker", zap.String("deployment_id", req.GetDeploymentId()), zap.Error(err))
}

s.logger.Info("deploy request completed successfully", zap.String("deployment_id", req.GetDeploymentId()))
s.logger.Info("deploy request completed successfully", zap.String("deployment_id", req.GetDeploymentId()), zap.String("user_id", req.GetUserId()))
return &pbservice.DeploymentResult{}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion k8s/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

type Deployer interface {
Deploy(ctx context.Context, deploymentID, organizationID, apiKey string) error
Deploy(ctx context.Context, deploymentID, organizationID, userID, apiKey string) error
}

func New(k8sClient kubernetes.Interface, namespace string, logger *zap.Logger, deploymentRequest *pbcommon.DeploymentRequest) (Deployer, error) {
Expand Down
3 changes: 2 additions & 1 deletion k8s/deployer/sink_sql_from_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewSinkSqlFromProto(k8sClient kubernetes.Interface, namespace string, logge
}
}

func (d *SinkSqlFromProto) Deploy(ctx context.Context, deploymentID, organizationID, apiKey string) error {
func (d *SinkSqlFromProto) Deploy(ctx context.Context, deploymentID, organizationID, userID, apiKey string) error {
deployment := d.deployment
podName := podName(organizationID, deployment.GetExecutionConfig())

Expand Down Expand Up @@ -76,6 +76,7 @@ func (d *SinkSqlFromProto) Deploy(ctx context.Context, deploymentID, organizatio
"managed-by": "services-control-plane",
"deployment-id": deploymentID,
"organization-id": organizationID,
"user-id": userID,
"output-module": strings.ReplaceAll(execCfg.GetOutputModule(), ":", "-"),
}

Expand Down
2 changes: 1 addition & 1 deletion pb/sf/hosted/common/v1/deployment.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pb/sf/hosted/common/v1/output_config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pb/sf/hosted/service/v1/pod_state.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 18 additions & 9 deletions pb/sf/hosted/service/v1/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pb/sf/hosted/service/v1/service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions proto-internal/sf/hosted/service/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ service HostedService {
message DeploymentRequest {
string deployment_id = 1;
string organization_id = 2;
string name = 3;
sf.hosted.common.v1.DeploymentRequest deployment_request = 4;
string api_key = 5;
string user_id = 3;
string name = 4;
sf.hosted.common.v1.DeploymentRequest deployment_request = 5;
string api_key = 6;
}

message DeploymentResult {
Expand Down
Loading