Skip to content

Conversation

@v1v
Copy link
Member

@v1v v1v commented May 12, 2020

What does this PR do?

Use folder of the module to filter what files should be archived and junit shown.

23:56:35  Caused: java.lang.InterruptedException: java.lang.InterruptedException: no matches found within 10000
23:56:35      at hudson.FilePath.act(FilePath.java:1071)
23:56:35      at hudson.FilePath.act(FilePath.java:1058)
23:56:35      at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
23:56:35      at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
23:56:35      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
23:56:35      at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
23:56:35      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
23:56:35      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
23:56:35      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
23:56:35      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
23:56:35      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
23:56:35      at java.lang.Thread.run(Thread.java:748)
23:56:35  No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?

Why is it important?

To avoid issues when reaching the search of over 10000 files. See JENKINS-51913

@v1v v1v self-assigned this May 12, 2020
@v1v v1v added the automation label May 12, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 12, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 12, 2020

❕ Build Aborted

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

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-05-13T15:24:32.766+0000

  • Duration: 127 min 18 sec (7637570)

Test stats 🧪

Test Results
Failed 0
Passed 3556
Skipped 670
Total 4226

Steps errors

Expand to view the steps failures

  • Name: Archive JUnit-formatted test results

    • Description: [2020-05-13T17:30:33.707Z] Recording test results
      [2020-05-13T17:30:35.126Z] null

    • Result: FAILURE

    • Duration: 0 min 3 sec

    • Start Time: 2020-05-13T17:30:33.659+0000

    • log

  • Name: Archive JUnit-formatted test results

    • Description: [2020-05-13T17:30:33.682Z] Recording test results
      [2020-05-13T17:30:35.118Z] null

    • Result: FAILURE

    • Duration: 0 min 3 sec

    • Start Time: 2020-05-13T17:30:33.585+0000

    • log

  • Name: Archive JUnit-formatted test results

    • Description: [2020-05-13T17:30:33.608Z] Recording test results
      [2020-05-13T17:30:35.114Z] null

    • Result: FAILURE

    • Duration: 0 min 3 sec

    • Start Time: 2020-05-13T17:30:33.541+0000

    • log

  • Name: Archive JUnit-formatted test results

    • Description: [2020-05-13T17:30:33.550Z] Recording test results
      [2020-05-13T17:30:35.023Z] null

    • Result: FAILURE

    • Duration: 0 min 3 sec

    • Start Time: 2020-05-13T17:30:33.504+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-05-13T17:30:50.348Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.348Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-13T17:30:50.348Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + curl -sSLo codecov https://codecov.io/bash
[2020-05-13T17:30:50.634Z] + FILE=auditbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-13T17:30:50.634Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-13T17:30:50.634Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + curl -sSLo codecov https://codecov.io/bash
[2020-05-13T17:30:51.050Z] + FILE=auditbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.050Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-13T17:30:51.050Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-13T17:30:51.745Z] [INFO] makeTarget(context: Generators Beat Linux, target: -C generator/_templates/beat test, archive: true, clean: true, directory: generator/_templates/beat)
[2020-05-13T17:30:52.252Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-13T17:30:55.297Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-13T17:30:58.068Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-13T17:31:00.943Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-13T17:31:01.105Z] Stage "Auditbeat crosscompile" skipped due to earlier failure(s)
[2020-05-13T17:31:01.308Z] Stage "Libbeat crosscompile" skipped due to earlier failure(s)
[2020-05-13T17:31:02.602Z] Stage "Auditbeat Mac OS X" skipped due to earlier failure(s)
[2020-05-13T17:31:02.645Z] Stage "Libbeat stress-tests" skipped due to earlier failure(s)
[2020-05-13T17:31:02.899Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-13T17:31:03.359Z] Stage "Auditbeat Windows" skipped due to earlier failure(s)
[2020-05-13T17:31:04.468Z] + cat
[2020-05-13T17:31:04.468Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-13T17:31:04.468Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-13T17:31:11.966Z] runbld>>> runbld started
[2020-05-13T17:31:11.966Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-13T17:31:13.179Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18462' in order of occurrence in the config (last value wins).
[2020-05-13T17:31:14.485Z] runbld>>> Debug logging enabled.
[2020-05-13T17:31:14.485Z] runbld>>> Storing result
[2020-05-13T17:31:14.485Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-13T17:31:14.485Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200513173114-9986950F
[2020-05-13T17:31:14.485Z] runbld>>> Adding system facts.
[2020-05-13T17:31:15.693Z] runbld>>> Adding vcs info for the latest commit:  ab9222c7f84f49ac41ce5ac468aac9353e0f94aa
[2020-05-13T17:31:15.693Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-13T17:31:15.693Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-13T17:31:15.693Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-13T17:31:15.693Z] Processing JUnit reports with runbld...
[2020-05-13T17:31:16.076Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-13T17:31:16.076Z] runbld>>> DURATION: 14ms
[2020-05-13T17:31:16.076Z] runbld>>> STDOUT: 40 bytes
[2020-05-13T17:31:16.076Z] runbld>>> STDERR: 49 bytes
[2020-05-13T17:31:16.076Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-13T17:31:16.076Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats
[2020-05-13T17:31:17.474Z] runbld>>> Storing build metadata: 
[2020-05-13T17:31:17.474Z] runbld>>> Adding test report.
[2020-05-13T17:31:17.474Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462/src/github.com/elastic/beats
[2020-05-13T17:31:18.805Z] runbld>>> Found 5 test output files
[2020-05-13T17:31:18.805Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 939 Skipped: 133
[2020-05-13T17:31:19.140Z] runbld>>> Storing result
[2020-05-13T17:31:19.140Z] runbld>>> FAILURES: 0
[2020-05-13T17:31:19.541Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-13T17:31:19.541Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200513173114-9986950F
[2020-05-13T17:31:19.542Z] runbld>>> Email notification disabled by environment variable.
[2020-05-13T17:31:19.542Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-13T17:31:48.022Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18462
[2020-05-13T17:31:48.461Z] [INFO] getVaultSecret: Getting secrets
[2020-05-13T17:31:48.844Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-13T17:31:50.656Z] + chmod 755 generate-build-data.sh
[2020-05-13T17:31:50.656Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18462/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18462/runs/10 ABORTED 7637570
[2020-05-13T17:31:51.207Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18462/runs/10/steps/?limit=10000 -o steps-info.json
[2020-05-13T17:32:05.970Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18462/runs/10/tests/?status=FAILED -o tests-errors.json

Jenkinsfile Outdated
// For such, the directory is the one when using the target -C <directory>
// Otherwise, it will use the ** glob pattern
def directory = '**'
if (target.contains('-C ')) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Target format

flags        -C folder/subfolder      barFoo
^---^        ^-----------------^      ^----^
flags             Directory           target

For instance:

target: "-C metricbeat crosscompile"
  Directory=metricbeat
  Target=crosscompile

target: "STRESS_TEST_OPTIONS='-timeout=20m -race -v -parallel 1' -C libbeat stress-tests"
  Directory=libbeat
  Target=stress-tests

target: "-C generator/_templates/beat test"
  Directory=generator/_templates/beat
  Target=test

@andresrc andresrc added the Team:Automation Label for the Observability productivity team label May 13, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 13, 2020
@v1v
Copy link
Member Author

v1v commented May 19, 2020

I'm a bit skeptical with this approach :(

Just thinking if we could add a wrapper to the make/mage to collect the tests to the a temporary folder in the root folder ....

@kuisathaverat , what do you think? This proposal requires to change the signature and pass the folder where the project runs, aka to parse -C <folder> but I don't like much this particular approach

@kuisathaverat
Copy link
Contributor

kuisathaverat commented May 20, 2020

it is too complicated to avoid an issue you can workaround by changing the catchError

catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
  junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: "**\\build\\TEST*.xml") junitAndStore(allowEmptyResults: true, keepLongStdio: true, testResults: "${directory}\\build\\TEST*.xml")
  archiveArtifacts(allowEmptyArchive: true, artifacts: '**\\build\\TEST*.out') archiveArtifacts(allowEmptyArchive: true, artifacts: "${directory}\\build\\TEST*.out")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Team:Automation Label for the Observability productivity team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants