The test TestSchematicChanges was flaky, as it was doing the following:
Trigger one or more factory.talos.dev build image generations & talos node upgrades by modifying resources
Capture these upgrade calls
Assert the build image in these calls (to be one or more with, always the expected image)
Clear captured upgrade calls
Trigger one or more ghcr.io build image generations & talos node upgrades by modifying resources
Capture these upgrade calls
Assert the build image in these new calls (to be one or more with, always the expected image)
The problem was, between step 4 and 7, an old factory.talos.dev build image could sometimes still be captured due to the nature of controllers asynchronously reconciling resources.
Replace this logic by not clearing the upgrade requests at all, instead, simply ignoring the previous image's preceding captured requests in step 7.
The test
TestSchematicChanges
was flaky, as it was doing the following:factory.talos.dev
build image generations & talos node upgrades by modifying resourcesghcr.io
build image generations & talos node upgrades by modifying resourcesThe problem was, between step 4 and 7, an old
factory.talos.dev
build image could sometimes still be captured due to the nature of controllers asynchronously reconciling resources.Replace this logic by not clearing the upgrade requests at all, instead, simply ignoring the previous image's preceding captured requests in step 7.