Skip to content

Lower the unmatched-ACL-target log to debug#51

Merged
gmr merged 1 commit into
mainfrom
fix/acl-target-debug
Jun 16, 2026
Merged

Lower the unmatched-ACL-target log to debug#51
gmr merged 1 commit into
mainfrom
fix/acl-target-debug

Conversation

@gmr

@gmr gmr commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Drop the per-grant "ACL target … not found in the project" message from warn to debug.

Problem

A build against a production database emits one of these warnings for every grant whose target object the project does not track — extension-owned, foreign, or platform-managed (e.g. RDS) objects:

[WARN] ACL target TABLE pgq.tick not found in the project
[WARN] ACL target TABLE public.pg_stat_statements not found in the project
[WARN] ACL target TABLE rds_pgbouncer_auth.users not found in the project
...

There are dozens on a real schema. The grant is still emitted regardless, so these are benign noise rather than actionable warnings.

Solution

Lower the log to debug (still available with --debug) and note inline that the grant is emitted anyway. No behavior change to the build output.

Testing

cargo fmt, cargo clippy --all-targets -- -D warnings, cargo test (build::acls tests pass).

Summary by CodeRabbit

  • Bug Fixes
    • Reduced log noise by demoting non-critical ACL dependency warnings to debug level, as these messages commonly occur for certain object types that don't require action.

A build against a production database emits one warning per grant whose
target object the project does not track — extension-owned, foreign, or
platform-managed (e.g. RDS) objects — dozens of them on a real schema.
The grant is still emitted regardless, so the warning is noise, not a
problem. Drop it to debug.

Co-authored-by: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 098f32a3-8ae5-4a8e-a31c-efc9a2e53feb

📥 Commits

Reviewing files that changed from the base of the PR and between deb10a9 and 7ec130f.

📒 Files selected for processing (1)
  • src/build/acls.rs

📝 Walkthrough

Walkthrough

In dump_acls, the log level for missing ACL dependency targets is downgraded from log::warn! to log::debug!. Inline comments are added to explain this case as common and benign for extension-owned, foreign, or platform-managed objects not tracked by the project.

Changes

ACL Log Level Adjustment

Layer / File(s) Summary
Downgrade missing ACL target log to debug
src/build/acls.rs
log::warn! replaced with log::debug! for the "ACL target not found in project" case; inline comments clarify the scenario as benign for untracked objects.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A warning once shouted, now whispers instead,
"The object's not ours — no cause for dread!"
Extensions and platforms may own what they will,
A debug log suffices, no panic, no shrill.
🐇 The rabbit nods softly and hops down the hill.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and accurately reflects the main change: lowering the log level for unmatched ACL target messages from WARN to DEBUG, which is the core objective of this pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/acl-target-debug

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

@gmr

gmr commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

Automated PR monitoring complete: this PR is in a clean, mergeable state.

  • CI: green (test + CodeRabbit checks succeeded)
  • Review threads: 0 unresolved
  • Reviews current with HEAD (7ec130f)

No merge performed per request.

@gmr gmr merged commit f509a5d into main Jun 16, 2026
2 checks passed
@gmr gmr deleted the fix/acl-target-debug branch June 16, 2026 18:22
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.

1 participant