Skip to content

fix: Handed a nested runRequest the calling partition's data row - #1567

Open
Kart03 wants to merge 1 commit into
feat/per-vu-iteration-datafrom
fix/nested-request-partition-iteration-data
Open

Kart03 wants to merge 1 commit into
feat/per-vu-iteration-datafrom
fix/nested-request-partition-iteration-data

Conversation

@Kart03

@Kart03 Kart03 commented Oct 15, 2026 •

Copy link
Copy Markdown

Follow-up for #1559, targeting its branch.

Problem: under customParallelIterations the run has no run-level data; each partition holds the row its host injected (partition.iterationData). runNestedRequest built the nested run's row from state.data, so in a per-VU-data run a pm.execution.runRequest target sent {{col}} literally and saw an empty pm.iterationData. Found by the AUTO-1178 audit of performance runs (lib @postman/performance-test with #1559 + #1565).

Fix: getParentIterationRow(run) picks the row from the calling partition (rootCursor.partitionIndex) when the run uses custom parallel iterations. The streaming and plain paths are unchanged.

Tests: unit 612 passing here; lint clean. A run-level test needs #1565 as well (a nested run under customParallelIterations hangs without it), so it lives on the #1559 + #1565 merge: test/integration/runner-spec/run-collection-request-parallel.test.js "with per-VU iteration data > should hand the nested request the calling VU's iteration data row", which fails before this change and passes after (runRequest specs 33 passing). The performance-test lib's run-level suite covers it too ({{var}} in the nested request and pm.iterationData in nested scripts, 3 VUs).

Generated with Claude Code

Under customParallelIterations the run has no run-level data: each
partition holds the row its host injected (partition.iterationData). The
nested request read state.data instead, so {{var}} from the data row went
out literally and pm.iterationData was empty in nested scripts.

Co-Authored-By: Claude <[email protected]>
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.78%. Comparing base (2557674) to head (e5d9a23).

Files with missing lines Patch % Lines
lib/runner/nested-request.js 57.14% 1 Missing and 2 partials ⚠️

❌ Your project check has failed because the head coverage (34.05%) is below the target coverage (35.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@                      Coverage Diff                       @@
##           feat/per-vu-iteration-data    #1567      +/-   ##
==============================================================
- Coverage                       77.83%   77.78%   -0.05%     
==============================================================
  Files                              51       51              
  Lines                            4380     4384       +4     
  Branches                         1238     1239       +1     
==============================================================
+ Hits                             3409     3410       +1     
- Misses                            729      730       +1     
- Partials                          242      244       +2     
Flag Coverage Δ
integration 68.81% <57.14%> (-0.05%) ⬇️
legacy 34.05% <0.00%> (-0.04%) ⬇️
unit 47.87% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant