Skip to content

Conversation

@phoebesimon
Copy link
Contributor

@phoebesimon phoebesimon commented Jan 22, 2026

Because we were using a background context here, the logger isn't provided to the action handler, which means we can't log.

Fixes that

Summary by CodeRabbit

  • Bug Fixes
    • Improved logging context propagation in timeout scenarios to enhance debugging and error tracking capabilities.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Walkthrough

Modified the timeout-enabled handler context creation to propagate logging context information from the parent context, replacing context.Background() with a context that preserves the structured logging state via ctxzap.ToContext().

Changes

Cohort / File(s) Summary
Context Logging Propagation
pkg/actions/actions.go
Changed timeout handler context to inherit parent logging context via ctxzap.Extract() and ctxzap.ToContext() instead of using context.Background(), enabling structured logs throughout the timeout-scoped execution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A logger's wish, now gently passed,
Through timeout's door, the context vast,
Where logs can flow and traces stay,
No background noise to cloud the way! 📝✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Pass logger for invoke actions' is directly related to the changeset, which modifies resource-action invocation to propagate the logging context into the timeout-enabled handler context instead of using a plain context.Background().
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@phoebesimon phoebesimon merged commit 89ed438 into main Jan 22, 2026
6 checks passed
@phoebesimon phoebesimon deleted the phoebeyu/logger-for-invoke-actions branch January 22, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants