Treat missing PG extension/relation as skip, not failure#5
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughPostgreSQL query collectors now detect "not found" errors for missing tables, functions, schemas, and databases using a new Changes
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 1 |
TIP This summary will be updated as you push new changes. Give us feedback
Summary
Missing PostgreSQL extensions (pg_stat_statements, pg_statviz) and schemas currently report as errors. They should be silent skips like missing system commands — the extension just isn't installed, not a failure.
Adds
isPGUnavailableError()helper that detects these SQLSTATE codes and wraps them asSkipError:42P01undefined_table42704undefined_object42883undefined_function3F000invalid_schema_nameApplied to both
pgQueryCollectorandexecPGQueryOnDB. Real errors (permission denied, syntax errors) still surface as errors.Checklist
TestPGQueryCollectorUnavailableAsSkip— 6 subtests covering skip and real-error cases)