Skip to content

Commit 9086d25

Browse files
mvicknrclaude
andcommitted
fix: Remove internal configs
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1d315f7 commit 9086d25

2 files changed

Lines changed: 32 additions & 96 deletions

File tree

.fleetControl/schemaGeneration/generate-schema.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,15 @@ def status_code_array_or_range(default=None):
306306
# Other server-set / non-Settings-class objects on the tree.
307307
"entity_guid", # server-assigned at connect
308308
"attribute_filter", # AttributeFilter instance, not a config value
309+
# Internal-only QA / debug toggles. Surfacing these as customer-tunable
310+
# would let an end user disable TLS validation, suppress harvests, swap
311+
# logging payloads, etc. -- all of which are support / development
312+
# affordances, not configuration.
313+
"developer_mode",
309314
# Subtree exclusions (use `.*` suffix).
310315
"cross_application_tracer.*", # legacy, replaced by distributed tracing
311316
"process_host.*", # platform-derived (ip_address, display_name, etc.)
317+
"debug.*", # internal QA toggles (cert-validation off-switch, verbose log dumps, etc.)
312318
}
313319

314320

@@ -609,10 +615,29 @@ def generate_schema(settings, descriptions, exclude_keys=None, enum_overrides=No
609615

610616
# ---------------------------------------------------------------------------
611617
# Schema merge -- deep-merges a freshly generated schema into the existing
612-
# one so the published schema only ever grows.
618+
# one so the published schema only ever grows for forward-compatibility
619+
# purposes.
620+
#
621+
# Caveat: the "only ever grows" promise does NOT extend to keys that the
622+
# current generator deliberately excludes via EXCLUDE_KEYS. Filtering those
623+
# out of the old schema before merge guarantees that newly-added exclusions
624+
# actually take effect on the next regeneration, instead of being silently
625+
# resurrected from the prior on-disk schema.
613626
# ---------------------------------------------------------------------------
614627

615628

629+
def filter_excluded(schema, exclude_keys):
630+
"""Return a copy of `schema` with any properties whose dotted path
631+
matches `exclude_keys` removed. Operates on flat top-level property
632+
paths only -- mirrors how is_excluded is used in build_properties.
633+
"""
634+
if not schema or "properties" not in schema:
635+
return schema
636+
filtered = dict(schema)
637+
filtered["properties"] = {k: v for k, v in schema["properties"].items() if not is_excluded(k, exclude_keys)}
638+
return filtered
639+
640+
616641
def merge_schemas(old_s, new_s):
617642
if not old_s:
618643
return new_s
@@ -714,7 +739,12 @@ def main(argv=None):
714739
generated = generate_schema(settings, descriptions)
715740

716741
old_schema = {} if args.force else load_existing(SCHEMA_PATH)
717-
new_schema = merge_schemas(old_schema, generated)
742+
# Drop excluded paths from the prior schema before merging so newly-added
743+
# entries in EXCLUDE_KEYS take effect instead of being preserved by the
744+
# "schema only ever grows" merge. Keep the original around so the diff
745+
# classifier can still surface those removals to reviewers.
746+
filtered_old_schema = filter_excluded(old_schema, EXCLUDE_KEYS)
747+
new_schema = merge_schemas(filtered_old_schema, generated)
718748

719749
validate_meta_schema(new_schema)
720750

.fleetControl/schemas/config.json

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -339,100 +339,6 @@
339339
"type": "boolean",
340340
"default": true
341341
},
342-
"debug.connect_span_stream_in_developer_mode": {
343-
"type": "boolean",
344-
"default": false
345-
},
346-
"debug.disable_api_supportability_metrics": {
347-
"type": "boolean",
348-
"default": false
349-
},
350-
"debug.disable_certificate_validation": {
351-
"type": "boolean",
352-
"default": false
353-
},
354-
"debug.disable_harvest_until_shutdown": {
355-
"type": "boolean",
356-
"default": false
357-
},
358-
"debug.enable_coroutine_profiling": {
359-
"type": "boolean",
360-
"default": false
361-
},
362-
"debug.explain_plan_obfuscation": {
363-
"type": "string",
364-
"default": "simple"
365-
},
366-
"debug.ignore_all_server_settings": {
367-
"type": "boolean",
368-
"default": false
369-
},
370-
"debug.local_settings_overrides": {
371-
"type": "array",
372-
"items": {
373-
"type": "string"
374-
},
375-
"default": []
376-
},
377-
"debug.log_agent_initialization": {
378-
"type": "boolean",
379-
"default": false
380-
},
381-
"debug.log_autorum_middleware": {
382-
"type": "boolean",
383-
"default": false
384-
},
385-
"debug.log_data_collector_calls": {
386-
"type": "boolean",
387-
"default": false
388-
},
389-
"debug.log_data_collector_payloads": {
390-
"type": "boolean",
391-
"default": false
392-
},
393-
"debug.log_explain_plan_queries": {
394-
"type": "boolean",
395-
"default": false
396-
},
397-
"debug.log_malformed_json_data": {
398-
"type": "boolean",
399-
"default": false
400-
},
401-
"debug.log_normalization_rules": {
402-
"type": "boolean",
403-
"default": false
404-
},
405-
"debug.log_normalized_metric_data": {
406-
"type": "boolean",
407-
"default": false
408-
},
409-
"debug.log_raw_metric_data": {
410-
"type": "boolean",
411-
"default": false
412-
},
413-
"debug.log_thread_profile_payload": {
414-
"type": "boolean",
415-
"default": false
416-
},
417-
"debug.log_transaction_trace_payload": {
418-
"type": "boolean",
419-
"default": false
420-
},
421-
"debug.log_untrusted_distributed_trace_keys": {
422-
"type": "boolean",
423-
"default": false
424-
},
425-
"debug.otlp_content_encoding": {
426-
"type": "string"
427-
},
428-
"debug.record_transaction_failure": {
429-
"type": "boolean",
430-
"default": false
431-
},
432-
"developer_mode": {
433-
"type": "boolean",
434-
"default": false
435-
},
436342
"distributed_tracing.enabled": {
437343
"type": "boolean",
438344
"default": true,

0 commit comments

Comments
 (0)