Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug] Testing::ActivityEnvironment adds detail_hints to heartbeat details

オープン 初心者向け
#625 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ruby
領域
backend, testing

調査の方向性

Temporalio::Testing::ActivityEnvironment#on_heartbeat と、それがインストールするコンテキストから始め、その heartbeat のシグネチャを Temporalio::Activity::Context#heartbeat と比較してください。提供された detail_hints: [:some_hint] の再現 코드を使って対象を絞ったユニットテストを追加または実行し、on_heartbeat が [['progress']] だけを受け取り、ヒントは引き続き実際のコンバーターパスに到達することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

What are you really trying to do?

Unit test an activity that heartbeats with converter hints, using Temporalio::Testing::ActivityEnvironment and on_heartbeat.

Describe the bug

Activity::Context#heartbeat is declared as heartbeat(*details, detail_hints: nil). The context that ActivityEnvironment installs declares heartbeat(*details) with no keyword parameters, so Ruby passes the keyword as a trailing positional Hash. on_heartbeat then receives the hints as an extra detail. Under a real worker, the hints go to the converter and are not recorded as details.

Minimal reproduction
class MyActivity < Temporalio::Activity::Definition
  def execute
    Temporalio::Activity::Context.current.heartbeat('progress', detail_hints: [:some_hint])
  end
end

details = []
env = Temporalio::Testing::ActivityEnvironment.new(on_heartbeat: proc { |d| details << d })
env.run(MyActivity)
p details
# Expected: [["progress"]]
# Actual:   [["progress", {detail_hints: [:some_hint]}]]
Environment/versions
  • SDK version: main (1.9.0)
  • Ruby 3.4, Linux x86_64
主要言語
Ruby
スター
207
フォーク
44
平均マージ
2日 42分
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

temporalio/sdk-ruby のほかの issue

temporalio/sdk-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。