Skip to content

Surface BanyanDB config in /debugging/config/dump via a ConfigDumpExtension SPI#13932

Merged
wu-sheng merged 2 commits into
masterfrom
feature/banyandb-config-dump-extension
Jun 30, 2026
Merged

Surface BanyanDB config in /debugging/config/dump via a ConfigDumpExtension SPI#13932
wu-sheng merged 2 commits into
masterfrom
feature/banyandb-config-dump-extension

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

Surface the effective BanyanDB configuration (bydb.yml / bydb-topn.yml) in the /debugging/config/dump admin API

Since 10.2.0 the BanyanDB storage configuration lives in dedicated bydb.yml / bydb-topn.yml files, loaded into a POJO held privately by BanyanDBStorageProvider. The boot-time /debugging/config/dump only reflects application.yml, so a BanyanDB deployment showed an empty storage.banyandb block in the dump while ES/JDBC showed their full storage config — even though bydb.yml is full of ${ENV:default} placeholders, exactly what the dump promises to resolve.

This adds a generic ConfigDumpExtension SPI on ServerStatusService: any module that loads configuration from a secondary file can register an extension contributing extra effective rows, which are merged into the same ConfigList and masked centrally by the existing secret-keyword list. BanyanDBStorageProvider.start() registers an extension that flattens its already-loaded, environment-resolved config into storage.banyandb.* (TopN rules under storage.banyandb.topN.*), reading the in-memory POJO rather than re-reading the file (so values are post-env-override, not raw ${...}).

  • The status module stays storage-agnostic — the dependency arrow remains plugin → core (registration through the existing CoreModule getService seam; no ModuleManager change).
  • The Horizon UI needs no change: it groups by the first dotted segment, so the new keys fold into the existing storage group, and masked values render via the existing v === '******' styling.

Verified end-to-end against a live OAP + BanyanDB boot: text and JSON dump formats, user/password masked to ******, env overrides resolved, warm+cold lifecycle stages and all TopN rules flattened correctly.

  • If this is non-trivial feature, paste the links/URLs to the design doc.

  • Update the documentation to include this new feature.

  • Tests(including UT, IT, E2E) are added to verify the new feature.

  • If it's UI related, attach the screenshots below.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.

  • Update the CHANGES log.

…sion SPI

The BanyanDB storage config moved to a separate bydb.yml / bydb-topn.yml in
10.2.0, so a BanyanDB deployment showed an empty storage.banyandb block in the
/debugging/config/dump admin API while ES/JDBC showed theirs.

Add a generic ConfigDumpExtension SPI on ServerStatusService that any module
loading configuration from a secondary file can implement. BanyanDB registers
an extension that flattens its already-loaded, environment-resolved config into
storage.banyandb.* (TopN rules under storage.banyandb.topN.*), merged into the
same dump and masked centrally by the existing secret-keyword list. The status
module stays storage-agnostic (dependency arrow plugin -> core); the Horizon UI
needs no change since it groups by the first dotted segment.

Adds UTs for the core merge+mask and the flattener, plus a representative
config-dump assertion on the banyandb storage e2e case.
@wu-sheng wu-sheng added this to the 11.0.0 milestone Jun 30, 2026
@wu-sheng wu-sheng added backend OAP backend related. enhancement Enhancement on performance or codes labels Jun 30, 2026
The 'Protect The Secrets' example showed the mask as '********' (8), but
ServerStatusService.maskConfigValue returns '******' (6), which is also what
the Horizon UI's isMasked check expects. Align the example with the actual
output (matching the BanyanDB section added in this PR).
@wu-sheng wu-sheng merged commit 08b0804 into master Jun 30, 2026
439 of 445 checks passed
@wu-sheng wu-sheng deleted the feature/banyandb-config-dump-extension branch June 30, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. enhancement Enhancement on performance or codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants