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

[PR] fix(ops): ignore unparseable audit timestamps in sorting and cleanup [rocketmq-dashboard]

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

   ## Summary
   - Extract an exported `auditTimestamp()` helper that maps unparseable audit timestamps to `0` (same convention as `toStoreTimestamp` in `api/message.ts`)
   - Use it in the audit log time column sorter so `NaN` no longer leaks into the comparison
   - In `cleanupAuditLogs` (mock mode), keep records whose timestamp cannot be parsed instead of deleting them
   - Add regression tests for the helper and the cleanup behavior
   
   ## Why
   When a `timestamp` value is unparseable, `new Date(...).getTime()` yields `NaN`. In the column sorter, `NaN` compared against real numbers makes every comparison `false`, so table sorting becomes nondeterministic for rows with bad timestamps. In `cleanupAuditLogs`, `NaN >= cutoff` is always `false`, so undated rows were silently deleted together with genuinely old rows — an audit record disappears without ever being dated.
   
   ## Testing
   - `./node_modules/.bin/vitest run src/pages/ops/__tests__/AuditPage.test.tsx src/services/opsService.test.ts` → 20 passed
   - `./node_modules/.bin/tsc --noEmit` → clean
   - `./node_modules/.bin/eslint src/pages/ops/audit.tsx src/services/opsService.ts src/pages/ops/__tests__/AuditPage.test.tsx src/services/opsService.test.ts` → 0 errors
   


-- 
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] fix(ops): ignore unparseable audit timestamps in sorting and cleanup [rocketmq-dashboard]

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

   ⚠️ **Merge conflict detected**
   
   This PR has conflicts with the base branch and cannot be merged. Please rebase or merge the base branch into your branch and resolve the conflicts:
   
   ```bash
   git fetch origin
   git checkout fix/audit-timestamp-sorting
   git rebase origin/rocketmq-studio
   # resolve conflicts, then:
   git push --force-with-lease
   ```
   
   Feel free to @mention me for a re-review after conflicts are resolved.
   
   ---
   *Automated notification by github-manager-bot*


-- 
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] fix(ops): ignore unparseable audit timestamps in sorting and cleanup [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2857: fix(ops): ignore unparseable audit timestamps in sorting and cleanup
URL: https://github.com/apache/rocketmq-dashboard/pull/2857


-- 
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] fix(ops): ignore unparseable audit timestamps in sorting and cleanup [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2857:
URL: https://github.com/apache/rocketmq-dashboard/pull/2857#issuecomment-5611298903

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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