jason810496 commented on code in PR #73820:
URL: https://github.com/apache/airflow/pull/73820#discussion_r4367351879


##########
go-sdk/pkg/execution/logger_test.go:
##########
@@ -357,6 +358,34 @@ func TestSocketLogHandlerStandardFieldsOverrideAttrs(t 
*testing.T) {
        assert.Equal(t, "example", entry["logger"])
 }
 
+func TestSocketLogHandlerEventAndTimestampOverrideAttrs(t *testing.T) {
+       for _, tt := range []struct {
+               key string
+               val any
+       }{
+               {key: "event", val: "user value"},
+               {key: "timestamp", val: 12345},
+       } {
+               t.Run(tt.key, func(t *testing.T) {
+                       var buf bytes.Buffer
+                       handler := NewSocketLogHandler(&buf, slog.LevelDebug)
+                       logger := slog.New(handler).With(tt.key, tt.val)

Review Comment:
   > Python doesn't even allow this collision , structlog raises TypeError for 
logger.info("msg", event="x").
   
   I think we should follow the Python side behavior to reject the `event` and 
`timestamp` field being set.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to