Logging updates#5034
Conversation
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates logging formats and verbosity across legacy middleware and GitHub integration code, plus a helper script and docs, to make request attribution and CLA-gate decisions easier to diagnose while reducing overly-verbose debug output.
Changes:
- Make
utils/lookup_all_logs.shdefaultSTAGE=devonly when unset, allowing an externally-provided stage to be honored. - Change legacy request logging to include
backend=cla-backend-legacyin the request-path log line and remove redundant per-request backend marker lines; update README examples accordingly. - Reduce/reshape debug logging in
cla-backend-goGitHub repository logic, promote some events/decisions toInfo/Warn, and add additional context on legacy check-run creation failures.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| utils/lookup_all_logs.sh | Defaults STAGE to dev only if not set, preserving caller-provided stage for log lookups. |
| cla-backend-legacy/README.md | Updates documentation/examples for the new legacy request log line formats. |
| cla-backend-legacy/internal/middleware/request_log.go | Emits request-path logs with an explicit backend marker and removes redundant backend-only log lines. |
| cla-backend-go/github/github_repository.go | Refines log verbosity/levels around author details, caches, comment edits, CLA gate decisions, and check-run failure diagnostics. |
| coAuthors := GetCoAuthorsFromCommit(ctx, commit) | ||
| log.WithFields(f).Debugf("co-authors found: %s", coAuthors) | ||
| if len(coAuthors) > 0 { | ||
| log.WithFields(f).Debugf("co-authors found: %s", coAuthors) |
| "x-accepted-github-perms": resp.Response.Header.Get("X-Accepted-GitHub-Permissions"), | ||
| "x-oauth-scopes": resp.Response.Header.Get("X-OAuth-Scopes"), | ||
| "x-github-request-id": resp.Response.Header.Get("X-GitHub-Request-Id"), | ||
| }).Warnf("check-run create failed; see X-Accepted-GitHub-Permissions for required GitHub App permissions") |
No description provided.