failed waiting for healthy agent and version (context deadline exceeded): could not unmarshal agent status output: unexpected end of JSON input
According to the watcher logs the upgrade is not rolled back as expected
In the diagnostics we only find 9.0.0-SNAPSHOT logs (the test performs 8.18.0-SNAPSHOT -> 9.0.0-SNAPSHOT upgrade, rolled back to 8.18.0-SNAPSHOT) so it seems that 8.18.0 has been cleaned up confirmed by this watcher log
{"log.level":"info","@timestamp":"2025-02-06T10:21:27.713Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade.cleanup","file.name":"upgrade/rollback.go","file.line":132},"message":"Removing hashed data directory","file.path":"C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8.18.0-SNAPSHOT-eb771e","ecs.version":"1.6.0"}
The interesting bit is that the watcher stated that the grace period is passed after about a minute, during which there are some connection errors, HEALTHY and STOPPED states, but not enough to trigger a rollback.