Skip to content

Add new setting in system configuration file to set Elastic Agent image type#2044

Merged
mrodm merged 17 commits intoelastic:mainfrom
mrodm:run-system-tests-type-agent
Aug 29, 2024
Merged

Add new setting in system configuration file to set Elastic Agent image type#2044
mrodm merged 17 commits intoelastic:mainfrom
mrodm:run-system-tests-type-agent

Conversation

@mrodm
Copy link
Copy Markdown
Contributor

@mrodm mrodm commented Aug 27, 2024

Closes #2037
Relates elastic/package-spec#788

Adds support for a new setting in the system configuration file (agent.type). This setting will indicate which kind of Elastic Agent docker image will be used for testing in the given test.

Example of this setting:

agent:
  base_image: complete

@mrodm mrodm self-assigned this Aug 27, 2024
@mrodm mrodm force-pushed the run-system-tests-type-agent branch from 34b9a0a to 34c21ef Compare August 28, 2024 15:47
@mrodm mrodm marked this pull request as ready for review August 28, 2024 16:23
@mrodm mrodm requested a review from a team August 28, 2024 16:23
Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Reviewed the last 4 commits, the rest are the same as in #2038, right?


// Configuration function returns the elastic-package configuration.
func Configuration() (*ApplicationConfiguration, error) {
func Configuration(options ...ConfigurationOption) (*ApplicationConfiguration, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it work without a stack version? Should it be mandatory?

Suggested change
func Configuration(options ...ConfigurationOption) (*ApplicationConfiguration, error) {
func Configuration(stackVersion string, options ...ConfigurationOption) (*ApplicationConfiguration, error) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

While doing these changes, there was an usage where it was not used stack version:

config, err := install.Configuration()

In that command, it looks like that it just checked the config file in the ~/.elastic-package directory. It's not needed there the stack versions to retrieve the images of the services.

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Aug 29, 2024

Reviewed the last 4 commits, the rest are the same as in #2038, right?

Exactly, this branch was based on that other PR so I could test everything.

mrodm and others added 2 commits August 29, 2024 10:18
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
@jsoriano
Copy link
Copy Markdown
Member

Feel free to merge after resolving the conflicts if there is nothing significant.

@jsoriano
Copy link
Copy Markdown
Member

Feel free to merge after resolving the conflicts if there is nothing significant.

Oh, race condition, you already resolved them :D

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm merged commit 0d3c215 into elastic:main Aug 29, 2024
@mrodm mrodm deleted the run-system-tests-type-agent branch August 29, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to run system tests with a different Elastic Agent docker image

3 participants