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

WIP: honor MODULE env var in Filebeat system tests #18690

Closed
wants to merge 1 commit into from
Closed

WIP: honor MODULE env var in Filebeat system tests #18690

wants to merge 1 commit into from

Conversation

ycombinator
Copy link
Contributor

What does this PR do?

Makes the Filebeat module system tests honor the MODULE environment variable.

Why is it important?

In #18592 we introduced the MODULE environment variable. The idea was that when tests are run in a CI environment, if the PR being tested only contains changes for a single module, the MODULE environment variable would be set to the name of that module. This should help speed up the CI build as unrelated tests wouldn't get run.

The Filebeat system tests are currently not honoring the MODULE environment variable. This PR teaches them to do that.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 21, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18690 opened]

  • Start Time: 2020-05-21T13:09:22.183+0000

  • Duration: 79 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 9214
Skipped 1542
Total 10756

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-06-02T13:42:25.290+0000

  • Duration: 124 min 41 sec

Test stats 🧪

Test Results
Failed 2
Passed 8257
Skipped 1543
Total 9802

Test errors

Expand to view the tests failures

  • Name: Build and Test / Metricbeat OSS Unit tests / test_process – test_system.Test

    • Age: 1
    • Duration: 1.43
    • Error Details: False is not true : fd not found in any process events
  • Name: Build and Test / Filebeat oss / test_reload_same_config – test_reload_inputs.Test

    • Age: 1
    • Duration: 16.273
    • Error Details: Timeout waiting for 'cond' to be true. Waited 15 seconds.

Steps errors

Expand to view the steps failures

  • Name: Make -C filebeat testsuite

    • Description: make -C filebeat testsuite

    • Duration: 29 min 46 sec

    • Start Time: 2020-06-02T14:41:41.758+0000

    • log

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-02T15:10:31.823+0000

    • log

  • Name: Fix permissions

    • Description:

    • Duration: 0 min 10 sec

    • Start Time: 2020-06-02T15:22:47.119+0000

    • log

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-02T15:25:42.150+0000

    • log

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 10 min 6 sec

    • Start Time: 2020-06-02T14:42:10.886+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-02T15:45:42.993Z] + MSG='parameter missing.'
[2020-06-02T15:45:42.993Z] + TERRAFORM_VERSION=0.12.24
[2020-06-02T15:45:42.993Z] + HOME=/var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690
[2020-06-02T15:45:42.993Z] + TERRAFORM_CMD=/var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform
[2020-06-02T15:45:42.993Z] ++ uname -s
[2020-06-02T15:45:42.993Z] ++ tr '[:upper:]' '[:lower:]'
[2020-06-02T15:45:42.993Z] + OS=linux
[2020-06-02T15:45:42.993Z] + mkdir -p /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin
[2020-06-02T15:45:42.993Z] + curl -sSLo - https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip
[2020-06-02T15:45:43.956Z] ++ dirname /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform
[2020-06-02T15:45:43.956Z] + unzip -o /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform.zip -d /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin
[2020-06-02T15:45:43.956Z] Archive:  /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform.zip
[2020-06-02T15:45:44.231Z]   inflating: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform  
[2020-06-02T15:45:44.231Z] + rm /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform.zip
[2020-06-02T15:45:44.231Z] + chmod +x /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/bin/terraform
[2020-06-02T15:45:44.829Z] + make mage
[2020-06-02T15:45:44.829Z] Installing mage v1.9.0 from vendor dir.
[2020-06-02T15:45:45.779Z] /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/.magefile cleaned
[2020-06-02T15:45:46.159Z] + git config --get user.email
[2020-06-02T15:45:46.159Z] + [ -z  ]
[2020-06-02T15:45:46.159Z] + git config user.email [email protected]
[2020-06-02T15:45:46.159Z] + git config user.name beatsmachine
[2020-06-02T15:45:46.710Z] + .ci/scripts/terraform-cleanup.sh x-pack/metricbeat
[2020-06-02T15:45:46.710Z] + DIRECTORY=x-pack/metricbeat
[2020-06-02T15:45:46.710Z] + FAILED=0
[2020-06-02T15:45:46.710Z] ++ find x-pack/metricbeat -name terraform.tfstate
[2020-06-02T15:45:46.710Z] + exit 0
[2020-06-02T15:45:47.268Z] + curl -sSLo codecov https://codecov.io/bash
[2020-06-02T15:45:47.547Z] + FILE=auditbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=filebeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=heartbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=libbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=metricbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=packetbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-06-02T15:45:47.547Z] + FILE=journalbeat/build/coverage/full.cov
[2020-06-02T15:45:47.547Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-06-02T15:45:49.079Z] Failed in branch Metricbeat x-pack
[2020-06-02T15:45:49.325Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats
[2020-06-02T15:45:49.725Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-02T15:45:49.749Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Lint
[2020-06-02T15:45:49.958Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-06-02T15:45:50.175Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-06-02T15:45:50.396Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-06-02T15:45:50.631Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-02T15:45:51.065Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-02T15:45:51.307Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-06-02T15:45:51.531Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-06-02T15:45:51.732Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Winlogbeat-oss
[2020-06-02T15:45:51.941Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-06-02T15:45:52.160Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Dockerlogbeat
[2020-06-02T15:45:52.334Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-Windows
[2020-06-02T15:45:52.582Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Journalbeat-oss
[2020-06-02T15:45:52.794Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-06-02T15:45:53.026Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-06-02T15:45:53.198Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-06-02T15:45:53.324Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-06-02T15:45:53.429Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-06-02T15:45:53.612Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Heartbeat-oss
[2020-06-02T15:45:53.868Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-06-02T15:45:54.136Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Libbeat-x-pack
[2020-06-02T15:45:54.252Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Packetbeat-oss
[2020-06-02T15:45:54.362Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-06-02T15:45:54.472Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-02T15:45:54.639Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-06-02T15:45:54.757Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-oss
[2020-06-02T15:45:54.864Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-06-02T15:45:54.964Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-06-02T15:45:55.076Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-06-02T15:45:55.178Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-06-02T15:45:55.272Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-06-02T15:45:55.366Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-06-02T15:45:55.481Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-06-02T15:45:55.615Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Libbeat-oss
[2020-06-02T15:45:55.783Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-06-02T15:45:55.891Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-06-02T15:45:56.040Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-06-02T15:45:56.202Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-06-02T15:45:56.416Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-06-02T15:45:56.618Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-06-02T15:45:57.099Z] + cat
[2020-06-02T15:45:57.099Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-02T15:45:57.099Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-02T15:46:02.283Z] Body did not finish within grace period; terminating with extreme prejudice
[2020-06-02T15:46:02.364Z] ERROR: runbld post build action failed.
[2020-06-02T15:46:02.364Z] Timeout has been exceeded
[2020-06-02T15:46:03.897Z] Running on worker-395930 in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18690
[2020-06-02T15:46:04.524Z] [INFO] getVaultSecret: Getting secrets
[2020-06-02T15:46:04.717Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-02T15:46:07.805Z] + chmod 755 generate-build-data.sh
[2020-06-02T15:46:07.805Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18690/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18690/runs/2 ABORTED 7421059
[2020-06-02T15:46:07.805Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18690/runs/2/steps/?limit=10000 -o steps-info.json
[2020-06-02T15:46:10.150Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18690/runs/2/tests/?status=FAILED -o tests-errors.json

@ycombinator
Copy link
Contributor Author

@jsoriano IIRC you did some work recently on this front? So maybe this PR is obsolete now?

@jsoriano
Copy link
Member

@ycombinator last changes I did were for Metricbeat, I think there is nothing yet for filebeat.

Regarding this change, would it be an option to add support for MODULE environment variable in filebeat tests, instead of adding TESTING_FILEBEAT_MODULES in CI?

@ycombinator
Copy link
Contributor Author

ycombinator commented Jul 17, 2020

Regarding this change, would it be an option to add support for MODULE environment variable in filebeat tests, instead of adding TESTING_FILEBEAT_MODULES in CI?

++ what you suggest is the better way to go. We might even want to just replace TESTING_FILEBEAT_MODULES with MODULE to avoid confusion. I know it's a breaking change but it would only affect developers and we can note in the developer CHANGELOG. WDYT?

@jsoriano
Copy link
Member

We might even want to just replace TESTING_FILEBEAT_MODULES with MODULE to avoid confusion. I know it's a breaking change but it would only affect developers and we can note in the developer CHANGELOG. WDYT?

@ycombinator I would prefer to support both environment variables at least during a time. But if this complicates things, I would then go for the approach of replacing the environment variable and mentioning that in the developer CHANGELOG.

@botelastic
Copy link

botelastic bot commented Aug 16, 2020

Hi!
We just realized that we haven't looked into this PR in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Aug 16, 2020
@botelastic
Copy link

botelastic bot commented Sep 15, 2020

Hi!
This PR has been stale for a while and we're going to close it as part of our cleanup procedure.
We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team.
Feel free to re-open this PR if you think it should stay open and is worth rebasing.
Thank you for your contribution!

@botelastic botelastic bot closed this Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stalled Team:Automation Label for the Observability productivity team [zube]: In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants