PageNotifierのPub/Sub実装をnewspaperからnotificationsに置き換え#8988
Conversation
Walkthrough
Changes
Sequence Diagram(s)sequenceDiagram
participant Controller as PagesController
participant ASNotification as ActiveSupport::Notifications
participant Notifier as PageNotifier
Controller->>ASNotification: instrument('page.create', payload)
ASNotification->>Notifier: call(_name, _started, _finished, _unique_id, payload)
Notifier->>Notifier: ページ通知・更新処理
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 RuboCop (1.76.1)app/controllers/pages_controller.rbrubocop-minitest extension supports plugin, specify config/initializers/active_support_notifications.rbrubocop-minitest extension supports plugin, specify app/models/page_notifier.rbrubocop-minitest extension supports plugin, specify Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
お疲れ様です! |
|
@Miya096jp |
|
すみません、変更ありがとうございました🙏 |
ryufuta
left a comment
There was a problem hiding this comment.
確認しました!
問題ないのでApporveします🙆🏻♂️
変更手順がわかりやすかったです👍
また、修正が全部完了するまで中断するのではなく完了したところまででPRを作るのはチームとしても個人としても効率的だと思ったので今後見習いたいと思いました!
|
@Miya096jp conflictの修正をお願いします。 |
\#8938とのコンフリクトを解消
b9abf42 to
f7d5bdc
Compare
|
修正しました! |
|
@Miya096jp メールで届いておりました〜 |
Issue
概要
Docs作成時の通知機能をnewspaperからActiveSupport::Notificationsに変更しました
新規にDocsを作成・公開し、管理者とメンターに次の3種類の通知が送信されるかを確認してください。
補足
IssueではAnswerCacheDestroyerとPageNotifierの2つを置換するとなってますが、AnswerCacheDestroyerについては実装の不備があり別Issueで対応することになったため、動作確認はありません。
変更確認方法
chore/replace_newspaper_to_notifications_in_page_notifierをローカルに取り込む
Discord通知の確認について
Discord通知については、開発環境では通知を飛ばす代わりにRails.loggerでログを出力するようになっています
ログの確認には、現在のターミナルとは別のターミナルを開いて、以下のコマンドを実行してください
tail -f log/development.log | grep "Message to Discord"
通知が飛んだ場合、
Message to Discord.という出力があるかをターミナルで確認できます例
% tail -f log/development.log | grep "Message to Discord"
Message to Discord.
Message to Discord.
パターン1. Docsを作成し即公開するパターン
パターン2. Docsを一旦WIPに保存し、その後公開するパターン
Summary by CodeRabbit
Summary by CodeRabbit