Conversation
Add QueryLogEntry struct and QueryLog collector that can be attached to a context via WithQueryLog(). When present, QueryTimer.End() appends query metadata (name, args, count, duration, error, summary) to the collector for downstream consumption.
Introduces strongly-typed structs for different change detail categories (deployment, backup, pipeline, scaling, etc.) with automatic kind injection during JSON marshaling. Adds constants for all change type values and generates OpenAPI schema for validation.
…ource selectors Extract repeated parent node lookup into findNearestAncestor helper. Add support for semicolon-delimited searches in resource selectors to enable union queries. Include Pretty field in query log entries for formatted output.
…ated union Replace reflective schema generation with handwritten kind-discriminated union schema. Adds UnmarshalChangeDetails for runtime deserialization. Introduces new detail types (Approval, Source, Environment, Event, Test, Promotion, PipelineRun, Change, ConfigChange, Restore, Backup, Dimension, Scale, GroupMembership) and removes old details types (DeploymentDetails, PromotionDetails, ApprovalDetails, RollbackDetails, BackupDetails, PlaybookExecutionDetails, ScalingDetails, CertificateDetails, CostChangeDetails, PipelineRunDetails). BREAKING CHANGE: restructure config change schema to kind-discriminated union
Support static bearer token authentication for Azure connections when client credentials are not provided. Implements TokenCredential interface with a static token provider that defaults expiration to 1 hour.
Enables filtering hierarchical properties by key prefix while maintaining precedence order (CLI/env > local > parent chain > global DB). Returned keys have the prefix stripped for easier consumption.
Add NewGormFromPool to share pgxpool between GORM and direct pgx users, enabling server-side RAISE NOTICE/WARNING messages to flow through ConnConfig.OnNotice. Add ApplySessionProperties to route context properties to Postgres SET LOCAL commands.
…umentation Add alias normalization before edge detection to match trigger behavior. Pre-soft-delete live losers before inserting winners to prevent unique index violations. Fix external_role_id selection in config_access view. Add comprehensive debug logging infrastructure for troubleshooting merge operations.
…y merges Include loser ids in the alias union when merging entities so that future lookups by the old id can recover the winner. Applies to users, groups, and roles. Also refactors alias merging to use parametrized queries and left-joins both temp and live tables.
Implements a rule-based engine to automatically group correlated config_changes into logical change_groups. Supports time-windowed grouping (pod startups), fan-out detection (deployments), temporary access tracking, and incident correlation. Includes explicit group creation and optional periodic closure based on inactivity windows.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 24 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (40)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Benchstat (RLS)Base: 📊 3 minor regression(s) (all within 5% threshold)
✅ 3 improvement(s)
Full benchstat output |
Benchstat (Other)Base:
|
| Benchmark | Base | Head | Change | p-value |
|---|---|---|---|---|
ResourceSelectorConfigs/name_and_type-4 |
231.3µ | 247.4µ | +6.97% 🔴 | 0.002 |
ResourceSelectorConfigs/name-4 |
212.3µ | 223.3µ | +5.17% 🔴 | 0.002 |
ResourceSelectorConfigs/tags-4 |
31.20m | 32.21m | +3.24% | 0.009 |
ResourceSelectorQueryBuild/name-4 |
45.15µ | 45.82µ | +1.48% | 0.009 |
✅ 1 improvement(s)
| Benchmark | Base | Head | Change | p-value |
|---|---|---|---|---|
ResourceSelectorQueryBuild/tags-4 |
18.00µ | 17.84µ | -0.88% | 0.002 |
Failed: 2 benchmark(s) regressed by more than 5%:
ResourceSelectorConfigs/name_and_type-4: 231.3µ -> 247.4µ (+6.97%)
ResourceSelectorConfigs/name-4: 212.3µ -> 223.3µ (+5.17%)
Full benchstat output
goos: linux
goarch: amd64
pkg: github.com/flanksource/duty/bench
cpu: AMD EPYC 7763 64-Core Processor
│ bench-base.txt │ bench-head.txt │
│ sec/op │ sec/op vs base │
InsertionForRowsWithAliases/external_users.aliases-4 604.1µ ± 5% 611.1µ ± 9% ~ (p=0.132 n=6)
InsertionForRowsWithAliases/config_items.external_id-4 1.138m ± 8% 1.146m ± 9% ~ (p=0.937 n=6)
ResourceSelectorConfigs/name-4 212.3µ ± 2% 223.3µ ± 1% +5.17% (p=0.002 n=6)
ResourceSelectorConfigs/name_and_type-4 231.3µ ± 3% 247.4µ ± 5% +6.97% (p=0.002 n=6)
ResourceSelectorConfigs/tags-4 31.20m ± 3% 32.21m ± 2% +3.24% (p=0.009 n=6)
ResourceSelectorQueryBuild/name-4 45.15µ ± 1% 45.82µ ± 1% +1.48% (p=0.009 n=6)
ResourceSelectorQueryBuild/name_and_type-4 65.78µ ± 1% 65.38µ ± 2% ~ (p=0.394 n=6)
ResourceSelectorQueryBuild/tags-4 18.00µ ± 2% 17.84µ ± 0% -0.88% (p=0.002 n=6)
geomean 294.3µ 300.6µ +2.13%
No description provided.