Recipe call arguments that name a data-driven column are not expanded, and the result depends on map order
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- testing-qa
調査の方向性
Start in internal/runner/executor.go at runRecipeCall and resolve, then read the Data-driven page mentioned in the issue. Reproduce the issue with an Executor unit test using row values in e.vars and recipe arguments containing <email> and <password>. Done when recipe arguments are either expanded consistently before binding or the lint and documentation rule is made explicit, with behavior independent of map order.
索引モデルが issue の本文から書いたものです。
説明
What happens
A recipe called from a data-driven test cannot reliably receive the row's columns as call arguments.
recipe "sign in as" (email, password)
type "<email>" into #email
type "<password>" into #password
test "role-based access"
sign in as "<email>" with "<password>"
with examples:
email password
"[email protected]" "admin123"
runRecipeCall binds each argument's text as it is (internal/runner/executor.go, the loop that calls setVar(param, args[i], ...)), so the parameter email is set to the text <email>. That replaces the row's email, and resolve then finds a variable whose value is its own placeholder and makes no progress: the step types <email> literally.
With parameter names that differ from the columns (recipe "sign in as" (address, secret)), the call binds address to the text <email>. resolve makes one pass over the variables in map order, so whether <address> becomes <email> and then the row's value depends on the order the pass visits address and email.
Measured
In a unit test on Executor (newTestExecutor, the row values set in e.vars, runRecipeCall with the arguments "<email>" and "<password>", then e.resolve("type <address> then <secret>")), 300 runs gave four different results:
type <email> then <password>: 179type [email protected] then <password>: 51type <email> then rowpw: 37type [email protected] then rowpw: 33
With the parameters named like the columns, the result is type <email> every time.
Expected
Either the arguments of a recipe call are expanded (against the row and the other variables) before they are bound, or probe lint and the docs say that a column must not be passed as an argument. The Data-driven page now says the latter, and shows a recipe without parameters that reads the columns directly; that form does not depend on the order.
Found while checking the recipe "log in as" example, which also had a keyword problem (fixed separately).
- 主要言語
- Go
- スター
- 6
- フォーク
- 3
- 平均マージ
- 6時間 28分
- マージ済み PR(30日)
- 362
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AlphaWaveSystems/flutter-probe のほかの issue
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AlphaWaveSystems/flutter-probe#865 ·
メンテナーはふだん 1 日以内に返信
-
area/cli bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
AlphaWaveSystems/flutter-probe#424 ·
メンテナーはふだん 1 日以内に返信
-
area/docs documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AlphaWaveSystems/flutter-probe#409 ·
メンテナーはふだん 1 日以内に返信
-
Dial timeout error should say how long it waited and name the timeout setting対応中かも @jay23606 が 2 日前に担当しました。 オープンarea/cli bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AlphaWaveSystems/flutter-probe#408 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
AlphaWaveSystems/flutter-probe#888 ·
メンテナーはふだん 1 日以内に返信
AlphaWaveSystems/flutter-probe の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
fluxcd/notification-controller#1441 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
volcengine/volcengine-go-sdk#163 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OneBusAway/maglev#2145 ·
メンテナーはふだん 2 日以内に返信
-
priority/medium status/ready type/chore
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
discobox-ai/discobox#1357 ·
メンテナーはふだん 1 日以内に返信