elastic / elastic/fleet-server

Support disabling Elasticsearch compatibility check running under the agent

Open
#3,701 3 comments 0 reactions 0 assignees View on GitHub
enhancement Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
113
Forks
117
Avg merge
1d 16h
Merged PRs (30d)
112

Description

**Describe the enhancement:**

We should have a way of disabling the Elasticsearch compatibility check for testing purposes. There is a time period between minor releases when we need to run next minor version of the agent against a previous minor version of the stack.

Currently we have this error:

```json
{
"log.level": "info",
"@timestamp": "2024-07-09T09:53:05.033Z",
"log.origin": {
"function": "github.com/elastic/elastic-agent/internal/pkg/agent/cmd.waitForFleetServer.func1",
"file.name": "cmd/enroll_cmd.go",
"file.line": 824
},
"message": "Fleet Server - Error - failed version compatibility check with elasticsearch (Agent: 8.16.0-SNAPSHOT, Elasticsearch: 8.15.0): unsupported version",
"ecs.version": "1.6.0"
}
```

Which is coming from here https://github.com/elastic/fleet-server/blob/9cf540181f1ffa37d7dcbe28c7df592bd7d81ad8/internal/pkg/server/fleet.go#L445

The compatibility check is enforced only when Fleet Server is **NOT** running in the standalone mode and that's exactly how it's running under the agent:

https://github.com/elastic/fleet-server/blob/9cf540181f1ffa37d7dcbe28c7df592bd7d81ad8/internal/pkg/server/fleet.go#L61

https://github.com/elastic/fleet-server/blob/9cf540181f1ffa37d7dcbe28c7df592bd7d81ad8/internal/pkg/server/agent.go#L359

**Describe a specific use case for the enhancement or feature:**

Integration tests during the release cycle, when we still don't have a stack of the next minor but already have a snapshot of the agent in the next minor version.

Currently, we have to manually disable some tests for this period of time and then manually re-enable them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.