The GitHub Actions job "CI" on rocketmq-dashboard.git/fix/topic-compare-null 
has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
42931f80fd040dac6fa64dd42aaeeab2804fb761 / unbridled-41 
<[email protected]>
fix(topic): stop rendering a provider-absent comparison value as the token null

compareTopicInventories only normalised strings:

    const valueOf = (topic, field) => {
      const value = topic[field];
      return typeof value === 'string' ? value.trim() : value;
    };

The providers disagree on how they spell "absent": the Apache provider never 
sets
`namespace`, so the API serializes `namespace: null`, while a Tencent topic can
answer `""` for the same thing. Left raw, the null leaked into the difference 
text
and into the drawer's CSV export as the literal token `null`
("namespace: null -> test_namespace"), and `null` vs `""` - both "no namespace" 
-
was reported as a configuration DRIFT, so topics that agree were flagged.

Normalise an absent value to the empty string, the same way the sibling fields 
are
trimmed for exactly this heterogeneity.

Tests (web/): npx vitest run src/utils/topicConfigComparison.test.ts 
src/components/__tests__/TopicConfigComparisonDrawer.test.tsx
-> Tests 21 passed.
- new case "does not report a provider-absent value as the JS null token" fails
  before this change (`expected 'DRIFT' to be 'MATCH'`) and passes after it; it
  also asserts the rendered difference text has no `null` token.
- npx eslint reports no errors; npx tsc -b passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37981565126

With regards,
GitHub Actions via GitBox

Reply via email to