-
Notifications
You must be signed in to change notification settings - Fork 127
Check logs from elastic-agent in system tests #1256
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
Conversation
e4ec44a to
b1c8d3f
Compare
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.
Approach looks good in general, added some observations and nitpicking.
Do not store all the messages of docker-compose logs in memory, they are now processed with a function passed as a parameter. Removed unnecessary variables.
73e2434 to
9e6d45e
Compare
| cmd.PersistentFlags().BoolP(cobraext.TestCoverageFlagName, "", false, cobraext.TestCoverageFlagDescription) | ||
| cmd.PersistentFlags().DurationP(cobraext.DeferCleanupFlagName, "", 0, cobraext.DeferCleanupFlagDescription) | ||
| cmd.PersistentFlags().String(cobraext.VariantFlagName, "", cobraext.VariantFlagDescription) | ||
| cmd.PersistentFlags().StringP(cobraext.ProfileFlagName, "p", "", fmt.Sprintf(cobraext.ProfileFlagDescription, install.ProfileNameEnvVar)) |
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.
Added profile parameter into elastic-package test command
I don't know the reason of these errors nor the root cause of them |
|
As soon as we merge we should ask the teams to look at these. You can already ping them btw |
| // logsRegexp{ | ||
| // includes: regexp.MustCompile("New State ID"), | ||
| // excludes: []*regexp.Regexp{ | ||
| // regexp.MustCompile("is unahorized API key id"), | ||
| // }, | ||
| // }, | ||
| // logsRegexp{ | ||
| // includes: regexp.MustCompile("->HEALTHY"), | ||
| // excludes: []*regexp.Regexp{ | ||
| // regexp.MustCompile(`Healthy$`), | ||
| // }, | ||
| // }, |
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.
to be deleted
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 is looking good, could we add some tests that cover the pattern matching logic?
💚 Build Succeeded
History
cc @mrodm |
@jlind23 there is still a final review pending, but I hope it shouldn't be pending too many changes. There are still three issues pending to be fixed (one was already fixed):
If this PR is merged, then any attempt to update elastic-package on integrations repository would be blocked (there would be failures) and even future elastic-package releases. If that following PR in integrations is merged (those failures are ignored), then all those packages affected would be failing and they could not release any new version of the package. |
|
@mrodm in order to move forward can't we mark these 3 failing packages as an exception until it's fixed? If we wait more some new failures can be introduced in the mean time |
Not sure how to filter that, packages could fail for other reasons too. An option (not the best one), they could ask us to merge those PRs... |
It is possible to skip system tests (see docs). We could add something like this to their test definition when updating elastic-package in integrations: Each one with its link, and include a comment on these issues about the test being skipped. |
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.
👍
Thanks @jsoriano ! |
Closes #1188
This PR adds into system test a new check to look for errors in container logs. These errors could be specified by means of patterns in the code.
A new parameter
--profile(or-p) has been added intoelastic-package testso it can be retrieved the profile information, required to dump the logs of the services.This adds a new test result whose Test Name is
(<service> logs)under the test typesystem.Example of output setting fake patterns:
How to test this locally
In a given package, run the following commands: