Skip to content

[ISSUE #2728][ISSUE #2730][ISSUE #2732] fix(ops): consolidate asset workflows - #2852

Open
yuluo-yx wants to merge 3 commits into
apache:rocketmq-studiofrom
yuluo-yx:0831-yuluo-yx/consolidate-ops
Open

[ISSUE #2728][ISSUE #2730][ISSUE #2732] fix(ops): consolidate asset workflows#2852
yuluo-yx wants to merge 3 commits into
apache:rocketmq-studiofrom
yuluo-yx:0831-yuluo-yx/consolidate-ops

Conversation

@yuluo-yx

Copy link
Copy Markdown
Member

What is the purpose of the change

Consolidate the reviewed operations-asset fixes from #2735, #2736, and #2737 into one cohesive PR for alert assets, Grafana generation, and asset downloads, following the maintainer note on #2724.

The current behavior can mix mock alert-rule domains, place every generated Grafana panel at x=0, emit gauge minima outside Grafana's expected defaults, and launch duplicate downloads before React loading state becomes visible.

Brief changelog

  • isolate cluster and business alert rules across mock CRUD/import/export operations;
  • pack generated panels across the 24-column grid and advance rows by the tallest panel;
  • emit gauge minimums in fieldConfig.defaults.min and regenerate all 12 dashboards;
  • acquire synchronous request ownership for alert-rule and dashboard exports while preserving parallel exports for different rows.

Verifying this change

  • targeted Vitest: 3 files, 32 tests passed;
  • Python generator tests: 4 passed;
  • targeted ESLint and Prettier checks passed;
  • Node 24.18.0 npm run build passed (8,025 modules);
  • regenerated dashboard JSON matched deterministic generator output;
  • git diff --check passed;
  • scope: 20 files, 314 insertions, 84 deletions, 3 reviewed commits.

Fixes #2728

Fixes #2730

Fixes #2732

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Consolidation of operations-asset fixes: Grafana dashboard generator refactored from sequential y_stack to proper bin-packing layout_panels, gauge panel min moved to correct location, alert rule asset download fixes, and generated JSON files updated.

Findings

  • [Info] gen_grafana_dashboards.py:135-163 — The layout_panels function is a significant improvement over y_stack. It properly packs panels into rows respecting GRID_WIDTH=24, handles variable-width panels, and doesn't mutate the input definitions. The validation for width/height bounds is a good defensive addition.
  • [Info] gen_grafana_dashboards.py:66-69 — Moving min: 0 from custom to defaults is the correct Grafana JSON structure for gauge panels.
  • [Info] gen_grafana_dashboards.py:175-187 — Extracting generate_dashboards as a testable function with an out_dir parameter enables the unit tests to verify output without touching the real resource directory.
  • [Info] AlertRuleAssetList.tsx — The download endpoint fix and content-type handling are correct.
  • [Info] Test coverage includes layout algorithm tests with edge cases (overflow to next row, single full-width panel, mixed widths).

LGTM. Clean refactoring with proper test isolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants