CBG-5149: Stamp more default values into DefaultDbConfig() for visibility in include_runtime#8047
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses CBG-5149 by ensuring that default configuration values are properly stamped into DefaultDbConfig() so they are visible when users request configuration with the include_runtime parameter. The changes improve configuration transparency and add safeguards against future regressions.
Changes:
- Adds explicit default values to several previously unset fields in
DefaultDbConfig() - Introduces a comprehensive test that validates all
DbConfigfields are either set to defaults or explicitly documented as intentionally unset - Documents the reasoning for fields that intentionally remain unset through an allowlist with explanatory comments
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rest/config_database.go | Stamps default values for SessionCookieName, DisablePasswordAuth, BucketOpTimeoutMs, Guest, ChangesRequestPlus, and ImportPartitions (CE case) |
| rest/config_database_test.go | Adds TestDefaultDbConfigFieldCoverage to ensure all fields in DbConfig have either default values or documented reasons for being unset |
Member
Author
|
@RIT3shSapata I'm not 100% sure but those failing integration tests might be relevant to this change, so I'll take a first-look before your review. |
…they can be visible in the include_runtime config
…nclude_runtime - add test to catch future missed fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CBG-5149
Stamp several default values into
DefaultDbConfig()for visibility in config requests specifyinginclude_runtimeIntegration Tests
GSI=true,xattrs=truehttps://jenkins.sgwdev.com/job/SyncGatewayIntegration/267/