Skip to content

Set default table row index - #2908

Merged
chadlwilson merged 5 commits into
getgauge:masterfrom
sschulz92:SET_DEFAULT_TABLE_ROW_INDEX_2nd_try
Oct 29, 2026
Merged

chadlwilson merged 5 commits into
getgauge:masterfrom
sschulz92:SET_DEFAULT_TABLE_ROW_INDEX_2nd_try

Conversation

@sschulz92

Copy link
Copy Markdown
Contributor

As the other PR is messed up with changes suggested by AI, I decided to create a new branch from scratch.

My goal is, to set the tableRowIndex of each scenario to the correct value:

which table(s) is used by a scenario? :specTableRowIndex: :scenarioTableRowIndex:
no table -1 -1
spec table used only 0..N -1
scenario table used only -1 0..N
both tables used 0..N 0..N

Why is this change necessary at all? If I do not set the tableRowIndex directly, those values are converted to 0 using the proto3 syntax. Generated functions are returning "0" as default integer value. To avoid any additional change in gauge-proto, we can simply rely on integer values if they are set.

Related PR: #2879

Signed-off-by: sschulz92 <bastie92_spam@gmx.de>
Signed-off-by: sschulz92 <bastie92_spam@gmx.de>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results

java_simple_parallel.csv

Commit CPU Memory Time ExitCode
1a8bd58 22% 70824 0:23.73 0
a82670d 19% 69128 0:27.94 0
1960cd7 18% 67908 0:24.69 0
ef3cebe 17% 66236 0:18.31 0

java_gradle_serial.csv

Commit CPU Memory Time ExitCode
1a8bd58 164% 539200 0:31.87 0
a82670d 175% 549404 0:22.27 0
1960cd7 188% 550496 0:28.78 0
ef3cebe 188% 547528 0:27.09 0

java_gradle_parallel.csv

Commit CPU Memory Time ExitCode
1a8bd58 97% 533636 0:32.67 0
a82670d 132% 565084 0:38.23 0
1960cd7 114% 556016 0:42.77 0
ef3cebe 112% 553328 0:44.50 0

java_simple_multithreaded.csv

Commit CPU Memory Time ExitCode
1a8bd58 32% 69056 0:12.34 0
a82670d 23% 69052 0:12.08 0
1960cd7 38% 68600 0:09.90 0
ef3cebe 35% 68708 0:10.70 0

java_maven_parallel.csv

Commit CPU Memory Time ExitCode
1a8bd58 31% 234208 0:32.13 0
a82670d 35% 231404 0:38.72 0
1960cd7 35% 211396 0:38.72 0
ef3cebe 32% 217276 0:31.03 0

java_maven_serial.csv

Commit CPU Memory Time ExitCode
1a8bd58 76% 231152 0:20.40 0
a82670d 66% 223188 0:18.12 0
1960cd7 75% 232148 0:19.92 0
ef3cebe 76% 226576 0:19.74 0

java_maven_multithreaded.csv

Commit CPU Memory Time ExitCode
1a8bd58 57% 244912 0:16.38 0
a82670d 60% 229776 0:19.92 0
1960cd7 70% 207260 0:16.37 0
ef3cebe 71% 210336 0:17.53 0

java_simple_serial.csv

Commit CPU Memory Time ExitCode
1a8bd58 46% 68652 0:14.69 0
a82670d 43% 66876 0:09.49 0
1960cd7 34% 68596 0:13.97 0
ef3cebe 49% 68900 0:13.77 0

java_gradle_multithreaded.csv

Commit CPU Memory Time ExitCode
1a8bd58 174% 562520 0:23.33 0
a82670d 195% 562728 0:24.37 0
1960cd7 188% 548504 0:25.92 0
ef3cebe 189% 554088 0:25.93 0

Notes

  • The results above are generated by running against seed projects in https://github.com/getgauge/gauge-benchmark
  • These results are not persisted, but on merging to master the benchmark will be rerun.
  • These benchmark are run in Github Actions' agents, which are virtualized. Results are not to be taken as actual benchmarks.Rather, these are indicative numbers and make sense for comparison.

See Workflow log for more details.

@sschulz92

Copy link
Copy Markdown
Contributor Author

@haroon-sheikh @chadlwilson Can one of you request the Copilot review please or have a look onto this changes which are limited to the actual issue I want to solve? :)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues, and regression tests cover the changed index handling, though tests were not executed.

No open issues 🎉

What changed in this PR

Makes unused table row indices explicitly -1, distinguishing them from row zero without changing the protobuf schema.

Changes:

  • Sets explicit spec and scenario table indices during scenario copying and result creation.
  • Preserves -1 indices when merging results and adds regression coverage.
  • Bumps Gauge to version 1.6.41.
File Description
version/​version.go Bumps version to 1.6.41.
parser/​dataTableSpecs.go Sets indices explicitly when copying scenarios.
parser/​dataTableSpecs_test.go Covers table-use combinations and expected indices.
execution/​result/​specResult.go Sets unused scenario table indices to -1.
execution/​result/​specResult_test.go Checks serialized table indices.
execution/​merge.go Preserves indices for scenarios without a spec table row.
execution/​merge_test.go Tests merging mixed table-related scenarios.

Review effort: Balanced

sschulz92 and others added 2 commits October 21, 2026 14:07
@sschulz92

Copy link
Copy Markdown
Contributor Author

Any chance to have this topic done and dealt with 😬 @chadlwilson if you cannot review it, whom should I ask instead?

@gaugebot

gaugebot Bot commented Oct 29, 2026

Copy link
Copy Markdown

@sschulz92 Thank you for contributing to gauge. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

@chadlwilson chadlwilson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give it a go, seems pretty straightforward here now (although execution result merging and reruns always do my head in).

@chadlwilson
chadlwilson merged commit 8056585 into getgauge:master Oct 29, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants