You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Yanghanrui666 (via GitHub)" <gi...@apache.org> on 2026/10/08 11:14:35 UTC

[PR] [ISSUE #3210] Add bounded data source connectivity checks [rocketmq-dashboard]

Yanghanrui666 opened a new pull request, #5720:
URL: https://github.com/apache/rocketmq-dashboard/pull/5720

   Fixes #3210
   
   ### What
   
   Adds an on-demand **Data source connectivity check** to Settings -> Data sources so an operator can verify a whole instance list in one pass instead of clicking "test" row by row.
   
   ### How
   
   - **Bounded concurrency (3 in flight).** Checks are scheduled through a small worker pool, so a large data source list cannot open an unbounded number of parallel requests.
   - **Credentialed data sources are skipped, never sent empty.** `Basic Auth` and `Bearer Token` rows are reported as skipped with an explicit reason and no request is issued, so no empty or partial credential reaches the backend.
   - **Uses the full filtered list, not just the current page.** The same search / type filters as the table are applied first, then rows are de-duplicated by `key`.
   - **Per-row results.** Success / failure / skipped, latency in ms, and the instance count reported by the probe.
   - **Filter, summary and CSV export.** Results can be filtered by outcome and exported to CSV for offline triage.
   - **i18n.** Every new string is added for both `en-US` and `zh-CN`.
   
   ### Files
   
   | File | Change |
   | --- | --- |
   | `web/src/components/DataSourceConnectivityDrawer.tsx` | New drawer: result table, outcome filter, summary, CSV export |
   | `web/src/utils/dataSourceConnectivityBatch.ts` | Pure scheduling / aggregation helpers |
   | `web/src/utils/dataSourceConnectivityBatch.test.ts` | Unit tests for the helpers |
   | `web/src/pages/settings/DataSourceTab.tsx` | Entry point and wiring |
   | `web/src/i18n/translations.ts` | zh-CN / en-US strings |
   
   ### Tests
   
       npx tsc -b
       npx eslint src/components/DataSourceConnectivityDrawer.tsx src/utils/dataSourceConnectivityBatch.ts src/utils/dataSourceConnectivityBatch.test.ts src/pages/settings/DataSourceTab.tsx src/i18n/translations.ts
       npm test -- src/utils/dataSourceConnectivityBatch.test.ts src/pages/settings/__tests__/DataSourceTab.test.tsx --pool=threads --maxWorkers=1
   
   `tsc` clean, `eslint` clean, targeted run 2 files / 23 tests passed (11 for the new helper suite). No full-suite run was attempted.
   
   ### Notes for reviewers
   
   - No new dependency.
   - The results table follows the repo table-width guidance (`tableScrollX(columns)` from `web/src/utils/table.ts`) instead of a hardcoded scroll width.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #3210] Add bounded data source connectivity checks [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #5720:
URL: https://github.com/apache/rocketmq-dashboard/pull/5720#issuecomment-6093317997

   > Thanks — the helper design (dedupe by key, explicit `SKIPPED_AUTH`, cursor-based worker pool with an injectable clock) and its 11 tests are solid, and the concurrency / dedupe / skip assertions are genuinely mutation-sensitive. Five things to address before this can land: > > 1. Two user-visible strings bypass i18n: `dataSourceConnectivityBatch.ts:64` (`'Requires credentials entered in the editor'`) and `:98` (`'Connection request failed'`). They end up in the result table and in the exported CSV, so zh-CN users see English. Please thread translations in from the component (inject a label/message function) or map status → i18n key at render time; `settings.dataSourceAuthTestHint` already exists for the skipped case. > 2. `dataSourceNeedsRuntimeSecret` (`dataSourceConnectivityBatch.ts:42`) duplicates `authNeedsSecret` in `pages/settings/DataSourceTab.tsx:94` with identical semantics. Please extract one shared helper (e.g. under `web/src/utils/`) and have both call sites use i
 t, so the two cannot drift when a new auth mode is added. > 3. The new 245-line drawer has no test. Please add a component test (open → run → success/failed/skipped rows, skipped-count hint, status filter) plus a case in `DataSourceTab.test.tsx` for the new entry button (opens the drawer; disabled when `total === 0`). > 4. `CONTRIBUTING.md` asks page-level neutral notes to use the shared `InfoBanner` component; the resident description at `DataSourceConnectivityDrawer.tsx:168-175` uses `<Alert type="info">`. The `type="warning"` skipped-auth notice at `:199` is a semantic alert and can stay. > 5. Table widths: all seven columns declare a fixed `width`, so surplus width in a wide drawer is left blank. Per the list-table rule in `CONTRIBUTING.md`, give the primary text column (`name`, `:96`) `minWidth` so it absorbs the surplus.
   
   ---
   
   **Decision**: we are closing this rather than requesting the changes above. A 613-line browser-side bulk-probe capability is new functionality, and new features need an agreed design first - an issue or RFC that maintainers sign off on - rather than arriving as a finished pull request; #3210 was filed by an account whose contributions we no longer review, so there is no agreed design behind this one. Independently of that, the 245-line drawer has no tests, two user-facing strings bypass i18n, and `authNeedsSecret` is re-implemented instead of reusing the existing helper.
   
   If you want to pursue it: open an issue describing the operator workflow and the intended UX, and we will settle the design there. A much smaller PR that reuses the existing helper and covers the drawer would then be welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #3210] Add bounded data source connectivity checks [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #5720: [ISSUE #3210] Add bounded data source connectivity checks
URL: https://github.com/apache/rocketmq-dashboard/pull/5720


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org