From 4bae10610d49b45981cf091e776ca65f4a8b6ba4 Mon Sep 17 00:00:00 2001 From: Lukasz Stefaniak Date: Tue, 28 Feb 2023 16:42:50 +0100 Subject: [PATCH] Collect used dbt arguments --- cmd/run.go | 1 + gen/clients/v1/dbt.pb.go | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/cmd/run.go b/cmd/run.go index 5059d3e..5d71866 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -59,6 +59,7 @@ var runCmd = &cobra.Command{ dbtResult.EnvVars = collectEnvVars() dbtResult.UploaderVersion = build.Version dbtResult.UploaderBuildTime = build.Time + dbtResult.Args = args if err := uploadArtifactsToSynq(cmd.Context(), dbtResult, token, url); err != nil { logrus.Printf("synq-dbt failed: %s", err.Error()) diff --git a/gen/clients/v1/dbt.pb.go b/gen/clients/v1/dbt.pb.go index 9844aa0..9790f63 100644 --- a/gen/clients/v1/dbt.pb.go +++ b/gen/clients/v1/dbt.pb.go @@ -37,6 +37,7 @@ type DbtResult struct { EnvVars map[string]string `protobuf:"bytes,9,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` StdOut []byte `protobuf:"bytes,10,opt,name=std_out,json=stdOut,proto3" json:"std_out,omitempty"` StdErr []byte `protobuf:"bytes,11,opt,name=std_err,json=stdErr,proto3" json:"std_err,omitempty"` + Args []string `protobuf:"bytes,12,rep,name=args,proto3" json:"args,omitempty"` } func (x *DbtResult) Reset() { @@ -148,6 +149,13 @@ func (x *DbtResult) GetStdErr() []byte { return nil } +func (x *DbtResult) GetArgs() []string { + if x != nil { + return x.Args + } + return nil +} + var File_clients_v1_dbt_proto protoreflect.FileDescriptor var file_clients_v1_dbt_proto_rawDesc = []byte{ @@ -155,7 +163,7 @@ var file_clients_v1_dbt_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb7, 0x04, 0x0a, 0x09, 0x44, 0x62, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x74, 0x6f, 0x22, 0xcb, 0x04, 0x0a, 0x09, 0x44, 0x62, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, @@ -187,13 +195,15 @@ var file_clients_v1_dbt_proto_rawDesc = []byte{ 0x0a, 0x07, 0x73, 0x74, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x74, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x45, 0x72, 0x72, - 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x29, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x65, 0x74, 0x73, 0x79, - 0x6e, 0x71, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x61, 0x72, 0x67, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x65, 0x74, 0x73, 0x79, 0x6e, 0x71, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var (