Skip to content

terralith-scale: test_apply's tagged-count detail applies its --query per page, so at scale 10 it reads 100 100 100 35 instead of 335 #1042

Description

@lex00

What

live/e2e/terralith-scale/run.sh's test_apply stage prints a detail line counting the objects carrying the estate tag with aws resourcegroupstaggingapi get-resources --query 'length(...)' --output text. The CLI applies the JMESPath query to each page of results rather than to the merged list, and the Tagging API pages at 100, so from scale 10 upward the detail reads 100 100 100 35 where it means 335, and at scale 50 it is seventeen numbers.

No verdict depends on it: both sides of the equality that stage checks page identically, so the comparison holds. It is the printed detail that is wrong, and a reader of the log will believe the count is broken.

Found during #1032 unit 2 at scale 10 and left unfixed rather than spend a third ninety-minute scale-50 pass on a cosmetic change.

Do

Sum the pages (--no-paginate is wrong here; either pipe through jq over the full JSON, or let the CLI paginate and sum length across pages) so the detail prints one number. Check whether any other crossing script's detail line uses the same --query length idiom, since the corpus scripts were written from the same template.

Proof

The detail line at scale 10 reading 335, and a guard or grep that no crossing script applies --query 'length( to a paginated Tagging or list call without summing.

Refs #1032.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions