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

Cherry-pick #20088 to 7.9: [Ingest Manager] Fixed unzip on older windows #20109

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

ph
Copy link
Contributor

@ph ph commented Jul 21, 2020

Cherry-pick of PR #20088 to 7.9 branch. Original message:

What does this PR do?

We used Expand_Archive function provided by powershell to unpack zip archives on windows. this is not available on PowerShell 4. Strategy is changed not to use powershell functionaliry but rather the approach taken with tars - walking and expanding the archive.

Why is it important?

Supporting windows 8 and server 2012

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.

* unpacking using zip package

* changelog

* fmt

(cherry picked from commit ded2e99)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 21, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 21, 2020
@ph ph requested a review from blakerouse July 21, 2020 18:28
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 21, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20109 updated]

  • Start Time: 2020-07-27T15:48:32.586+0000

  • Duration: 39 min 33 sec

Steps errors

Expand to view the steps failures

  • Name: Mage build test
    • Description: mage build test

    • Duration: 11 min 1 sec

    • Start Time: 2020-07-27T16:13:31.531+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-27T16:26:30.493Z] Recording test results
[2020-07-27T16:26:30.547Z] None of the test reports contained any result
[2020-07-27T16:26:30.605Z] Stashed 0 file(s)
[2020-07-27T16:26:30.660Z] Archiving artifacts
[2020-07-27T16:26:30.764Z] ‘**/build/TEST*.out’ doesn’t match anything: ‘**’ exists but not ‘**/build/TEST*.out’
[2020-07-27T16:26:30.764Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-07-27T16:26:31.554Z] + python .ci/scripts/search_system_tests.py
[2020-07-27T16:26:31.758Z] [INFO] system-tests=''. If no empty then let's create a tarball
[2020-07-27T16:26:32.584Z] + .ci/scripts/report-codecov.sh auditbeat filebeat heartbeat journalbeat libbeat metricbeat packetbeat winlogbeat
[2020-07-27T16:26:32.584Z] + CODECOV_URL=https://codecov.io/bash
[2020-07-27T16:26:32.584Z] + '[' -e /usr/local/bin/bash_standard_lib.sh ']'
[2020-07-27T16:26:32.584Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f auditbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f filebeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f heartbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f journalbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f libbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f metricbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f packetbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:33.032Z] + for i in '"$@"'
[2020-07-27T16:26:33.032Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-27T16:26:33.032Z] + '[' -f winlogbeat/build/coverage/full.cov ']'
[2020-07-27T16:26:34.659Z] Post stage
[2020-07-27T16:26:34.668Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats
[2020-07-27T16:26:35.505Z] Starting "default"...
[2020-07-27T16:26:35.505Z] Machine "default" is already running.
[2020-07-27T16:26:35.955Z] Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.101:2376": dial tcp 192.168.99.101:2376: connect: connection refused
[2020-07-27T16:26:35.955Z] You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
[2020-07-27T16:26:35.955Z] Be advised that this will trigger a Docker daemon restart which might stop running containers.
[2020-07-27T16:26:35.955Z] 
[2020-07-27T16:26:35.955Z] Client: Docker Engine - Community
[2020-07-27T16:26:35.955Z]  Version:           19.03.1
[2020-07-27T16:26:35.956Z]  API version:       1.40
[2020-07-27T16:26:35.956Z]  Go version:        go1.12.5
[2020-07-27T16:26:35.956Z]  Git commit:        74b1e89
[2020-07-27T16:26:35.956Z]  Built:             Thu Jul 25 21:18:17 2019
[2020-07-27T16:26:35.956Z]  OS/Arch:           darwin/amd64
[2020-07-27T16:26:35.956Z]  Experimental:      false
[2020-07-27T16:26:35.956Z] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2020-07-27T16:26:35.956Z] It requires Docker daemon to be installed and running
[2020-07-27T16:26:44.147Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats
[2020-07-27T16:26:44.461Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-27T16:26:44.473Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats/Lint
[2020-07-27T16:26:44.557Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-27T16:26:44.633Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-27T16:26:44.715Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-07-27T16:26:45.087Z] + cat
[2020-07-27T16:26:45.087Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-27T16:26:45.087Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-27T16:26:51.688Z] runbld>>> runbld started
[2020-07-27T16:26:51.688Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-27T16:26:53.602Z] runbld>>> The following profiles matched the job 'Beats/beats/PR-20109' in order of occurrence in the config (last value wins).
[2020-07-27T16:26:54.547Z] runbld>>> Debug logging enabled.
[2020-07-27T16:26:54.547Z] runbld>>> Storing result
[2020-07-27T16:26:54.807Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-27T16:26:54.807Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200727162654-3843C845
[2020-07-27T16:26:54.807Z] runbld>>> Adding system facts.
[2020-07-27T16:26:55.762Z] runbld>>> Adding vcs info for the latest commit:  6dfa158b585b7f22bc31b03c94c0c980de5b7444
[2020-07-27T16:26:55.762Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-27T16:26:55.762Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-27T16:26:56.028Z] Processing JUnit reports with runbld...
[2020-07-27T16:26:56.028Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-27T16:26:56.289Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-27T16:26:56.289Z] runbld>>> DURATION: 31ms
[2020-07-27T16:26:56.289Z] runbld>>> STDOUT: 40 bytes
[2020-07-27T16:26:56.289Z] runbld>>> STDERR: 49 bytes
[2020-07-27T16:26:56.289Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-27T16:26:56.289Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats
[2020-07-27T16:26:57.229Z] runbld>>> Storing build metadata: 
[2020-07-27T16:26:57.229Z] runbld>>> Adding test report.
[2020-07-27T16:26:57.229Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20109/src/github.com/elastic/beats
[2020-07-27T16:26:58.171Z] runbld>>> Found 0 test output files
[2020-07-27T16:26:58.171Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 0 Skipped: 0
[2020-07-27T16:26:58.431Z] runbld>>> Storing result
[2020-07-27T16:26:58.431Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-27T16:26:58.431Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200727162654-3843C845
[2020-07-27T16:26:58.691Z] runbld>>> Email notification disabled by environment variable.
[2020-07-27T16:26:58.691Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-27T16:27:04.299Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20109
[2020-07-27T16:27:04.450Z] [INFO] getVaultSecret: Getting secrets
[2020-07-27T16:27:04.568Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-27T16:27:05.948Z] + chmod 755 generate-build-data.sh
[2020-07-27T16:27:05.948Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20109/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20109/runs/2 FAILURE 2313098
[2020-07-27T16:27:05.948Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20109/runs/2/steps/?limit=10000 -o steps-info.json
[2020-07-27T16:27:06.859Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20109/runs/2/tests/?status=FAILED -o tests-errors.json
[2020-07-27T16:27:06.859Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20109/runs/2/log/ -o pipeline-log.txt

Copy link
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

backport looks good

@ph ph merged commit 702d5bf into elastic:7.9 Jul 27, 2020
v1v added a commit to v1v/beats that referenced this pull request Jul 29, 2020
* upstream/7.9: (32 commits)
  feat(ci): support storing artifacts for PRs in separate dirs (elastic#20282) (elastic#20301)
  Cisco ASA: Fix message 106100 (elastic#20245) (elastic#20277)
  [CI] Change upstream reference (elastic#20296) (elastic#20297)
  [docs] Fix Windows download link for agent (elastic#20258) (elastic#20290)
  Cherry-pick to 7.9: [docs] Rename release highlights to what's new (elastic#20255) (elastic#20285)
  Elastic agent on k8s (elastic#19727) (elastic#20262)
  [Filebeat Module] Defender ATP - Adding dashboard (elastic#20058) (elastic#20093)
  fix: use a fixed worker type for tests (elastic#20130) (elastic#20247)
  [Elastic Agent] Fix Windows powershell install service script (elastic#20203) (elastic#20252)
  [Ingest Manager] Fixed unzip on older windows  (elastic#20088) (elastic#20109)
  adding possibility to override content-type checks, it was breaking certain webhooks that is not able to set content-headers at all. Still defaults to application/json (elastic#20232) (elastic#20237)
  [Filebeat][Gsuite] Make GSuite docs more clear (elastic#19981) (elastic#20067)
  Increase index.max_docvalue_fields_search to 200 (elastic#20218) (elastic#20221)
  Call host parser only once when building light metricsets (elastic#20149) (elastic#20190)
  [Metricbeat] Use MySQL Host Parser in Query metricset (elastic#20191) (elastic#20212)
  [Filebeat] Ignore cylance.protect timestamps while testing (elastic#20207) (elastic#20217)
  [libbeat] Fix write error in ensureWriter.Write (elastic#20112) (elastic#20145)
  Cherry-pick elastic#20127 to 7.9: Fix failing unit tests on windows  (elastic#20180)
  Remove f5/firepass rsa2elk fileset (elastic#20160) (elastic#20206)
  Cherry-pick elastic#20138 to 7.9: [Filebeat] Update crowdstrike module (elastic#20177)
  ...
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…c#20109)

* unpacking using zip package

* changelog

* fmt

(cherry picked from commit 54ef816)

Co-authored-by: Michal Pristas <michal.pristas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants