-
Notifications
You must be signed in to change notification settings - Fork 154
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
[testing/integration]: fix TestLogIngestionFleetManaged #5648
[testing/integration]: fix TestLogIngestionFleetManaged #5648
Conversation
This pull request does not have a backport label. Could you fix it @VihasMakwana? 🙏
|
|
b20e2f9
to
c3f7b0e
Compare
/test |
Will run this 4-5 times and observer the CI. |
/test |
succeeded 2/2 times. Triggered 3rd time |
TestLogIngestionFleetManaged succeeded 3/3 |
/test |
I think we should also decrease the metrics interval used in the test to 1s, this will effectively be speeding up and allowing for retries if we hit this failure on the first attempt to collect metrics. |
This particular test creates policy in fleet and the policy schema doesn't really have any EDIT: I think we can do that. I'll try that and update the PR. EDIT2: We can override elastic-agent.yml, but doing so would contradict the purpose of this fleet-managed test. |
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
This was the first thing I wanted to do, as we've done the same with |
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.
Looks good.
This is fine, if you want to properly do it through Fleet you can use the policy overrides API. See https://support.elastic.dev/knowledge/view/06b69893 for an example. |
(I don't think it matters for the purpose of what we are trying to test here whether you change the initial local agent configuration or use the overrides API to do this). Checking for health at startup makes sure we identify the right error, but it roughly equivalent to just waiting longer for us to get healthy. If we increase the metrics interval the whole test should execute faster. |
You can use this setting to override custom settings which aren't available in fleet UI. For eg. https://www.elastic.co/guide/en/fleet/current/enable-custom-policy-settings.html and https://support.elastic.dev/knowledge/view/06b69893 This will make things much easier for elastic/elastic-agent#5648
go.mod
Outdated
@@ -14,7 +14,7 @@ require ( | |||
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 | |||
github.com/elastic/elastic-agent-autodiscover v0.8.2 | |||
github.com/elastic/elastic-agent-client/v7 v7.16.0 | |||
github.com/elastic/elastic-agent-libs v0.10.1 | |||
github.com/elastic/elastic-agent-libs v0.12.1-0.20241004133534-196dace11604 |
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.
I'll create a minor release once the CI is green on this commit.
This pull request is now in conflicts. Could you fix it? 🙏
|
CI is red. |
|
fix TestLogIngestionFleetManaged --------- Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> Co-authored-by: Blake Rouse <blake.rouse@elastic.co> (cherry picked from commit 26f3d59) # Conflicts: # go.mod # go.sum
…tManaged (#5751) * [testing/integration]: fix TestLogIngestionFleetManaged (#5648) fix TestLogIngestionFleetManaged --------- Co-authored-by: Paolo Chilà <paolo.chila@elastic.co> Co-authored-by: Blake Rouse <blake.rouse@elastic.co> (cherry picked from commit 26f3d59) # Conflicts: # go.mod # go.sum * Update go.mod * Update go.sum * Fix notice. --------- Co-authored-by: VihasMakwana <121151420+VihasMakwana@users.noreply.github.com> Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
Looking at diagnostics of #5631 failure, it was clear that the
monitoring
units were not healthy. This is a known issue and it takes some time for them to be healthy.This PR aims to fix that by making sure the components are healthy before proceeding with the test case.