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

Update Tester instances to trigger just one test #1898

Merged
merged 48 commits into from
Jun 13, 2024

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Jun 10, 2024

Part of #787
Depends on #1895

Changed how Tester instances are created in each runner. In this PR, now it is created a Tester per each configuration file and variant (if required), so each Tester instance should be in charged of just one test.

This PR affects the following testers:

  • pipeline: one Tester per each configuration file.
  • policy: one Tester per each configuration file.
  • system: one Tester per each configuration file and variant.

Static tests keep creating one Tester per data stream folder, and Asset tests just create one test per package.

Note:

  • Runner instance is now in charge of performing the safeguards related to running system tests per stages.

Comment on lines +5 to +15
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
Copy link
Contributor Author

@mrodm mrodm Jun 10, 2024

Choose a reason for hiding this comment

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

There is one failure per pipeline test.

This error is the result of installing the pipelines of cisco_asa. Previously, pipelines were installed just onace, now those pipelines are installed once per test (Run()).

Copy link
Member

Choose a reason for hiding this comment

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

Will these failures be predictable if we parallelize?

At some point we may consider installing the pipelines by installing the packages, then we could install the package only once. The pipelines we test now are not exactly the same as what is executed at the end, see #1743.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe another mid-ground option is to install all pipelines included in the package in the Setup step, and remove them on TearDown, but then we would be installing all pipelines, even the ones that are not tested. Not sure I like this approach.

Copy link
Contributor Author

@mrodm mrodm Jun 12, 2024

Choose a reason for hiding this comment

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

Will these failures be predictable if we parallelize?

I guess this would be a source of flakiness. A pipeline test running in parallel with another one could report the errors from the other pipeline test and vice versa. So I guess the number of errors could vary.

It's also true that for now there would be support to run in parallel just in the system tests. The other type of tests would be running sequentially.

Maybe another mid-ground option is to install all pipelines included in the package in the Setup step, and remove them on TearDown, but then we would be installing all pipelines, even the ones that are not tested.

Do you mean installing and removing them in the SetupRunner and TearDownRunner methods? so those are just performed once

Currently, those methods just return error in the interface, if we want to do that probably they should also return []testrunner.Result , to return errors if any in those steps.

@mrodm mrodm changed the title Update tests triggered in each Tester instance Update Tester instances to trigger just one test Jun 12, 2024
@mrodm mrodm marked this pull request as ready for review June 12, 2024 10:12
Comment on lines +5 to +15
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
Copy link
Member

Choose a reason for hiding this comment

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

Will these failures be predictable if we parallelize?

At some point we may consider installing the pipelines by installing the packages, then we could install the package only once. The pipelines we test now are not exactly the same as what is executed at the end, see #1743.

Comment on lines +5 to +15
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
<failure>detected ingest pipeline warnings: 2: character class has &#39;-&#39; without escape&#xA;regular expression has redundant nested repeat operator.*</failure>
Copy link
Member

Choose a reason for hiding this comment

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

Maybe another mid-ground option is to install all pipelines included in the package in the Setup step, and remove them on TearDown, but then we would be installing all pipelines, even the ones that are not tested. Not sure I like this approach.

@mrodm mrodm requested a review from jsoriano June 13, 2024 13:41
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 13, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @mrodm

@mrodm mrodm merged commit 3d8ed71 into elastic:main Jun 13, 2024
3 checks passed
@mrodm mrodm deleted the change_granularity_tests branch June 13, 2024 14:46
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.

3 participants