Go SDK: stop logging fetched edge workloads verbatim#68355
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
|
Nice cleanup — the structured One thing I think this misses: there's a third site that still logs the workload verbatim, at Debug level — // go-sdk/edge/worker.go
case workload := <-workloadsChan:
w.logger.Debug("Got allocation", "workload", workload)
Two options:
I'd lean toward (2) as the more durable fix, optionally combined with (1) for this site. Minor nit: Thanks for the careful work on this! |
ashb
left a comment
There was a problem hiding this comment.
Please use https://pkg.go.dev/log/slog?ref=blog.arcjet.com#LogValuer -- it's built in to slog.
|
@ashb @potiuk thanks for the careful review! Addressed in c3d96ef. I updated the worker logging to use |
c3d96ef to
ee4d12a
Compare
This changes the Go edge worker to stop logging fetched jobs as raw structs in
fetchJob.Instead of logging the full API response and decoded workload, the worker now logs only non-sensitive execution identifiers and metadata. This keeps the fetch log useful for debugging while avoiding accidental disclosure of token- bearing workload fields.
A regression test was added to verify that
fetchJobstill preserves the workload token for execution, but does not emit it to logs.Was generative AI tooling used to co-author this PR?
Generated-by: Codex following the guidelines