-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add ip and altIps to searchIndex #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/extensions/migrations/20251005GP-add-ip-altIps-to-searchIndex.js (1)
142-147
: LGTM!The backfill correctly updates all existing
gp_probes
rows with the newsearchIndex
generation logic. Parameter order matches the function signature.Line 145 is quite long. Consider formatting it across multiple lines for better readability:
await trx.raw(` UPDATE gp_probes SET searchIndex = generate_search_index( - userId, name, city, country, countryName, state, stateName, asn, network, continent, continentName, region, tags, systemTags, ip, altIps + userId, name, city, country, countryName, state, stateName, + asn, network, continent, continentName, region, + tags, systemTags, ip, altIps ) `);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/extensions/migrations/20251005GP-add-ip-altIps-to-searchIndex.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{vue,ts,js}
⚙️ CodeRabbit configuration file
We use Nuxt with auto imports enabled. Don't warn about missing imports.
Files:
src/extensions/migrations/20251005GP-add-ip-altIps-to-searchIndex.js
🧬 Code graph analysis (1)
src/extensions/migrations/20251005GP-add-ip-altIps-to-searchIndex.js (1)
src/extensions/migrations/20250611GP-create-search-index-triggers.js (1)
up
(1-116)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Run e2e tests
- GitHub Check: build
- GitHub Check: Run e2e tests
- GitHub Check: build
🔇 Additional comments (4)
src/extensions/migrations/20251005GP-add-ip-altIps-to-searchIndex.js (4)
60-67
: LGTM!The
altIps
JSON array parsing is correct and follows the same pattern assystemTags
.
69-86
: LGTM!The concatenation logic correctly includes all new fields (
githubUsername
,ip
,altIpsText
) and usesCONCAT_WS
which safely handles NULL values.
90-114
: LGTM!The BEFORE INSERT trigger correctly invokes
generate_search_index
with all required parameters in the proper order.
116-140
: LGTM!The BEFORE UPDATE trigger correctly invokes
generate_search_index
with all required parameters in the proper order.
Closes #138