bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commit
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
services/bnv-manager-v2/src/http/handler_frontend/invites/handler_common.rs の accept_invite から始めてください。create_domain_admin を呼び出す tokio::spawn は tx.commit() より前にあります。同じサービスの set_password と reset_password を読み、トランザクション内でデータをどのように収集し、コミット後に Mailcow::global() を呼び出しているかを確認してください。Mailcow の呼び出しが tx.commit().await? の成功後にのみ実行され、クラブメンバーのパスは変更されていないことが完了の条件です。
索引モデルが issue の本文から書いたものです。
説明
Problem
accept_invite (services/bnv-manager-v2/src/http/handler_frontend/invites/handler_common.rs) spawns the task that creates the domain admin in Mailcow (create_domain_admin) while the transaction is still open. tx.commit() only runs after that.
If the commit fails (e.g. connection drop), the account and the accepted invite roll back, but the domain admin in Mailcow stays. Accepting the invite again then fails on the existing Mailcow user.
Expected
The Mailcow side effect only runs after a successful commit. set_password and reset_password in the same service already do this: gather what is needed inside the transaction, call Mailcow::global() after tx.commit().
Acceptance criteria
- In
accept_invite,tokio::spawnwithcreate_domain_adminonly runs aftertx.commit().await? - A failed commit leaves no trace in Mailcow
- Club-member invites (without a Mailcow call) behave unchanged
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 1
- 平均マージ
- 9時間 39分
- マージ済み PR(30日)
- 144
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
myOmikron/code のほかの issue
-
wayfinder:task
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
wayfinder:task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
myOmikron/code#102 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 4/5 3〜5日 初心者へのやさしさ 39/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliusBrussee/caveman#1449 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
linagora/twake-calendar-frontend#1924 ·
メンテナーはふだん 1 日以内に返信
-
Add: Class TV Modaオープンcheck:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
libnativeapi/nativeapi#21 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GiganticMinecraft/seichi-playguide#183 ·
メンテナーはふだん 1 日以内に返信