fix(presentations): resolve summit_id via owning presentation for PresentationMaterial lifecycle events - #579
fix(presentations): resolve summit_id via owning presentation for PresentationMaterial lifecycle events#579romanetar wants to merge 2 commits into
Conversation
…sentationMaterial lifecycle events Signed-off-by: romanetar <roman_ag@hotmail.com>
|
Warning Review limit reached
Next review available in: 22 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change adds summit ID retrieval to ChangesPresentation material event propagation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 3
🤖 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 `@tests/Feature/PresentationMaterialRabbitMQIntegrationTest.php`:
- Around line 138-151: Update the message polling loop around
consumer_channel->basic_get to decode each received payload and continue
consuming until entity_type is PresentationMediaUpload and entity_id matches
$entity_id, or the timeout expires. Only assert and validate summit_id after the
matching message is found, while preserving the existing not-null failure when
no match arrives.
- Around line 59-71: Update the test setup around the RabbitMQ Config::set calls
to capture the original rabbitmq configuration before mutation, then restore
that configuration and call
app()->forgetInstance(IProcessScheduleEntityLifeCycleEventService::class) during
teardown before fixture cleanup. Ensure shared configuration and the singleton
are reset even when the test completes or fails.
- Around line 63-73: Update the RabbitMQ setup in
PresentationMaterialRabbitMQIntegrationTest to read the broker user and password
from the test environment instead of hardcoding them. Reuse those configured
values in both the rabbitmq.user/rabbitmq.password settings and the
AMQPStreamConnection construction, while preserving the existing host, port,
vhost, and lifecycle reset behavior.
🪄 Autofix
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 Plus
Run ID: b3dace2a-47db-4d6f-8033-e9d6ea32ccf2
📒 Files selected for processing (3)
app/Models/Foundation/Summit/Events/Presentations/Materials/PresentationMaterial.phptests/Feature/PresentationMaterialRabbitMQIntegrationTest.phptests/Unit/Services/PresentationMaterialEventDispatchTest.php
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-579/ This page is automatically updated on each push to this PR. |
1 similar comment
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-579/ This page is automatically updated on each push to this PR. |
Restores the original rabbitmq config and forgets the IProcessScheduleEntityLifeCycleEventService singleton in tearDown() so the real-broker override doesn't leak to later tests in the same process; sources broker credentials from existing DOMAIN_EVENTS_RABBITMQ_* / RABBITMQ_* env vars instead of hardcoding them in a tracked file; and makes the message-polling loop skip unrelated messages on the shared fanout exchange instead of asserting on the first one received. Signed-off-by: romanetar <roman_ag@hotmail.com>
3d8c06f to
af30e55
Compare
ref https://app.clickup.com/t/9014802374/86bb90npj
Summary by CodeRabbit
Bug Fixes
Tests