Skip to content

[Flaky Test]: TestStandaloneUpgradeRollbackOnRestarts – failed waiting for healthy agent and version (context deadline exceeded): could not unmarshal agent status output: unexpected end of JSON input #6733

@pchila

Description

@pchila

Failing test case

TestStandaloneUpgradeRollbackOnRestarts

Error message

failed waiting for healthy agent and version (context deadline exceeded): could not unmarshal agent status output: unexpected end of JSON input

Build

https://buildkite.com/elastic/elastic-agent-extended-testing-bk/builds/1350#0194daae-65c2-4d84-83d3-99c13e0c7e13

OS

Windows

Stacktrace and notes

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.

Metadata

Metadata

Assignees

Labels

Team:Elastic-AgentLabel for the Agent teamflaky-testUnstable or unreliable test cases.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions