diff --git a/flytepropeller/pkg/compiler/validators/typing.go b/flytepropeller/pkg/compiler/validators/typing.go index 2dc3c3ae2d..ca1ca03148 100644 --- a/flytepropeller/pkg/compiler/validators/typing.go +++ b/flytepropeller/pkg/compiler/validators/typing.go @@ -30,12 +30,12 @@ func isSuperTypeInJSON(sourceMetaData, targetMetaData *structpb.Struct) bool { srcSchemaBytes, err := json.Marshal(sourceMetaData.GetFields()) if err != nil { - logger.Infof(context.Background(), "Failed to marshal source metadata: %v", err) + logger.Infof(context.Background(), "Failed to marshal source metadata: [%v]", err) return false } tgtSchemaBytes, err := json.Marshal(targetMetaData.GetFields()) if err != nil { - logger.Infof(context.Background(), "Failed to marshal target metadata: %v", err) + logger.Infof(context.Background(), "Failed to marshal target metadata: [%v]", err) return false } @@ -43,23 +43,23 @@ func isSuperTypeInJSON(sourceMetaData, targetMetaData *structpb.Struct) bool { err = compiler.AddResource("src", bytes.NewReader(srcSchemaBytes)) if err != nil { - logger.Infof(context.Background(), "Failed to add resource to compiler: %v", err) + logger.Infof(context.Background(), "Failed to add resource to compiler: [%v]", err) return false } err = compiler.AddResource("tgt", bytes.NewReader(tgtSchemaBytes)) if err != nil { - logger.Infof(context.Background(), "Failed to add resource to compiler: %v", err) + logger.Infof(context.Background(), "Failed to add resource to compiler: [%v]", err) return false } srcSchema, err := compiler.Compile("src") if err != nil { - logger.Infof(context.Background(), "Failed to compile source schema: %v", err) + logger.Infof(context.Background(), "Failed to compile source schema: [%v]", err) return false } tgtSchema, err := compiler.Compile("tgt") if err != nil { - logger.Infof(context.Background(), "Failed to compile target schema: %v", err) + logger.Infof(context.Background(), "Failed to compile target schema: [%v]", err) return false } @@ -81,20 +81,20 @@ func isSuperTypeInJSON(sourceMetaData, targetMetaData *structpb.Struct) bool { func isSameTypeInJSON(sourceMetaData, targetMetaData *structpb.Struct) bool { srcSchemaBytes, err := json.Marshal(sourceMetaData.GetFields()) if err != nil { - logger.Infof(context.Background(), "Failed to marshal source metadata: %v", err) + logger.Infof(context.Background(), "Failed to marshal source metadata: [%v]", err) return false } tgtSchemaBytes, err := json.Marshal(targetMetaData.GetFields()) if err != nil { - logger.Infof(context.Background(), "Failed to marshal target metadata: %v", err) + logger.Infof(context.Background(), "Failed to marshal target metadata: [%v]", err) return false } // Use jsondiff to compare the two schemas patch, err := jsondiff.CompareJSON(srcSchemaBytes, tgtSchemaBytes) if err != nil { - logger.Infof(context.Background(), "Failed to compare JSON schemas: %v", err) + logger.Infof(context.Background(), "Failed to compare JSON schemas: [%v]", err) return false }