File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,16 @@ def _describe_config_inner(
188188 condition = f'EXISTS json_get(conf, { ql (fpn )} )'
189189 if is_internal :
190190 condition = f'({ condition } ) AND testmode'
191+ # For INSTANCE, filter out configs that are set to the default.
192+ # This is because we currently implement the defaults by
193+ # setting them with CONFIGURE INSTANCE, so we can't detect
194+ # defaults by seeing what is unset.
195+ if (
196+ scope == qltypes .ConfigScope .INSTANCE
197+ and (default := p .get_default (schema ))
198+ ):
199+ condition = f'({ condition } ) AND { psource } ?!= ({ default .text } )'
200+
191201 items .append (f"(\n { item } \n IF { condition } ELSE ''\n )" )
192202
193203 return items
Original file line number Diff line number Diff line change @@ -1706,6 +1706,11 @@ async def test_server_config_db_config(self):
17061706 http_endpoint_security = args .ServerEndpointSecurityMode .Optional ,
17071707 ) as sd :
17081708 con1 = await sd .connect ()
1709+
1710+ # Shouldn't be anything in INSTANCE CONFIG, to start.
1711+ res = await con1 .query_single ('DESCRIBE INSTANCE CONFIG;' )
1712+ self .assertEqual (res , '' )
1713+
17091714 con2 = await sd .connect ()
17101715
17111716 await con1 .execute ('''
You can’t perform that action at this time.
0 commit comments