Skip to content

test(placement): execute Starlark packing against a mock Incus cluster - #435

Merged
rldyourmnd merged 3 commits into
mainfrom
test/placement-starlark-execution-20260908
Sep 8, 2026
Merged

test(placement): execute Starlark packing against a mock Incus cluster#435
rldyourmnd merged 3 commits into
mainfrom
test/placement-starlark-execution-20260908

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Summary

  • Execute the rendered Incus placement scriptlet with Incus builtin signatures instead of strings.Contains.
  • Counterexample: four 16GiB hosts each holding 8GiB of 4GiB workers cannot place an 8GiB job; packed occupancy [12,12,8,0] GiB lands it on the empty member.
  • Swap is not a harness RAM input. Maintenance still places on a closed empty member; jobs do not.

Test plan

  • GOTOOLCHAIN=go1.26.7 go test ./internal/incusplacement
  • CI Test/Race/Static/Gate
  • Do not apply the scriptlet live in this PR.

rldyourmnd and others added 3 commits September 8, 2026 16:33
…cluster

String asserts cannot prove packing. Run the rendered script with Incus
call shapes so an 8GiB worker still fails on four hosts each holding two
4GiB jobs and lands on the empty member of a packed occupancy.

Signed-off-by: rldyourmnd <danil@nddev.it.com>
Execute the rendered scriptlet in a nested module so packing tests
keep the real Incus interpreter without invalidating the pinned
provider derivative.

Signed-off-by: rldyourmnd <danil@nddev.it.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
get_instances_count(..., true) is running instances plus InstanceCreate
operations, not extras-only. A create with no record must still pack.

Signed-off-by: rldyourmnd <danil@nddev.it.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rldyourmnd
rldyourmnd merged commit bb0b2ec into main Sep 8, 2026
10 checks passed
@rldyourmnd
rldyourmnd deleted the test/placement-starlark-execution-20260908 branch September 8, 2026 12:55
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