fix: reduces update logs that contain no actual changes - #547
fix: reduces update logs that contain no actual changes#547andrestejerina97 wants to merge 4 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 140 files, which is 40 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (140)
You can disable this status message by setting the 📝 WalkthroughWalkthrough
ChangesSuppress Meaningless Audit Log Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
|
@caseylocker it's ready to review |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/Audit/AuditLogOtlpStrategy.php`:
- Around line 81-85: The current direct call
EmitAuditLogJob::dispatch($this->getLogMessage($event_type),
$auditData)->onQueue('audit-logs') removed the DB fallback and can drop audit
logs on queue failures; restore the previous fallback-backed emission by
replacing this line with the project's fallback helper (e.g.,
EmitAuditLogJob::dispatchWithFallback(...) or the existing
emitAuditJobWithDbFallback helper) passing $this->getLogMessage($event_type) and
$auditData and targeting 'audit-logs'; if no helper exists, wrap
EmitAuditLogJob::dispatch(...)->onQueue('audit-logs') in a try/catch and persist
$auditData to the AuditLog/backup store inside the catch so queue failures fall
back to the DB.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2216cbcc-c568-4c92-9d61-54cd0664dc07
📒 Files selected for processing (5)
app/Audit/AbstractAuditLogFormatter.phpapp/Audit/AuditLogOtlpStrategy.phptests/Unit/Audit/AbstractAuditLogFormatterDateNoiseTest.phptests/Unit/Audit/AbstractAuditLogFormatterHasMeaningfulChangesTest.phptests/Unit/Audit/AuditLogOtlpStrategyNoOpSuppressionTest.php
620d972 to
6a6d3eb
Compare
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
tests/Unit/Audit/AuditLogOtlpStrategyNoOpSuppressionTest.php (1)
90-90: ⚡ Quick winAssert dispatch targets the expected queue as well.
Given this stack’s contract, the positive-path test should also verify
EmitAuditLogJobis queued onaudit-logs, not just dispatched.Proposed patch
- Bus::assertDispatched(EmitAuditLogJob::class); + Bus::assertDispatched(EmitAuditLogJob::class, function (EmitAuditLogJob $job): bool { + return $job->queue === 'audit-logs'; + });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/Unit/Audit/AuditLogOtlpStrategyNoOpSuppressionTest.php` at line 90, Update the positive-path assertion to verify the job was queued on the expected queue: replace or augment Bus::assertDispatched(EmitAuditLogJob::class) with Bus::assertDispatched(EmitAuditLogJob::class, function ($job) { return /* check queue name */ $job->queue === 'audit-logs' || method_exists($job, 'onQueue') && $job->onQueue === 'audit-logs'; }); ensuring the closure inspects the dispatched EmitAuditLogJob instance to confirm it's targeted at 'audit-logs'.tests/Unit/Audit/AbstractAuditLogFormatterDateNoiseTest.php (1)
37-37: ⚡ Quick winUse the shared no-changes constant instead of a string literal.
These assertions should reference
AbstractAuditLogFormatter::NO_CHANGES_REGISTERED_MESSAGEto keep tests aligned with the formatter contract and avoid brittle message duplication.Proposed patch
- $this->assertSame('properties without changes registered', $details); + $this->assertSame(AbstractAuditLogFormatter::NO_CHANGES_REGISTERED_MESSAGE, $details); @@ - $this->assertSame('properties without changes registered', $details); + $this->assertSame(AbstractAuditLogFormatter::NO_CHANGES_REGISTERED_MESSAGE, $details);Also applies to: 57-57
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/Unit/Audit/AbstractAuditLogFormatterDateNoiseTest.php` at line 37, Replace the hard-coded string 'properties without changes registered' in the test assertions with the shared constant AbstractAuditLogFormatter::NO_CHANGES_REGISTERED_MESSAGE; update the assertions in AbstractAuditLogFormatterDateNoiseTest (both occurrences around the current checks that compare $details) to use that constant so the test references the formatter's contract instead of duplicating the literal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/Unit/Audit/AbstractAuditLogFormatterDateNoiseTest.php`:
- Line 37: Replace the hard-coded string 'properties without changes registered'
in the test assertions with the shared constant
AbstractAuditLogFormatter::NO_CHANGES_REGISTERED_MESSAGE; update the assertions
in AbstractAuditLogFormatterDateNoiseTest (both occurrences around the current
checks that compare $details) to use that constant so the test references the
formatter's contract instead of duplicating the literal.
In `@tests/Unit/Audit/AuditLogOtlpStrategyNoOpSuppressionTest.php`:
- Line 90: Update the positive-path assertion to verify the job was queued on
the expected queue: replace or augment
Bus::assertDispatched(EmitAuditLogJob::class) with
Bus::assertDispatched(EmitAuditLogJob::class, function ($job) { return /* check
queue name */ $job->queue === 'audit-logs' || method_exists($job, 'onQueue') &&
$job->onQueue === 'audit-logs'; }); ensuring the closure inspects the dispatched
EmitAuditLogJob instance to confirm it's targeted at 'audit-logs'.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1056b6fc-96e5-4488-a922-290a6046d636
📒 Files selected for processing (5)
app/Audit/AbstractAuditLogFormatter.phpapp/Audit/AuditLogOtlpStrategy.phptests/Unit/Audit/AbstractAuditLogFormatterDateNoiseTest.phptests/Unit/Audit/AbstractAuditLogFormatterHasMeaningfulChangesTest.phptests/Unit/Audit/AuditLogOtlpStrategyNoOpSuppressionTest.php
🚧 Files skipped from review as they are similar to previous changes (2)
- app/Audit/AbstractAuditLogFormatter.php
- app/Audit/AuditLogOtlpStrategy.php
caseylocker
left a comment
There was a problem hiding this comment.
LGTM to land this, closes the SelectionPlan screenshot case Mark reported.
@smarcet , the following came out of a second-pass review and extends the fix to more fully cover Mark's "widespread, not just Selection Plans" hypothesis and the preferred shape ("return a null description").
It's your call since the current pr already addresses the specific clickup ticket. Just wanted to be complete.
Follow-up plan (separate PR)
Correctness gaps in the current implementation
AbstractAuditLogFormatter.php:228-238—getTimestamp()returns integer seconds, so theformat('U.u')fallback is unreachable and same-second microsecond changes are wrongly suppressed. Collapse to a singleformat('U.u') === format('U.u')compare.AbstractAuditLogFormatter.php:240-242— scalar branch reusesformatChangeValue()for equality, sonullvs"null",truevs"true", and1vs"1"all compare equal. Replace with: null pair → strict===; otherwise requiregettypematch plus strict===. No string-coercion fallback.AuditLogOtlpStrategy.php:65-71—hasMeaningfulChanges()isn't onIAuditLogFormatter, andAuditLogFormatterFactory.php:163can instantiate config-driven formatters that don't extend the abstract. Drop the pre-gate; switch the existingis_null($description)check at line 73 toempty($description)so null-bubble fromformat()does the work.
Coverage gaps (Mark's "widespread" concern)
EntityUpdateAuditLogFormatter: applyvaluesAreEffectivelyEqualbefore every branch (child-entity at lines 103-108, BaseEntity at 111-142, plain at 145-157), so same-instance objects and same-instant datetimes are skipped while different entity instances still log. Returnnullon empty result. This closes the OTLP fallback case AND the DB-strategy noise forSummitEvent/SummitAttendeeBadge(the only entitiesAuditLoggerFactoryresolves).- Make
buildChangeDetails(): ?stringreturnnullinstead of the"properties without changes registered"sentinel, then update each of the ~85 callers (andBasePresentationAuditLogFormatter::formatUpdate(): ?string) to propagate the null so each concreteformat()returnsnullon no-op. That lets both strategies' existingis_null/emptyguards
do the suppression — matching Sebastian's directive structurally and removing the need for a strategy-level gate.
Polish
- Trailing whitespace at
AuditLogOtlpStrategy.php:86, indent oftryat line 53, blank EOF in the new OTLP test (AuditLogOtlpStrategyNoOpSuppressionTest.php:93). DefaultEntityManyToManyCollectionDeleteAuditLogFormatter.php:73emits"Removed IDs: []"when$deletedCount === 0. Same family of audit noise; returnnullinstead. Outside the original ticket but cheap to fix together — call out as adjacent cleanup in the PR description.
Tests to add
- Microsecond DateTime change → logged.
nullvs"null",truevs"true",falsevs"false",1vs"1"→ logged.- Ignored-fields-only change_set → null description, no dispatch on both strategies.
EntityUpdateAuditLogFormatter: same-instance BaseEntity → skipped; different-instance BaseEntity (same id) → logged; tz-noise DateTime → skipped; real DateTime change → logged.- OTLP suppresses empty-string description (not just null).
- DB strategy does not call
createAuditLogEntrywhenformat()returns null. - PrePaid + Sponsor discount-code formatters return null on no-op (they currently add "current state" context).
|
@Andres-Tejerina — review note on the approach. The fix at lines 65–71 should not exist. The strategy already has the right null-check at line 73; the pre-check duplicates logic that belongs inside the formatter. Root cause of the pattern: Proposed fix:
// AbstractAuditLogFormatter
protected function buildChangeDetails(array $change_set): ?string
{
// ... same loop, unchanged ...
if (empty($changed_fields)) {
return null; // was: return self::NO_CHANGES_REGISTERED_MESSAGE
}
return count($changed_fields) . ' field(s) modified: ' . implode(' | ', $changed_fields);
}
case IAuditStrategy::EVENT_ENTITY_UPDATE:
$details = $this->buildChangeDetails($change_set);
if ($details === null) return null; // no meaningful scalar change — skip entry
return sprintf('Entity (%s) updated: %s by %s', $id, $details, $this->getUserInfo());
The |
smarcet
left a comment
There was a problem hiding this comment.
@andrestejerina97 please review
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
13b5897 to
aabffc5
Compare
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
|
This warning fires on every suppressed no-op update, not just on actual errors. Now that formatters return Change to |
|
Missing test for the actual ticket scenario The empty change-set case is now covered, but the ticket is specifically about two Add a case along these lines to any of the existing formatter tests: $dt = new DateTime('2024-06-01 10:00:00');
$dt2 = new DateTime('2024-06-01 10:00:00'); // same value, different instance
$result = $formatter->format($subject, ['begin_date' => [$dt, $dt2]]);
$this->assertNull($result); |
smarcet
left a comment
There was a problem hiding this comment.
@andrestejerina97 please re review
buildChangeDetails() returning null to suppress no-op EVENT_ENTITY_UPDATE audit entries only worked if every formatter remembered to check for null before building its message. That pattern was copy-pasted at ~90 call sites and already proved fragile: 5 formatters added after this branch was created shipped without the check, and 8 pre-existing tests were asserting the old (pre-fix) behavior. - Add AbstractAuditLogFormatter::formatUpdateMessage() as the only way to consume buildChangeDetails(); buildChangeDetails() itself is now private, so a formatter cannot skip the null-check even if it tries. - Migrate all ~90 EVENT_ENTITY_UPDATE call sites (root-level ConcreteFormatters + PresentationFormatters) to the new gateway, preserving each formatter's original sprintf arguments verbatim. This fixes the 5 formatters that were missing the guard entirely. - Add AuditLogFormatterUpdateGatewayTest: a structural test that fails CI if a formatter handles EVENT_ENTITY_UPDATE without routing through formatUpdateMessage(), closing the gap private visibility alone can't cover (a formatter that never calls buildChangeDetails() at all). - Fix 8 pre-existing tests (Company, PresentationCategory, PresentationCategoryGroup, PresentationType, RSVP, RSVPInvitation, RSVPQuestionTemplate, RSVPTemplate) that asserted the pre-fix behavior for empty change sets. - Add testFormatterHandlesEmptyChangeSet coverage for the 5 previously unguarded formatters. - Downgrade AuditLogOtlpStrategy's "description is empty" log from warning to debug — it now fires on every expected no-op suppression, not an error condition. - Add SelectionPlanAuditLogFormatterTest, including a regression test for the ticket's actual scenario (ClickUp 86b9xe3fk): two DateTime instances holding the same begin_date/end_date value but different object identity must not be logged as a change. Full suite: 340/340 tests passing (tests/OpenTelemetry/ + tests/Unit/Audit/).
aabffc5 to
7636b49
Compare
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
There was a problem hiding this comment.
Pull request overview
This PR updates the audit logging pipeline to suppress update audit entries when the provided change set contains no meaningful changes. It centralizes “update message” generation behind a gateway method so concrete formatters can’t bypass the “no-op update” suppression, and aligns tests with the new null-on-no-change behavior.
Changes:
- Make
AbstractAuditLogFormatterreturnnullwhen an update has no meaningful field deltas, including improved “effective equality” checks (notably forDateTimeInterfaceand scalar/null values). - Route concrete formatter
EVENT_ENTITY_UPDATEcases throughformatUpdateMessage(...)so empty/no-op updates are suppressed consistently. - Update/add unit and OpenTelemetry formatter tests to assert
nullfor empty change sets, plus add a gateway test to prevent regressions.
Reviewed changes
Copilot reviewed 140 out of 140 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Audit/SummitSponsorExtraQuestionTypeAuditLogFormatterTest.php | Updates unit test expectation to null for no-op updates. |
| tests/Unit/Audit/AuditLogFormatterUpdateGatewayTest.php | Adds a guard test ensuring update-capable formatters route through formatUpdateMessage(...). |
| tests/OpenTelemetry/Formatters/TrackTagGroupAuditLogFormatterTest.php | Adds/updates test coverage for empty update change sets returning null. |
| tests/OpenTelemetry/Formatters/SummitVenueFloorAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitTicketTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitTaxTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitSponsorExtraQuestionTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitSignAuditLogFormatterTest.php | Adds/updates test coverage for empty update change sets returning null. |
| tests/OpenTelemetry/Formatters/SummitSchedulePreFilterElementConfigAuditLogFormatterTest.php | Adds/updates test coverage for empty update change sets returning null. |
| tests/OpenTelemetry/Formatters/SummitScheduleConfigAuditLogFormatterTest.php | Adds/updates test coverage for empty update change sets returning null. |
| tests/OpenTelemetry/Formatters/SummitRefundPolicyTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitOrderExtraQuestionTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitOrderAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitLocationImageAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitLocationBannerAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitEventTypeFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitDocumentAuditLogFormatterTest.php | Adds/updates test coverage for empty update change sets returning null. |
| tests/OpenTelemetry/Formatters/SummitBookableVenueRoomAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitBadgeViewTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitBadgeTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitBadgeFeatureTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitAttendeeTicketAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitAttendeeNoteAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitAttendeeBadgeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SummitAccessLevelTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorUserInfoGrantFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorSummitRegistrationPromoCodeFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorSummitRegistrationDiscountCodeFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorSocialNetworkFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorMaterialFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorBadgeScanFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorBadgeScanExtraQuestionAnswerFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SponsorAdFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/SelectionPlanAuditLogFormatterTest.php | Adds new formatter test, including suppression of no-op updates (and a DateTime instance equality case). |
| tests/OpenTelemetry/Formatters/ScheduledSummitLocationBannerAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/RSVPTemplateAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/RSVPQuestionTemplateAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/RSVPInvitationAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/RSVPAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/PresentationTypeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/PresentationCategoryGroupAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/PresentationCategoryAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/PrePaidSummitRegistrationDiscountCodeAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/FileAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/ExtraQuestionTypeValueAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| tests/OpenTelemetry/Formatters/CompanyAuditLogFormatterTest.php | Updates empty-change-set update behavior to expect null. |
| app/Audit/ConcreteFormatters/TrackTagGroupAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitVenueRoomAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitVenueFloorAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitVenueAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitTrackChairAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitTicketTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitTaxTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSponsorshipAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSponsorshipAddOnAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSponsorExtraQuestionTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSignAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSelectedPresentationListAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSelectedPresentationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitSchedulePreFilterElementConfigAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitScheduleConfigAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitRegistrationFeedMetadataAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitRefundPolicyTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitProposedScheduleAllowedLocationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitPresentationCommentAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitOrderExtraQuestionTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitOrderAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitMetricAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitMemberScheduleAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitMediaUploadTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitLocationImageAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitLocationBannerAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitHotelAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitGeoLocatedLocationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitExternalLocationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitEventTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitEventAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitEventAttendanceMetricAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitDocumentAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBookableVenueRoomAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBookableVenueRoomAttributeValueAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBookableVenueRoomAttributeTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBadgeViewTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBadgeTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitBadgeFeatureTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAttendeeTicketTaxAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAttendeeTicketAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAttendeeNoteAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAttendeeBadgeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAttendeeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAirportAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SummitAccessLevelTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SubmissionInvitationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorUserInfoGrantAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorSummitRegistrationPromoCodeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorSummitRegistrationDiscountCodeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorSocialNetworkAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorMaterialAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorBadgeScanExtraQuestionAnswerAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorBadgeScanAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SponsorAdAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SpeakerRegistrationRequestAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SpeakerAssistanceAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SelectionPlanAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SelectionPlanAllowedPresentationQuestionAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/SelectionPlanAllowedEditablePresentationQuestionAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/ScheduledSummitLocationBannerAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/RSVPTemplateAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/RSVPQuestionTemplateAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/RSVPInvitationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/RSVPAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationVideoAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationUserSubmissionAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationTrackChairScoreTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationTrackChairRatingTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationSubmissionAuditLogFormatter.php | Makes update path nullable and routes through formatUpdateMessage(...). |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationSpeakerSummitAssistanceConfirmationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationSpeakerAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationSlideAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationMediaUploadAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationLinkAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationEventApiAuditLogFormatter.php | Makes update path nullable and routes through formatUpdateMessage(...). |
| app/Audit/ConcreteFormatters/PresentationFormatters/PresentationActionTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationFormatters/BasePresentationAuditLogFormatter.php | Updates abstract update signature to ?string to allow suppression. |
| app/Audit/ConcreteFormatters/PresentationCategoryGroupAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationCategoryAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PresentationAttendeeVoteAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/PrePaidSummitRegistrationDiscountCodeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/FileAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/FeaturedSpeakerAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/ExtraQuestionTypeValueAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/CompanyAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/AssignedSelectionPlanExtraQuestionTypeAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/ConcreteFormatters/AffiliationAuditLogFormatter.php | Routes update message through formatUpdateMessage(...) gateway. |
| app/Audit/AuditLogOtlpStrategy.php | Lowers log severity for empty descriptions and returns early when formatter output is null. |
| app/Audit/AbstractAuditLogFormatter.php | Makes change-details generation nullable + adds formatUpdateMessage(...) gateway and effective-equality filtering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Log::debug("AuditLogOtlpStrategy::audit", ['subject' => $subject, 'change_set' => $change_set, 'event_type' => $event_type]); | ||
| try { | ||
| try { | ||
| $entity = $this->resolveAuditableEntity($subject); |
| ); | ||
| Log::debug("AuditLogOtlpStrategy::audit entry sent to OTEL", ["user_id" => $ctx->userId, "user_email" => $ctx->userEmail]); | ||
|
|
||
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString("properties without changes registered", $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
| $this->assertStringContainsString('updated', $result); | ||
| } | ||
| $this->assertNull($result); | ||
| } |
The try/catch comparing format('U.u') could never return true: it only
ran when getTimestamp() already differed, and differing whole-second
timestamps guarantee differing 'U.u' strings too. Equality was always
decided by getTimestamp() alone; the fallback was dead code.
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-547/ This page is automatically updated on each push to this PR. |
ref: https://app.clickup.com/t/86b9xe3fk
Summary by CodeRabbit
Bug Fixes
Refactor