ユーザーマージに失敗しました。サードパーティ製プラグインによるデータベースエントリの破損

OK、取得中… 接続に問題があります。safe_mode で確認してみます。
safe_mode では改善されませんでした…

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-assign.git
          - git clone https://github.com/discourse/discourse-bbb.git
          - git clone https://github.com/discourse/discourse-calendar.git
          - git clone https://github.com/discourse/discourse-canned-replies.git
          - git clone https://github.com/discourse/discourse-checklist.git
          - git clone https://github.com/discourse/discourse-code-review.git
          - git clone https://github.com/discourse/discourse-footnote.git
          - git clone https://github.com/discourse/discourse-github.git
          - git clone https://github.com/discourse/discourse-graphviz.git
          - git clone https://github.com/discourse/discourse-math.git
          - git clone https://github.com/discourse/discourse-policy.git
          - git clone https://github.com/discourse/discourse-prometheus.git
          - git clone https://github.com/discourse/discourse-prometheus-alert-receiver.git
          - git clone https://github.com/discourse/discourse-push-notifications.git
          - git clone https://github.com/discourse/discourse-saved-searches.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          - git clone https://github.com/discourse/discourse-voting.git
          - git clone https://github.com/discourse/discourse-yearly-review.git
          - git clone https://github.com/angusmcleod/discourse-events.git
          - git clone https://github.com/angusmcleod/discourse-locations.git
          - git clone https://github.com/davidtaylorhq/discourse-whos-online.git

最後のいくつかの URL を更新できることは既に確認しました(ただし、再構築は今夜 UTC 時間 midnight 以降にしか行えません)。
もしかしたら、events と locations については @angus または @merefield に連絡(ping)してみるのが良いかもしれません。

Discourse Assign プラグインが原因かもしれません。リストにあるプラグインの中で TopicQuery クラスを変更しているのはこれだけのようです。エラーもそこにあると推測しています。

プラグインを無効にしてカテゴリが機能するか確認し、私の推測が正しいか検証してもらえませんか?その後で再度有効にしてください。また、トピックのカスタムフィールドのいずれかが、何らかの形でマージされたユーザーを参照しているかも興味深い点です。そちらも確認をお願いします。

./launcher enter app
rails c

id_of_problematic_topic = 123
Topic.find(id_of_problematic_topic).custom_fields

discourse-assign を無効化後:

  • latest は動作します
  • top は失敗します
  • /t/951 もまだ失敗します

クエリを実行中… ああ!見事に解決しましたね!

 {"event_start"=>1601748000, "event_end"=>1601749800, "event_all_day"=>false, "event_timezone"=>"Etc/UTC", "event_rsvp"=>true, "event_going_max"=>100, "event_version"=>1, "event_going"=>[36, 50]}

どうやらマージ時にイベントプラグインがスキップされているようです。ただし、これは私たちが使用している古いバージョンのため、むしろ当然かもしれません。このケースのテストにお手伝いできることがあれば教えてください。

@gerhard さん、問題を解決してくださりありがとうございます!

そのトピックのカスタムフィールドを更新して、存在しない ID を削除できます。@angus は、プラグインにユーザーのマージ機能を追加したいと考えているかもしれません。

念のため:

tcf = TopicCustomField.where(topic_id: problematic_topic_id)
c = tcf.last # 私のケースでは YMMV です
c.value = "[295,50]"
c.save

将来のために、そのトピックに複数のカスタムフィールドがある場合は、以下を使用してください。

tcf = TopicCustomField.where(plugin_name: 'discourse-events', topic_id: problematic_topic_id)
c = tcf.first
c.value = "[295,50]"
c.save

@hellekin さん、Creating and managing events への移行をお勧めします。

実際、@fzngagan さんと協力して、Events から Discourse Events への移行スクリプトを作成することはできませんか?そこでは実例として活用できるでしょう。Faiz さん、これを優先すべきです。Events の正式な廃止を進めたいと考えています。

@angus@fzngagan:コンテナ設定内のプラグイン行を変更し、再ビルドしてからスクリプトを実行することは可能だと思いますか?誰が誰か(who’s who)とウィザードの Git リポジトリも変更する必要があるため、まとめて行うこともできます。一方、現在ハッカソン真っ只中ですので、問題が解決すれば1週間ほど待っても構いません。

@hellekin
最近、ユーザーの削除が問題を引き起こしていた類似の課題を解決しました。

Creating and managing events への移行というアイデアは素晴らしいと思います。そこで質問ですが、期限切れのイベントを保持したいですか?また、今後のイベントはどれくらいありますか?

@fzngagan @hellekin 詳細を詰めるために、こちらのスレッドに移動してください:Pavilion

移行スクリプトの作成に参加させていただきたいと考えています。

私は「イベント」機能を頻繁に利用しています。私のプラグインは、行動上の課題を抱える児童を対象とした学校向けのもので、複数の校舎にまたがる10人以上の児童に対して、毎日7件のトピックを作成しており、2年以上にわたり運用されています。各トピックは学校生活の一定期間を表しており、トピックのイベント日付で照会できる必要があるため、Discourse Events がデータを適切な場所に格納してくれることを願っています。

以下にご指摘いただいたディスカッションに参加させていただきます。

素晴らしい協力体制を心から嬉しく思います。Discourse はその点で最高ですね!皆様のご尽力とご参加に感謝いたします :heart:

はい、過去のイベントはトピックに関連しているため、特に現在進行中の「ActivityPub Conference 2020」に関連するものは残したいと考えています。今週はハッカソンが開催中です。
それ以外のイベントは多くありませんが、移行について確認します。今週はすでに予定が埋まっているため、おそらく来週になるでしょう。ありがとうございます!@aschrijver のおっしゃる通り、Discourse コミュニティは素晴らしいですね!