Skip to content

Cherry-pick #24250 to 7.x: Port four Harvester tests of log input to filestream in Golang#24882

Merged
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_24250_7.x
Apr 1, 2021
Merged

Cherry-pick #24250 to 7.x: Port four Harvester tests of log input to filestream in Golang#24882
kvch merged 1 commit intoelastic:7.xfrom
kvch:backport_24250_7.x

Conversation

@kvch
Copy link
Copy Markdown
Contributor

@kvch kvch commented Apr 1, 2021

Cherry-pick of PR #24250 to 7.x branch. Original message:

What does this PR do?

This PR ports the following Python tests of the log input to filestream to Golang:

  • test_harvester.py:test_close_removed
  • test_harvester.py:test_empty_lines
  • test_harvester.py:test_empty_lines_only
  • test_harvester.py:test_exceed_buffer

Why is it important?

Increase the test coverage of filestream.

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.

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 1, 2021
@kvch kvch force-pushed the backport_24250_7.x branch from 753cde2 to 927ff87 Compare April 1, 2021 09:25
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 1, 2021

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #24882 updated

  • Start Time: 2021-04-01T11:32:34.035+0000

  • Duration: 75 min 10 sec

  • Commit: 19918a5

Test stats 🧪

Test Results
Failed 1
Passed 46398
Skipped 5174
Total 51573

Trends 🧪

Image of Build Times

Image of Tests

Test errors 1

Expand to view the tests failures

Build&Test / x-pack/elastic-agent-windows-2008-windows-2008-r2 / TestConfigurableFailed – github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestConfigurableFailed
        common_test.go:133: check timed out after 15 second: process never restarted
    --- FAIL: TestConfigurableFailed (19.26s)
     
    

Steps errors 3

Expand to view the steps failures

x-pack/elastic-agent-windows-2008-windows-2008-r2 - mage build unitTest
  • Took 2 min 12 sec . View more details on here
  • Description: mage build unitTest
gsutil -m -q cp -a public-read test-build-artifacts-x-pack-elastic-agent-windows-2008-windows-2008-r
  • Took 0 min 3 sec . View more details on here
  • Description: @echo off gsutil -m -q cp -a public-read test-build-artifacts-x-pack-elastic-agent-windows-2008-windows-2008-r2-tgz gs://beats-ci-temp/Beats/beats/PR-24882-3
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

Log output

Expand to view the last 100 lines of log output

[2021-04-01T12:44:51.968Z] 5a4edd65a316: Layer already exists
[2021-04-01T12:44:51.968Z] f6683555639c: Layer already exists
[2021-04-01T12:44:52.969Z] 19918a59b901a766bee722fb2a31879c558cd5a2-amd64: digest: sha256:07e242f4aa6983854ad965afcf3cb41a4e7d3570bd74848dcd4326526b684201 size: 3031
[2021-04-01T12:44:53.373Z] Cleaning up /var/lib/jenkins/workspace/PR-24882-3-a66d6330-677a-4734-a360-f724286671f4
[2021-04-01T12:44:53.373Z] Client: Docker Engine - Community
[2021-04-01T12:44:53.373Z]  Version:           20.10.3
[2021-04-01T12:44:53.373Z]  API version:       1.41
[2021-04-01T12:44:53.373Z]  Go version:        go1.13.15
[2021-04-01T12:44:53.373Z]  Git commit:        48d30b5
[2021-04-01T12:44:53.373Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-04-01T12:44:53.373Z]  OS/Arch:           linux/amd64
[2021-04-01T12:44:53.373Z]  Context:           default
[2021-04-01T12:44:53.373Z]  Experimental:      true
[2021-04-01T12:44:53.373Z] 
[2021-04-01T12:44:53.373Z] Server: Docker Engine - Community
[2021-04-01T12:44:53.373Z]  Engine:
[2021-04-01T12:44:53.373Z]   Version:          20.10.3
[2021-04-01T12:44:53.373Z]   API version:      1.41 (minimum version 1.12)
[2021-04-01T12:44:53.373Z]   Go version:       go1.13.15
[2021-04-01T12:44:53.373Z]   Git commit:       46229ca
[2021-04-01T12:44:53.373Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-04-01T12:44:53.373Z]   OS/Arch:          linux/amd64
[2021-04-01T12:44:53.373Z]   Experimental:     false
[2021-04-01T12:44:53.373Z]  containerd:
[2021-04-01T12:44:53.373Z]   Version:          1.4.4
[2021-04-01T12:44:53.373Z]   GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
[2021-04-01T12:44:53.373Z]  runc:
[2021-04-01T12:44:53.373Z]   Version:          1.0.0-rc93
[2021-04-01T12:44:53.373Z]   GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
[2021-04-01T12:44:53.373Z]  docker-init:
[2021-04-01T12:44:53.373Z]   Version:          0.19.0
[2021-04-01T12:44:53.373Z]   GitCommit:        de40ad0
[2021-04-01T12:44:53.373Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-04-01T12:44:56.000Z] Change permissions with write access of all files inside the specific folder
[2021-04-01T12:44:56.965Z] Running in /var/lib/jenkins/workspace/PR-24882-3-a66d6330-677a-4734-a360-f724286671f4/src/github.com/elastic/beats/build
[2021-04-01T12:44:57.270Z] + rm -rf ve
[2021-04-01T12:44:57.270Z] + find . -type d -name vendor -exec rm -r {} ;
[2021-04-01T12:44:57.742Z] + python .ci/scripts/pre_archive_test.py
[2021-04-01T12:45:12.635Z] Copy ./x-pack/heartbeat/build into build/x-pack/heartbeat/build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/heartbeat/build/golang-crossbuild into build/x-pack/heartbeat/build/golang-crossbuild
[2021-04-01T12:45:12.635Z] Copy ./x-pack/metricbeat/build into build/x-pack/metricbeat/build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/metricbeat/build/package/metricbeat/metricbeat-linux-amd64.docker/docker-build into build/x-pack/metricbeat/build/package/metricbeat/metricbeat-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/metricbeat/build/package/metricbeat-ubi8/metricbeat-linux-amd64.docker/docker-build into build/x-pack/metricbeat/build/package/metricbeat-ubi8/metricbeat-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/metricbeat/build/golang-crossbuild into build/x-pack/metricbeat/build/golang-crossbuild
[2021-04-01T12:45:12.635Z] Copy ./x-pack/filebeat/build into build/x-pack/filebeat/build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/filebeat/build/package/filebeat/filebeat-linux-amd64.docker/docker-build into build/x-pack/filebeat/build/package/filebeat/filebeat-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/filebeat/build/package/filebeat-ubi8/filebeat-linux-amd64.docker/docker-build into build/x-pack/filebeat/build/package/filebeat-ubi8/filebeat-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/filebeat/build/golang-crossbuild into build/x-pack/filebeat/build/golang-crossbuild
[2021-04-01T12:45:12.635Z] Copy ./x-pack/elastic-agent/build into build/x-pack/elastic-agent/build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build
[2021-04-01T12:45:12.635Z] Copy ./x-pack/elastic-agent/build/golang-crossbuild into build/x-pack/elastic-agent/build/golang-crossbuild
[2021-04-01T12:45:12.653Z] Running in /var/lib/jenkins/workspace/PR-24882-3-a66d6330-677a-4734-a360-f724286671f4/src/github.com/elastic/beats/build
[2021-04-01T12:45:12.671Z] Recording test results
[2021-04-01T12:45:15.671Z] None of the test reports contained any result
[2021-04-01T12:45:15.682Z] [Checks API] No suitable checks publisher found.
[2021-04-01T12:45:16.049Z] + go clean -modcache
[2021-04-01T12:45:20.678Z] Cleaning up /var/lib/jenkins/workspace/PR-24882-3-a66d6330-677a-4734-a360-f724286671f4
[2021-04-01T12:45:20.678Z] Client: Docker Engine - Community
[2021-04-01T12:45:20.678Z]  Version:           20.10.3
[2021-04-01T12:45:20.678Z]  API version:       1.41
[2021-04-01T12:45:20.678Z]  Go version:        go1.13.15
[2021-04-01T12:45:20.678Z]  Git commit:        48d30b5
[2021-04-01T12:45:20.678Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-04-01T12:45:20.678Z]  OS/Arch:           linux/amd64
[2021-04-01T12:45:20.678Z]  Context:           default
[2021-04-01T12:45:20.678Z]  Experimental:      true
[2021-04-01T12:45:20.678Z] 
[2021-04-01T12:45:20.678Z] Server: Docker Engine - Community
[2021-04-01T12:45:20.678Z]  Engine:
[2021-04-01T12:45:20.678Z]   Version:          20.10.3
[2021-04-01T12:45:20.678Z]   API version:      1.41 (minimum version 1.12)
[2021-04-01T12:45:20.678Z]   Go version:       go1.13.15
[2021-04-01T12:45:20.678Z]   Git commit:       46229ca
[2021-04-01T12:45:20.678Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-04-01T12:45:20.678Z]   OS/Arch:          linux/amd64
[2021-04-01T12:45:20.678Z]   Experimental:     false
[2021-04-01T12:45:20.678Z]  containerd:
[2021-04-01T12:45:20.678Z]   Version:          1.4.4
[2021-04-01T12:45:20.678Z]   GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
[2021-04-01T12:45:20.679Z]  runc:
[2021-04-01T12:45:20.679Z]   Version:          1.0.0-rc93
[2021-04-01T12:45:20.679Z]   GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
[2021-04-01T12:45:20.679Z]  docker-init:
[2021-04-01T12:45:20.679Z]   Version:          0.19.0
[2021-04-01T12:45:20.679Z]   GitCommit:        de40ad0
[2021-04-01T12:45:20.679Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-04-01T12:46:28.425Z] Change permissions with write access of all files inside the specific folder
[2021-04-01T12:46:28.715Z] Running in /var/lib/jenkins/workspace/PR-24882-3-a66d6330-677a-4734-a360-f724286671f4
[2021-04-01T12:46:35.191Z] Stage "Packaging" skipped due to earlier failure(s)
[2021-04-01T12:46:35.273Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-24882/src/github.com/elastic/beats
[2021-04-01T12:46:55.439Z] Still waiting to schedule task
[2021-04-01T12:46:55.440Z] Waiting for next available executor on ‘master||metal||linux’
[2021-04-01T12:47:42.802Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-24882
[2021-04-01T12:47:42.862Z] [INFO] getVaultSecret: Getting secrets
[2021-04-01T12:47:42.964Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-04-01T12:47:43.840Z] + chmod 755 generate-build-data.sh
[2021-04-01T12:47:43.840Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24882/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24882/runs/3 FAILURE 4509537
[2021-04-01T12:47:44.390Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24882/runs/3/steps/?limit=10000 -o steps-info.json
[2021-04-01T12:47:52.414Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24882/runs/3/tests/?status=FAILED -o tests-errors.json

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 1
Passed 46398
Skipped 5174
Total 51573

Genuine test errors 1

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Build&Test / x-pack/elastic-agent-windows-2008-windows-2008-r2 / TestConfigurableFailed – github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation

@kvch kvch force-pushed the backport_24250_7.x branch from 927ff87 to 19918a5 Compare April 1, 2021 11:30
@kvch kvch merged commit a316dc0 into elastic:7.x Apr 1, 2021
@zube zube Bot removed the [zube]: Done label Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:Elastic-Agent Label for the Agent team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants