feat: scope config property updates by creator#2171
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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 ignored due to path filters (1)
📒 Files selected for processing (5)
✨ 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 |
2d5d697 to
02a31be
Compare
BenchstatBase:
|
| Benchmark | Base | Head | Change | p-value |
|---|---|---|---|---|
BenchSaveResultsUpdateUnchanged/N=1000-4 |
32.29Mi | 1275.15Mi | +3849.56% 🔴 | 0.002 |
BenchSaveResultsUpdateUnchanged/N=1000-4 |
3.298 | 8.024 | +143.31% 🔴 | 0.002 |
BenchSaveResultsSeed/N=1000-4 |
4.122 | 7.386 | +79.21% 🔴 | 0.002 |
BenchSaveResultsUpdateChanged/N=1000-4 |
797.3Mi | 1317.2Mi | +65.22% 🔴 | 0.002 |
BenchSaveResultsUpdateUnchanged/N=1000-4 |
404.6k | 632.3k | +56.26% 🔴 | 0.002 |
BenchSaveResultsUpdateChanged/N=1000-4 |
7.314 | 11.241 | +53.69% 🔴 | 0.002 |
BenchSaveResultsSeed/N=1000-4 |
446.4k | 661.8k | +48.23% 🔴 | 0.002 |
BenchSaveResultsUpdateChanged/N=1000-4 |
1.002M | 1.155M | +15.31% 🔴 | 0.002 |
✅ 1 improvement(s)
| Benchmark | Base | Head | Change | p-value |
|---|---|---|---|---|
BenchSaveResultsSeed/N=1000-4 |
1.277Gi | 1.248Gi | -2.33% | 0.002 |
Failed: 8 benchmark(s) regressed by more than 5%:
BenchSaveResultsUpdateUnchanged/N=1000-4: 32.29Mi -> 1275.15Mi (+3849.56%)
BenchSaveResultsUpdateUnchanged/N=1000-4: 3.298 -> 8.024 (+143.31%)
BenchSaveResultsSeed/N=1000-4: 4.122 -> 7.386 (+79.21%)
BenchSaveResultsUpdateChanged/N=1000-4: 797.3Mi -> 1317.2Mi (+65.22%)
BenchSaveResultsUpdateUnchanged/N=1000-4: 404.6k -> 632.3k (+56.26%)
BenchSaveResultsUpdateChanged/N=1000-4: 7.314 -> 11.241 (+53.69%)
BenchSaveResultsSeed/N=1000-4: 446.4k -> 661.8k (+48.23%)
BenchSaveResultsUpdateChanged/N=1000-4: 1.002M -> 1.155M (+15.31%)
Full benchstat output
goos: linux
goarch: amd64
pkg: github.com/flanksource/config-db/bench
cpu: AMD EPYC 7763 64-Core Processor
│ bench-base.txt │ bench-head.txt │
│ sec/op │ sec/op vs base │
BenchSaveResultsSeed/N=1000-4 4.122 ± 10% 7.386 ± 2% +79.21% (p=0.002 n=6)
BenchSaveResultsUpdateUnchanged/N=1000-4 3.298 ± 1% 8.024 ± 520% +143.31% (p=0.002 n=6)
BenchSaveResultsUpdateChanged/N=1000-4 7.314 ± 3% 11.241 ± 1% +53.69% (p=0.002 n=6)
geomean 4.633 8.734 +88.53%
│ bench-base.txt │ bench-head.txt │
│ MB/s │ MB/s vs base │
BenchSaveResultsSeed/N=1000-4 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=6) ¹
BenchSaveResultsUpdateUnchanged/N=1000-4 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=6) ¹
BenchSaveResultsUpdateChanged/N=1000-4 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=6) ¹
geomean ² +0.00% ²
¹ all samples are equal
² summaries must be >0 to compute geomean
│ bench-base.txt │ bench-head.txt │
│ B/op │ B/op vs base │
BenchSaveResultsSeed/N=1000-4 1.277Gi ± 0% 1.248Gi ± 0% -2.33% (p=0.002 n=6)
BenchSaveResultsUpdateUnchanged/N=1000-4 32.29Mi ± 0% 1275.15Mi ± 0% +3849.56% (p=0.002 n=6)
BenchSaveResultsUpdateChanged/N=1000-4 797.3Mi ± 1% 1317.2Mi ± 1% +65.22% (p=0.002 n=6)
geomean 322.9Mi 1.260Gi +299.44%
│ bench-base.txt │ bench-head.txt │
│ allocs/op │ allocs/op vs base │
BenchSaveResultsSeed/N=1000-4 446.4k ± 0% 661.8k ± 0% +48.23% (p=0.002 n=6)
BenchSaveResultsUpdateUnchanged/N=1000-4 404.6k ± 0% 632.3k ± 0% +56.26% (p=0.002 n=6)
BenchSaveResultsUpdateChanged/N=1000-4 1.002M ± 13% 1.155M ± 11% +15.31% (p=0.002 n=6)
geomean 565.6k 784.8k +38.75%
58273b9 to
a549deb
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Config item property writes previously replaced the whole JSON array, so scraper updates could clobber manual properties or properties from other scrapers. Route scraper property writes through duty's creator-scoped update helper. Scraper updates now replace only their own property slice, preserve other creators and legacy properties, and send empty observed properties to remove stale scraper-owned entries.
a549deb to
82d8b7e
Compare
|
Abandoning this approach due to high performance hit. |
Config item property writes previously replaced the entire JSON array, which could clobber manually added properties or properties owned by other scrapers.
Route scraper property writes through duty's creator-scoped update helper so each scraper replaces only its own property slice. Empty observed properties now remove stale scraper-owned properties while preserving user-created, other-scraper, and legacy unowned entries.
This draft depends on the duty creator-scoped property helper being merged and released first.
resolves: flanksource/duty#1933