Repository navigation
Fix a UI template update on BanyanDB leaving a disabled template disabled - #14133
Merged
Merged
Conversation
…bled DashboardSetting.toEntity() sets disabled to false, and the ElasticSearch and JDBC DAOs write the whole record on an update, so an update enables the template. The BanyanDB DAO applied a patch of only the configuration and the update time, so a disabled template stayed disabled. On ElasticSearch and JDBC an update is the only way to bring a disabled template back, since adding refuses an existing id. changeTemplate now writes every tag, as addTemplate does; the partial applyConfiguration is no longer used and is removed. The ui-management e2e case updates the template after disabling it, and checks that it is enabled and listed again.
wankai123
approved these changes
Oct 13, 2026
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open findings
This line appears to include a literal diff line-number prefix (19 |) in the actual YAML content.… · New For consistent naming in user-facing docs, consider changingElasticSearchtoElasticsearch… · New Project terminology typically uses the official casingElasticsearchrather thanElasticSearch.… · New
What changed in this PR
Fixes BanyanDB UI template updates so updating a disabled template re-enables it (consistent with Elasticsearch/JDBC behavior), and extends the ui-management e2e case to cover the scenario.
Changes:
- Update BanyanDB
changeTemplateto write the full record (not a partial patch) and remove the unused partial-apply helper. - Extend the ui-management e2e scenario with update/get/list steps after disabling a template, plus new expected outputs.
- Add a changelog entry documenting the bug and fix.
| File | Description |
|---|---|
| test/e2e-v2/cases/ui-management/ui-management-cases.yaml | Adds e2e steps verifying “update re-enables disabled template” behavior |
| test/e2e-v2/cases/ui-management/expected/template-reenabled.yml | New expected output for re-enabled template after update |
| test/e2e-v2/cases/ui-management/expected/template-list-one.yml | New expected output for default list count after re-enable |
| oap-server/.../BanyanDBUITemplateManagementDAO.java | Writes full record on update; removes partial configuration patch method |
| docs/en/changes/changes.md | Documents the BanyanDB template-update fix |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot stopped reviewing on behalf of
wu-sheng due to an error
October 13, 2026 20:03
wu-sheng
added a commit
to apache/skywalking-horizon-ui
that referenced
this pull request
Oct 14, 2026
…hem again (#194) A dashboard template stored on OAP can be written by anything, and one whose content would break its pages used to render partly, or take down the sidebar or every dashboard with it. Horizon now checks every stored template when it reads it -- layer dashboards, overviews, alarm pages, translations, the 3D map, the theme and the default time window -- and serves an invalid one to nobody, leaving everything else as it was. Invalid templates are reported only on the Dashboard setup pages: a red count on the sidebar row, a banner listing each one with Show problems (the stored JSON with every problem underlined, beside what is wrong), Download and Disable, an INVALID chip and an Invalid filter in the pickers. An enabled invalid template opens no editor and refuses every write until it is disabled. Import runs the publish checks before staging a file and shows a refused file's problems on the file itself. Valid / invalid and enabled / disabled are separate. Every setup page lists the templates it owns that are disabled on OAP, and Enable turns one back on with the content it holds; an invalid one comes back invalid. Reactivate on Layer dashboards does the same, and a deleted overview dashboard, alarm page or translation can now be brought back. After a Disable or Enable, each page refreshes everything its own publish refreshes. OAP's update leaves a disabled record disabled on BanyanDB (fixed upstream in apache/skywalking#14133), so Horizon writes a record it needs enabled with update and then create, and waits until OAP reports it enabled.
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.


Fix a UI template update on BanyanDB leaving a disabled template disabled
DashboardSetting.toEntity()setsdisabledto false, so an update stores the new configuration as enabled. ElasticSearch (forceUpdateof the whole document) and JDBC (anUPDATEof every column) write it that way. The BanyanDB DAO'schangeTemplateapplied a patch of onlyconfigurationandupdate_time, so afterPUT /ui-management/templatesa disabled template stayed disabled.On ElasticSearch and JDBC, an update is the only way to bring a disabled template back, since
addTemplaterefuses an existing id. On BanyanDB the same call leaves it disabled, so a client needs a different call for each storage. Horizon UI hit this: reactivating a disabled layer template, or publishing a template over a removed one, did nothing on BanyanDB.changeTemplatenow writes the whole record, asaddTemplatedoes. The partialapplyConfigurationis no longer used and is removed.The ui-management e2e case gains three steps after the disable:
disabled: false;Run locally on BanyanDB, all 10 steps pass with this change. Against the master image without it (
d9e895f560), the case fails at the get step.CHANGESlog.