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

[7.x](backport #27775) [Filebeat] Accept syslog dates with leading 0 #27783

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 7, 2021

This is an automatic backport of pull request #27775 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

This makes the RFC3164 parser accept dates with a leading 0. This makes the parser a little more liberal than the spec.

From RFC3164 https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.2

    If the day of the month is less than 10, then it MUST be represented as a space and then the number. For example, the 7th day of August would be represented as "Aug 7", with two spaces between the "g" and the "7".

So now it will accept both `Sep 01` and `Sep  1`.

(cherry picked from commit e66b4e6)
@mergify mergify bot added the backport label Sep 7, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 7, 2021
@botelastic
Copy link

botelastic bot commented Sep 7, 2021

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 7, 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 preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-07T19:43:56.458+0000

  • Duration: 80 min 3 sec

  • Commit: 051e867

Test stats 🧪

Test Results
Failed 1
Passed 14627
Skipped 2326
Total 16954

Trends 🧪

Image of Build Times

Image of Tests

Test errors 1

Expand to view the tests failures

Extended / filebeat-windows-8-windows-8 / test_file_no_permission – filebeat.tests.system.test_crawler.Test
    Expand to view the error details

     PermissionError: [WinError 5] Access is denied: 'C:\\Users\\jenkins\\workspace\\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\\src\\github.com\\elastic\\beats\\filebeat\\build\\system-tests\\run\\test_crawler.Test.test_file_no_permission\\log\\test.log' 
    

    Expand to view the stacktrace

     ..\libbeat\tests\system\beat\beat.py:331: in setUp
        shutil.rmtree(self.working_dir)
    C:\Python38\lib\shutil.py:737: in rmtree
        return _rmtree_unsafe(path, onerror)
    C:\Python38\lib\shutil.py:610: in _rmtree_unsafe
        _rmtree_unsafe(fullname, onerror)
    C:\Python38\lib\shutil.py:615: in _rmtree_unsafe
        onerror(os.unlink, fullname, sys.exc_info())
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    path = 'C:\\Users\\jenkins\\workspace\\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\\src\\github.com\\elastic\\beats\\filebeat\\build\\system-tests\\run\\test_crawler.Test.test_file_no_permission\\log'
    onerror = <function rmtree.<locals>.onerror at 0x000000020E4F81F0>
    
        def _rmtree_unsafe(path, onerror):
            try:
                with os.scandir(path) as scandir_it:
                    entries = list(scandir_it)
            except OSError:
                onerror(os.scandir, path, sys.exc_info())
                entries = []
            for entry in entries:
                fullname = entry.path
                if _rmtree_isdir(entry):
                    try:
                        if entry.is_symlink():
                            # This can only happen if someone replaces
                            # a directory with a symlink after the call to
                            # os.scandir or entry.is_dir above.
                            raise OSError("Cannot call rmtree on a symbolic link")
                    except OSError:
                        onerror(os.path.islink, fullname, sys.exc_info())
                        continue
                    _rmtree_unsafe(fullname, onerror)
                else:
                    try:
    >                   os.unlink(fullname)
    E                   PermissionError: [WinError 5] Access is denied: 'C:\\Users\\jenkins\\workspace\\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\\src\\github.com\\elastic\\beats\\filebeat\\build\\system-tests\\run\\test_crawler.Test.test_file_no_permission\\log\\test.log'
    
    C:\Python38\lib\shutil.py:613: PermissionError 
    

Steps errors 6

Expand to view the steps failures

filebeat-goIntegTest - mage goIntegTest
  • Took 15 min 37 sec . View more details on here
  • Description: mage goIntegTest
filebeat-windows-8-windows-8 - mage build unitTest
  • Took 5 min 24 sec . View more details on here
  • Description: mage build unitTest
filebeat-windows-8-windows-8 - mage build unitTest
  • Took 4 min 41 sec . View more details on here
  • Description: mage build unitTest
filebeat-windows-8-windows-8 - mage build unitTest
  • Took 4 min 39 sec . View more details on here
  • Description: mage build unitTest
gsutil -m -q cp -a public-read test-build-artifacts-filebeat-windows-8-windows-8-tgz gs://beats-ci-t
  • Took 0 min 3 sec . View more details on here
  • Description: @echo off gsutil -m -q cp -a public-read test-build-artifacts-filebeat-windows-8-windows-8-tgz gs://beats-ci-temp/Beats/beats/PR-27783-2
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-09-07T21:02:08.562Z] Copy .\filebeat\build into build\filebeat\build
[2021-09-07T21:02:08.562Z] Copy .\filebeat\null\build into build\filebeat\null\build
[2021-09-07T21:02:08.574Z] Running in C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build
[2021-09-07T21:02:08.592Z] Recording test results
[2021-09-07T21:02:11.121Z] [Checks API] No suitable checks publisher found.
[2021-09-07T21:02:11.459Z] 
[2021-09-07T21:02:11.459Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build>tar --version  1>NUL 
[2021-09-07T21:02:11.460Z] 'tar' is not recognized as an internal or external command,
[2021-09-07T21:02:11.460Z] operable program or batch file.
[2021-09-07T21:02:11.789Z] 
[2021-09-07T21:02:11.789Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build>7z   1>NUL 
[2021-09-07T21:02:12.102Z] 
[2021-09-07T21:02:12.103Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build>7z a -ttar -so -an .   | 7z a -si test-build-artifacts-filebeat-windows-8-windows-8-tgz 
[2021-09-07T21:02:20.219Z] 
[2021-09-07T21:02:20.219Z] 7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
[2021-09-07T21:02:20.219Z] 
[2021-09-07T21:02:20.219Z] Creating archive: test-build-artifacts-filebeat-windows-8-windows-8-tgz.7z
[2021-09-07T21:02:20.219Z] 
[2021-09-07T21:02:20.219Z] Add new data to archive: 1 file
[2021-09-07T21:02:20.219Z] 
[2021-09-07T21:02:20.219Z] 
[2021-09-07T21:02:20.219Z] Files read from disk: 1
[2021-09-07T21:02:20.219Z] Archive size: 2319349 bytes (2265 KiB)
[2021-09-07T21:02:20.219Z] Everything is Ok
[2021-09-07T21:02:20.612Z] 
[2021-09-07T21:02:20.612Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build>gsutil --version  1>NUL 
[2021-09-07T21:02:20.612Z] 'gsutil' is not recognized as an internal or external command,
[2021-09-07T21:02:20.612Z] operable program or batch file.
[2021-09-07T21:02:20.711Z] Running in C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build@tmp
[2021-09-07T21:02:21.030Z] 
[2021-09-07T21:02:21.030Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build@tmp>wget --version  1>NUL 
[2021-09-07T21:02:21.361Z] 
[2021-09-07T21:02:21.361Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build@tmp>wget -q -O gsutil.zip https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-319.0.0-windows-x86_64-bundled-python.zip 
[2021-09-07T21:02:22.923Z] tests\system\test_http_endpoint.py ...................                   [ 14%]
[2021-09-07T21:02:23.194Z] tests\system\test_xpack_modules.py sssssssssssssssssssssssssssssssssssss [ 36%]
[2021-09-07T21:02:23.465Z] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 79%]
[2021-09-07T21:02:23.465Z] ssssssssssssssssssssssssssssssssss                                       [100%]
[2021-09-07T21:02:23.465Z] 
[2021-09-07T21:02:23.465Z] - generated xml file: C:\Users\jenkins\workspace\PR-27783-2-53ac6bcd-0d36-4ffd-9bd7-d977b24de564\src\github.com\elastic\beats\x-pack\filebeat\build\TEST-python-unit.xml -
[2021-09-07T21:02:23.466Z] ============================ slowest 20 durations =============================
[2021-09-07T21:02:23.466Z] 4.18s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_index_pattern_migration
[2021-09-07T21:02:23.466Z] 4.08s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_index_pattern
[2021-09-07T21:02:23.466Z] 3.51s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_template
[2021-09-07T21:02:23.466Z] 2.41s call     x-pack/filebeat/tests/system/test_filebeat_xpack.py::FilebeatXPackTest::test_export_config
[2021-09-07T21:02:23.466Z] 2.23s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_preserve_original_event
[2021-09-07T21:02:23.466Z] 2.21s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_malformed_json
[2021-09-07T21:02:23.466Z] 2.17s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_request
[2021-09-07T21:02:23.466Z] 2.16s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_request_ndjson
[2021-09-07T21:02:23.466Z] 2.08s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_request_multiple_documents
[2021-09-07T21:02:23.466Z] 2.06s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_include_headers_single_value
[2021-09-07T21:02:23.466Z] 2.04s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_get_request
[2021-09-07T21:02:23.466Z] 2.04s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_include_headers_without_header
[2021-09-07T21:02:23.466Z] 2.03s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_empty_body
[2021-09-07T21:02:23.466Z] 2.02s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_include_headers_empty_value
[2021-09-07T21:02:23.466Z] 2.00s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_correct_auth_header
[2021-09-07T21:02:23.466Z] 1.97s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_content_header
[2021-09-07T21:02:23.466Z] 1.97s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_invalid_hmac
[2021-09-07T21:02:23.466Z] 1.96s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_auth_value
[2021-09-07T21:02:23.466Z] 1.95s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_wrong_auth_header
[2021-09-07T21:02:23.466Z] 1.93s call     x-pack/filebeat/tests/system/test_http_endpoint.py::Test::test_http_endpoint_include_headers_not_canonical_config
[2021-09-07T21:02:23.466Z] ====================== 24 passed, 143 skipped in 54.73s =======================
[2021-09-07T21:02:23.729Z] >> python test: Unit Testing Complete
[2021-09-07T21:02:24.112Z] 
[2021-09-07T21:02:24.112Z] C:\Users\jenkins\workspace\PR-27783-2-53ac6bcd-0d36-4ffd-9bd7-d977b24de564\src\github.com\elastic\beats>FOR / %d IN ("ve") DO @IF EXIST "%d" rmdir /s /q "%d" 
[2021-09-07T21:02:25.150Z] Extracting from C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build@tmp\gsutil.zip
[2021-09-07T21:02:26.987Z] 
[2021-09-07T21:02:26.987Z] C:\Users\jenkins\workspace\PR-27783-2-53ac6bcd-0d36-4ffd-9bd7-d977b24de564\src\github.com\elastic\beats>python .ci/scripts/pre_archive_test.py 
[2021-09-07T21:02:27.933Z] Copy .\x-pack\filebeat\build into build\x-pack\filebeat\build
[2021-09-07T21:02:27.933Z] Copy .\x-pack\filebeat\null\build into build\x-pack\filebeat\null\build
[2021-09-07T21:02:27.948Z] Running in C:\Users\jenkins\workspace\PR-27783-2-53ac6bcd-0d36-4ffd-9bd7-d977b24de564\src\github.com\elastic\beats\build
[2021-09-07T21:02:27.966Z] Recording test results
[2021-09-07T21:02:30.408Z] [Checks API] No suitable checks publisher found.
[2021-09-07T21:02:30.775Z] 
[2021-09-07T21:02:30.775Z] C:\Users\jenkins\workspace\PR-27783-2-53ac6bcd-0d36-4ffd-9bd7-d977b24de564\src\github.com\elastic\beats>go clean -modcache 
[2021-09-07T21:02:37.763Z] Extracted: 15728 files
[2021-09-07T21:02:38.348Z] Masking supported pattern matches of %FILE_CREDENTIAL%
[2021-09-07T21:02:39.154Z] 
[2021-09-07T21:02:39.155Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats\build>gcloud auth activate-service-account --key-file **** 
[2021-09-07T21:02:42.437Z] Activated service account credentials for: [[email protected]]
[2021-09-07T21:02:46.036Z] CommandException: No URLs matched: test-build-artifacts-filebeat-windows-8-windows-8-tgz
[2021-09-07T21:02:46.036Z] CommandException: 1 file/object could not be transferred.
[2021-09-07T21:02:46.140Z] ERROR: script returned exit code 1
[2021-09-07T21:02:46.470Z] 
[2021-09-07T21:02:46.470Z] C:\Users\jenkins\workspace\PR-27783-2-6989f1d3-1c97-4ed9-bfc0-5a179dedf700\src\github.com\elastic\beats>go clean -modcache 
[2021-09-07T21:03:34.272Z] Failed in branch filebeat-windows-8-windows-8
[2021-09-07T21:03:53.732Z] + gsutil --version
[2021-09-07T21:03:55.159Z] Masking supported pattern matches of $FILE_CREDENTIAL
[2021-09-07T21:03:55.476Z] + gcloud auth activate-service-account --key-file ****
[2021-09-07T21:03:56.047Z] Activated service account credentials for: [[email protected]]
[2021-09-07T21:03:56.368Z] + gsutil -m -q cp eC1wYWNrL2ZpbGViZWF0LXdpbmRvd3MtMTAtd2luZG93cy0xMDA1MWU4Njc0NGNjNTZkNWUxNzhmZWJlNDQ3ZWUxMGE2NTZiYmRiNGM gs://beats-ci-temp/ci/cache/
[2021-09-07T21:03:57.864Z] Stage "Packaging" skipped due to earlier failure(s)
[2021-09-07T21:03:57.901Z] Stage "Packaging-Pipeline" skipped due to earlier failure(s)
[2021-09-07T21:03:57.960Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-27783/src/github.com/elastic/beats
[2021-09-07T21:03:59.007Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-27783
[2021-09-07T21:03:59.052Z] [INFO] getVaultSecret: Getting secrets
[2021-09-07T21:03:59.093Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-09-07T21:03:59.845Z] + chmod 755 generate-build-data.sh
[2021-09-07T21:03:59.845Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-27783/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-27783/runs/2 FAILURE 4803119
[2021-09-07T21:03:59.845Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-27783/runs/2/steps/?limit=10000 -o steps-info.json
[2021-09-07T21:04:02.328Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-27783/runs/2/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 14627
Skipped 2326
Total 16954

Genuine test errors 1

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

  • Name: Extended / filebeat-windows-8-windows-8 / test_file_no_permission – filebeat.tests.system.test_crawler.Test

@andrewkroh
Copy link
Member

run tests

@andrewkroh andrewkroh merged commit c0e590b into 7.x Sep 9, 2021
@mergify mergify bot deleted the mergify/bp/7.x/pr-27775 branch September 9, 2021 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants