Three hardening fixes on migration 56's new code:
- The foreign-owner branch in adopt_one pins the object prune-proof but does not
adopt it (the child release can then stay Failed on the ownership conflict),
yet it was the one warn+pin+skip path that did not record itself in the durable
unadopted ConfigMap -- so an operator relying on that record to find stuck
pools would miss it. Record it like every sibling branch.
- record_skip ran a bare append under set -e inside skip branches that are
designed never to abort; a failed write (e.g. /tmp full) could deadlock the
fleet upgrade for one tenant. Make it fail-open, matching the branches' intent.
- The restamp selector matched any release by chartRef; scope it to names
starting with kubernetes- so it cannot mislabel (and then have the sweep skip)
a non-standard release, keeping restamp and the sweep's contract in sync.
Also fix the previously-vacuous negative restamp test (its fixture lacked the
chartRef, so it never reached the label guard it claimed to check).
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
The main merge renumbered the Phase 2 worker-pool adoption migration from 54
to 56 (behind main's redis-adopt 54 and fluxcd-orphan 55), but its bats and
fakebin did not move: hack/migration-54-adopt-{path,values}.bats still pinned
MIG at migrations/54, which is now the redis-operator adoption, so both went
red on "RedisFailover CRD not present; nothing to adopt".
Rename the two bats and hack/testdata/migration-54 to 56, repoint MIG/FAKEBIN
at migration 56, and update the version references (stamp 55 -> 57). The bare
migration-54 testdata name also collided with the migration-54-redis and
migration-55-fluxcd siblings; 56 disambiguates it.
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>