Copilot commented on code in PR #64493:
URL: https://github.com/apache/airflow/pull/64493#discussion_r3025331996


##########
go-sdk/example/bundle/main.go:
##########
@@ -45,7 +45,7 @@ func (m *myBundle) GetBundleVersion() v1.BundleInfo {
 }
 
 func (m *myBundle) RegisterDags(dagbag v1.Registry) error {
-       tutorial_dag := dagbag.AddDag("tutorial_dag")
+       tutorial_dag := dagbag.AddDag("simple_dag")
        tutorial_dag.AddTask(extract)
        tutorial_dag.AddTask(transform)
        tutorial_dag.AddTask(load)

Review Comment:
   The variable name tutorial_dag is now misleading since the DAG id is 
"simple_dag". Renaming the local variable to match (e.g. simpleDag/simple_dag) 
will make the example clearer and avoid confusion when copying/pasting.
   ```suggestion
        simpleDag := dagbag.AddDag("simple_dag")
        simpleDag.AddTask(extract)
        simpleDag.AddTask(transform)
        simpleDag.AddTask(load)
   ```



##########
go-sdk/edge/worker.go:
##########
@@ -452,5 +452,8 @@ func (w *worker) runWorkload(
 
        bundleClient := raw.(bundlev1client.BundleClient)
        err = bundleClient.ExecuteTaskWorkload(ctx, workload)
+       if err != nil {
+               w.logger.Error("Workload failed", "error", err)

Review Comment:
   This file already uses the logging.AttrErr(err) helper for structured error 
logging (e.g. go-sdk/edge/worker.go:285). To keep log fields consistent for 
querying/parsing, consider using the same pattern here instead of the custom 
key "error".
   ```suggestion
                w.logger.Error("Workload failed", logging.AttrErr(err))
   ```



-- 
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