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

Test against 8.10 on main with the 8.11 agent by editing the package version #3277

Closed
wants to merge 4 commits into from

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Aug 22, 2023

The same as https://github.com/elastic/elastic-agent/pull/3276/files but with the package version file edit moved to happen in the right place.

Also fixes a bug in the GetPrevMinor() method of our version parser package. We need to keep this change.

I hope we get an 8.11 snapshot soon and we don't need this, but if we don't we'll merge it and then revert once the 8.11 snapshot is ready and work on less ugly solution for the next time this happens.

@cmacknz cmacknz requested a review from AndersonQ August 22, 2023 20:54
@cmacknz cmacknz self-assigned this Aug 22, 2023
@cmacknz cmacknz requested a review from a team as a code owner August 22, 2023 20:54
@cmacknz cmacknz requested a review from pchila August 22, 2023 20:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@elasticmachine
Copy link
Contributor

elasticmachine commented Aug 22, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-23T00:49:46.292+0000

  • Duration: 38 min 39 sec

Test stats 🧪

Test Results
Failed 0
Passed 6305
Skipped 47
Total 6352

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Aug 22, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.75% (79/80) 👍
Files 67.832% (194/286) 👍
Classes 66.292% (354/534) 👍
Methods 52.944% (1106/2089) 👍 0.07
Lines 38.662% (12653/32727) 👍 0.014
Conditionals 100.0% (0/0) 💚

@@ -360,3 +360,54 @@ func TestLess(t *testing.T) {
})
}
}

func TestPreviousMinor(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GetPrevMinor method was discarding the prerelease and build metadata information.

@cmacknz
Copy link
Member Author

cmacknz commented Aug 23, 2023

Looks like we need to fix the upgrade tests to respect the test stack version:

    fixture.go:433: >> running agent with: [/opt/Elastic/Agent/elastic-agent upgrade 8.11.0-SNAPSHOT --source-uri file:///home/ubuntu/agent/.agent-testing/local --skip-verify]
    upgrade_test.go:469: 
        	Error Trace:	/home/ubuntu/agent/testing/integration/upgrade_test.go:469
        	            				/home/ubuntu/agent/testing/integration/upgrade_test.go:215
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	TestStandaloneUpgrade/Upgrade_8.10.0_to_8.11.0-SNAPSHOT
        	Messages:   	error triggering agent upgrade to version "8.11.0-SNAPSHOT", output:

This just keeps getting uglier...

@AndersonQ
Copy link
Member

@cmacknz with @pchila's help I took another approach and just needed to set AGENT_PACKAGE_VERSION, AGENT_STACK_VERSION and AGENT_VERSION when building the agent and running the tests on buildkite to have it working. I've also merged you fix on the version package on my PR #3276.

I think we can close this one and finish the review and any last change there.

@cmacknz
Copy link
Member Author

cmacknz commented Aug 23, 2023

Yes that solution is much nicer, closing this one.

@cmacknz cmacknz closed this Aug 23, 2023
@cmacknz cmacknz deleted the use-8.10-instead-of-8.11-fixed branch August 23, 2023 12:56
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.

3 participants