Repository navigation
fix(audit): support open-ended date filters - #5684
Conversation
Preserve optional audit date bounds and pagination with real JPA regression coverage. Align the 160-check release handbook with supported UI behavior and authorized HTTP credential setup.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe audit service now supports operation-name queries with either or both date bounds omitted. Tests cover date filtering and pagination. The release-regression manual updates account-management procedures and several application, release, gray-rule, instance, and admin checks. ChangesAudit date filters
Release-regression instructions
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Audit log searches with only a start date or only an end date now return the expected results. No merge-blocking risk was found. The author's reported Maven and Node test results were not independently reproduced here. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Open-ended searches retain operation filtering, pagination, and existing access checks. No introduced security issue was established, but deployment-level authentication and audit-data isolation were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 5 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation handles all bound combinations and includes focused integration and client-side regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds open-ended audit date filtering while preserving inclusive bounds, ordering, and pagination.
Changes:
- Adds one-sided repository queries and documents nullable bounds.
- Adds H2/JPA and JavaScript regression coverage.
- Updates release-regression handbook expectations and credential workflow.
| File | Description |
|---|---|
e2e/portal-e2e/release-regression/README.md |
Updates regression procedures and expectations. |
apollo-portal/src/test/resources/static/scripts/test_auditLogDates.js |
Tests cleared bounds across pagination. |
apollo-audit/apollo-audit-impl/src/test/java/com/ctrip/framework/apollo/audit/service/ApolloAuditLogServiceTest.java |
Adds integration coverage for date filtering. |
apollo-audit/apollo-audit-impl/src/main/java/com/ctrip/framework/apollo/audit/service/ApolloAuditLogService.java |
Selects queries based on present bounds. |
apollo-audit/apollo-audit-impl/src/main/java/com/ctrip/framework/apollo/audit/repository/ApolloAuditLogRepository.java |
Adds one-sided date queries. |
apollo-audit/apollo-audit-impl/pom.xml |
Adds test-scoped H2. |
apollo-audit/apollo-audit-api/src/main/java/com/ctrip/framework/apollo/audit/api/ApolloAuditLogQueryApi.java |
Documents null bounds as unbounded. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What's the purpose of this PR
Audit log searches with only a start or end date currently return no rows because the missing bound is still included in a SQL comparison. Select the query for the bounds that are present so clearing either date preserves the other inclusive bound, descending order, and pagination.
Which issue(s) this PR fixes
No linked issue. This fixes AUD-01.03 in the release regression handbook.
Brief changelog
Validation
./mvnw -B -ntp clean teston JDK 17: passed for the full reactor after rebasing onto master; one existing test is disabled because it requires an admin server.node --test apollo-portal/src/test/resources/static/scripts/test_auditLogDates.js: passed../mvnw spotless:applyscoped to the changed Java files: passed with no formatting changes.Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean testto make sure this pull request doesn't break anything.mvn spotless:applyto format your code.CHANGESlog.Summary by CodeRabbit
New Features
Documentation