-
-
Notifications
You must be signed in to change notification settings - Fork 278
docs: update documentation for database connection configuration vari… #2611
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
WalkthroughThe changes rename the database pool configuration key Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
docs/performance-test/values.yaml(1 hunks)docs/setting-up/configuration.mdx(4 hunks)example.config.yaml(1 hunks)internal/config/config.go(2 hunks)internal/factories/database.go(2 hunks)pkg/cmd/config.go(2 hunks)pkg/cmd/flags/serve.go(1 hunks)pkg/cmd/serve.go(1 hunks)pkg/database/postgres/consts.go(1 hunks)pkg/database/postgres/options.go(1 hunks)pkg/database/postgres/postgres.go(3 hunks)pkg/database/postgres/postgres_test.go(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
internal/factories/database.go (1)
pkg/database/postgres/options.go (1)
MinIdleConnections(44-48)
pkg/database/postgres/postgres_test.go (2)
pkg/database/postgres/postgres.go (1)
Postgres(22-52)pkg/database/postgres/options.go (1)
MinIdleConnections(44-48)
pkg/cmd/config.go (2)
internal/config/config.go (1)
Database(160-184)pkg/database/postgres/options.go (1)
MinIdleConnections(44-48)
pkg/cmd/serve.go (2)
internal/config/config.go (1)
Database(160-184)pkg/database/postgres/options.go (1)
MinIdleConnections(44-48)
internal/config/config.go (1)
pkg/database/postgres/options.go (1)
MinIdleConnections(44-48)
⏰ 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: Analyze (go)
- GitHub Check: Scan Container for Vulnerabilities
- GitHub Check: Test with Coverage
- GitHub Check: Test with Coverage
🔇 Additional comments (20)
example.config.yaml (1)
84-84: LGTM! Configuration key renamed for clarity.The rename from
min_idle_connstomin_idle_connectionsimproves consistency with themin_connectionsnaming pattern and makes the configuration more explicit.internal/factories/database.go (2)
25-25: LGTM! Documentation updated.Comment correctly references the renamed field
MinIdleConnections.
67-69: LGTM! Field reference updated correctly.The factory now correctly references
conf.MinIdleConnectionsand passes it to the database option.internal/config/config.go (2)
174-174: LGTM! Public field renamed with correct mapstructure tag.The field rename from
MinIdleConnstoMinIdleConnectionsincludes the proper mapstructure tag update tomin_idle_connections, ensuring configuration file compatibility.
364-364: LGTM! Default initialization updated.The default configuration correctly initializes
MinIdleConnectionsto 0.docs/performance-test/values.yaml (1)
114-114: LGTM! Helm values file updated.The configuration key has been correctly renamed to
min_idle_connectionsin the performance test values file.docs/setting-up/configuration.mdx (4)
101-101: LGTM! YAML example updated.The configuration example correctly shows
min_idle_connections: 0.
407-407: LGTM! Structure documentation updated.The configuration structure properly documents
min_idle_connections.
436-436: LGTM! Glossary entry updated.The parameter description correctly references
min_idle_connectionsand accurately describes its mapping to pgxpool MinIdleConns.
463-463: LGTM! Environment variable mapping updated.The environment variable has been correctly renamed to
PERMIFY_DATABASE_MIN_IDLE_CONNECTIONS.pkg/database/postgres/postgres_test.go (2)
188-193: LGTM! Test case updated.The test correctly verifies that
MinIdleConnectionsoption sets theminIdleConnectionsfield.
279-296: LGTM! Backward compatibility tests updated.The test cases correctly verify that
minIdleConnectionsis only set when explicitly configured (> 0).pkg/database/postgres/consts.go (1)
7-7: LGTM! Internal constant renamed.The constant has been correctly renamed from
_defaultMinIdleConnsto_defaultMinIdleConnections.pkg/cmd/flags/serve.go (1)
510-515: LGTM! Flag and environment bindings updated.The viper bindings correctly reference
database.min_idle_connectionsandPERMIFY_DATABASE_MIN_IDLE_CONNECTIONS.pkg/database/postgres/options.go (1)
44-48: LGTM! Internal field alignment improved.The change correctly updates the field assignment to use
minIdleConnections, aligning the internal field name with the externalMinIdleConnectionsfunction name. This improves code consistency.pkg/database/postgres/postgres.go (3)
44-45: LGTM! Field declaration updated correctly.The struct field has been properly renamed from
minIdleConnstominIdleConnections, and the comment accurately describes its purpose mapping to pgxpool's MinIdleConns.
66-77: LGTM! Default initialization updated correctly.The initialization now uses
_defaultMinIdleConnections, maintaining consistency with the renamed field.
115-120: LGTM! Field usage updated correctly.The configuration logic correctly references
minIdleConnectionsthroughout, and the comment accurately explains the behavior.pkg/cmd/config.go (2)
97-97: LGTM! Config command flag updated correctly.The flag definition correctly references
conf.Database.MinIdleConnectionsand uses the new flag namedatabase-min-idle-connections.
227-227: LGTM! Config output updated consistently.The configuration table output correctly displays
database.min_idle_connectionsas the key and referencescfg.Database.MinIdleConnectionsfor the value. ThegetKeyOrigincall properly checks for the updated flag name (database-min-idle-connections) and environment variable (PERMIFY_DATABASE_MIN_IDLE_CONNECTIONS).
…ables
Summary by CodeRabbit
Release Notes
min_idle_connsrenamed tomin_idle_connectionsfor improved consistency. If you use this setting, update your configuration files and environment variables (e.g.,PERMIFY_DATABASE_MIN_IDLE_CONNECTIONS) accordingly.