Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin agent version for integration tests #6682

Merged
merged 6 commits into from
Feb 3, 2025

Conversation

pchila
Copy link
Member

@pchila pchila commented Jan 31, 2025

What does this PR do?

Pin elastic agent version to 9.0.0 for both packaging and integration tests to avoid issues while testing with previous minors and upgrade paths.
Elastic agent code and dependencies are still main/9.1.0-SNAPSHOT we simply package the agent as if it was a 9.0.0 version.

This change is not meant to be permanent and it's only meant to unblock merging PRs to main

Why is it important?

To avoid blocking PR merging on main

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@pchila pchila added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Testing ci labels Jan 31, 2025
@pchila pchila self-assigned this Jan 31, 2025
Copy link
Contributor

mergify bot commented Jan 31, 2025

This pull request does not have a backport label. Could you fix it @pchila? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

@pchila pchila marked this pull request as ready for review January 31, 2025 17:05
@pchila pchila requested a review from a team as a code owner January 31, 2025 17:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@pchila pchila requested a review from cmacknz January 31, 2025 17:08
@pchila pchila enabled auto-merge (squash) January 31, 2025 17:27
@cmacknz
Copy link
Member

cmacknz commented Jan 31, 2025

The fleet bootstrap tests are failing because the --install-servers option is missing, there's already an issue for that.

A bunch of new tests are failing because they can't read the package version file which I've never seen happen before.

Error initializing version information: reading package version from file "/opt/Elastic/Agent/data/elastic-agent-9.0.0-SNAPSHOT-8ec1c4/package.version": open /opt/Elastic/Agent/data/elastic-agent-9.0.0-SNAPSHOT-8ec1c4/package.version: no such file or directory

@pchila
Copy link
Member Author

pchila commented Feb 3, 2025

The fleet bootstrap tests are failing because the --install-servers option is missing, there's already an issue for that.

From what I see in the code --install-servers is passed in the fleet bootstrap tests


if i.InstallServers {
args = append(args, "--install-servers")
}

so the issue could be elsewhere, possible fleet-server is not starting for other reasons

A bunch of new tests are failing because they can't read the package version file which I've never seen happen before.

I will try disabling TestUpgradeBrokenPackageVersion as it's known to have issues with version bumps and package.version file removal

func TestUpgradeBrokenPackageVersion(t *testing.T) {

@pchila
Copy link
Member Author

pchila commented Feb 3, 2025

From what I see in the code --install-servers is passed in the fleet bootstrap tests

Adding some information after looking more closely to the errors for fleet server bootstrap tests, we have this log line

{"log.level":"info","@timestamp":"2025-01-31T17:55:59.323Z","log.origin":{"function":"github.com/elastic/elastic-agent/internal/pkg/agent/cmd.waitForFleetServer.func1","file.name":"cmd/enroll_cmd.go","file.line":829},"message":"Fleet Server - Error - failed version compatibility check with elasticsearch (Agent: 9.1.0-SNAPSHOT, Elasticsearch: 9.0.0): unsupported version","ecs.version":"1.6.0"}

It looks like we cannot start fleet-server version 9.1.0 on a 9.0.0 Elasticsearch: there's a 9.1.0-SNAPSHOT stack available in CFT region so I am going to force Integration tests to use that version

@pchila pchila requested a review from a team as a code owner February 3, 2025 08:17
@pchila pchila disabled auto-merge February 3, 2025 08:19
Copy link

@pchila pchila merged commit 3df3e89 into elastic:main Feb 3, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants