-
Notifications
You must be signed in to change notification settings - Fork 41
feat: download the agent once, mounting it as a volume #179
Conversation
| // into the Fleet struct, to be used else where | ||
| func (fts *FleetTestSuite) downloadAgentBinary() error { | ||
| artifact := "elastic-agent" | ||
| version := "8.0.0-SNAPSHOT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version should be configurable, to support running the test suite against multiple versions of the agent.
I could think of an env var with the URL. If it is present in the execution, simply use it.
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
|
Failing tests are the ones failing in upstream |
What is this PR doing?
It changes the compose file for the vanilla box defining a volume to mount the elastic-agent binary on it. We will use environment variables to configure the src and target of the volume.
That way, we will download the agent binary to a temporary dir before the test suite runs (only once), and will remove it from the file system after the tests suite runs.
Why is this important?
It will reduce the number of HTTP connections to download the binary to 1, compared to one for each scenario installing an agent. It usually takes from 5 to 10 seconds, so the gain will be (in average) 7'5 times the number of scenarios (6 at this moment).
It will also bring reliability, because the download of the binary is done from the test runner, so it has the retry-with-backoff capabilities, instead of running it from inside the container.
Related issues