-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Migrate scripts to python 3 #14798
Migrate scripts to python 3 #14798
Commits on Nov 26, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 34a0df8 - Browse repository at this point
Copy the full SHA 34a0df8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fa5430 - Browse repository at this point
Copy the full SHA 5fa5430View commit details -
Configuration menu - View commit details
-
Copy full SHA for c93c97f - Browse repository at this point
Copy the full SHA c93c97fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f05d17e - Browse repository at this point
Copy the full SHA f05d17eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f77869d - Browse repository at this point
Copy the full SHA f77869dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce3dcc8 - Browse repository at this point
Copy the full SHA ce3dcc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73fca9d - Browse repository at this point
Copy the full SHA 73fca9dView commit details
Commits on Nov 28, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 933f1af - Browse repository at this point
Copy the full SHA 933f1afView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7b67d1 - Browse repository at this point
Copy the full SHA c7b67d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f0aefd - Browse repository at this point
Copy the full SHA 3f0aefdView commit details -
Revert "Set version of python for travis"
This reverts commit 933f1af.
Configuration menu - View commit details
-
Copy full SHA for 5cc56aa - Browse repository at this point
Copy the full SHA 5cc56aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d46ac2c - Browse repository at this point
Copy the full SHA d46ac2cView commit details
Commits on Nov 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 4d0695a - Browse repository at this point
Copy the full SHA 4d0695aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 713c75f - Browse repository at this point
Copy the full SHA 713c75fView commit details
Commits on Dec 2, 2019
-
Configuration menu - View commit details
-
Copy full SHA for dd5ce17 - Browse repository at this point
Copy the full SHA dd5ce17View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca3958e - Browse repository at this point
Copy the full SHA ca3958eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 28ffc35 - Browse repository at this point
Copy the full SHA 28ffc35View commit details
Commits on Dec 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 20e1ecc - Browse repository at this point
Copy the full SHA 20e1eccView commit details -
Make independent python virtualenvs in docker (#14903)
System tests running in docker are using the same virtual environment as the host. If version of python in the virtual environment is not available in the guest, it will use the default in the system, that is so far Python 2.
Configuration menu - View commit details
-
Copy full SHA for 360d5e1 - Browse repository at this point
Copy the full SHA 360d5e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21dd3d3 - Browse repository at this point
Copy the full SHA 21dd3d3View commit details
Commits on Dec 9, 2019
-
Migrate Functionbeat to Python3 (#14901)
fix 'str' does not support the buffer interface
Configuration menu - View commit details
-
Copy full SHA for cf84305 - Browse repository at this point
Copy the full SHA cf84305View commit details -
Configuration menu - View commit details
-
Copy full SHA for e241826 - Browse repository at this point
Copy the full SHA e241826View commit details
Commits on Dec 10, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 8d9ce27 - Browse repository at this point
Copy the full SHA 8d9ce27View commit details
Commits on Dec 13, 2019
-
Configuration menu - View commit details
-
Copy full SHA for ee30315 - Browse repository at this point
Copy the full SHA ee30315View commit details
Commits on Dec 20, 2019
-
Fix make check for python 3 (#15226)
* Run autopep on script/update_golang_x.py to fix make check * Update travis to use Ubuntu Bionic
Configuration menu - View commit details
-
Copy full SHA for b9629f9 - Browse repository at this point
Copy the full SHA b9629f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2a3f84 - Browse repository at this point
Copy the full SHA f2a3f84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66e2dc1 - Browse repository at this point
Copy the full SHA 66e2dc1View commit details
Commits on Jan 15, 2020
-
Listen explicitly on localhost on heartbeat TCP tests (#15583)
Some tests were requiring localhost to resolve to 127.0.0.1, but this is not always the case. In some machines localhost resolve to other local addresses as 127.0.1.1, or to [::1] if ipv4 is not available.
Configuration menu - View commit details
-
Copy full SHA for 3c908d1 - Browse repository at this point
Copy the full SHA 3c908d1View commit details
Commits on Jan 16, 2020
-
Regenerate test certificates to include 127.0.1.1 (#15591)
Localhost in travis resolves to 127.0.1.1, include this IP as alternate name in certificates used for outputs testing.
Configuration menu - View commit details
-
Copy full SHA for dd723d9 - Browse repository at this point
Copy the full SHA dd723d9View commit details
Commits on Jan 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 75ca56a - Browse repository at this point
Copy the full SHA 75ca56aView commit details
Commits on Jan 20, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8ad222f - Browse repository at this point
Copy the full SHA 8ad222fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac9af57 - Browse repository at this point
Copy the full SHA ac9af57View commit details
Commits on Jan 22, 2020
-
Update script shebangs to python3 (#15701)
Use python3 in the shebang for python scripts. python is going to be reserved for python2 in Ubuntu, and PEP394 mentions that python should be used in the shebang line only for scripts that are source compatible with both Python 2 and 3.
Configuration menu - View commit details
-
Copy full SHA for 63c4b1c - Browse repository at this point
Copy the full SHA 63c4b1cView commit details -
Update documented Python version to 3.7 (#15702)
Document python requirement as >= 3.7.
Configuration menu - View commit details
-
Copy full SHA for 2bd5181 - Browse repository at this point
Copy the full SHA 2bd5181View commit details -
Fix python sys.platform check for Linux (#15727)
On Linux, sys.platform doesn’t contain the major version anymore. It is now always ‘linux’, instead of ‘linux2’ or ‘linux3’ depending on the Linux version used to build Python. Replace sys.platform == ‘linux2’ with sys.platform.startswith(‘linux’), or directly sys.platform == ‘linux’ if you don’t need to support older Python versions. Ref: https://docs.python.org/3.3/whatsnew/3.3.html#porting-python-code
Configuration menu - View commit details
-
Copy full SHA for d037668 - Browse repository at this point
Copy the full SHA d037668View commit details -
Read hits.total.value to get number of hits (#15728)
This should fix test_management.py under Python3. An object was being returned but the test was expecting to get a number. The format of the Elasticsearch response changed for the "track_total_hits" enhancement, but this wasn't updated.
Configuration menu - View commit details
-
Copy full SHA for 1ceabf0 - Browse repository at this point
Copy the full SHA 1ceabf0View commit details
Commits on Jan 23, 2020
-
This has a few fixes to python system tests under libbeat/tests/system. assert_docs_written_to_alias had an invalid assertion ever since Elasticsearch changed the format of the hits count to allow for track_total_hits false. Many tests were using this assertion even when not indexing any events so the hit count would always be zero so I removed the assertion from those tests. In other tests I was getting spurious failures because _search was being called before the index was refreshed to allow the documents to be search able. So I added an explicit /_refresh to fix the issue. I changed create_kibana_space to allow a 409 response code so you can run the tests more than once against a Kibana instance. I fixed an assertion on the mode bits of a file since the format of octal numbers is always prefixed with '0o' now. And I fixed the libbeat keystore tests by encoding the secret string to binary before calling os.write. This fixed this error: ``` ====================================================================== ERROR: Add a secret to the store using stdin ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/akroh/go/src/github.com/elastic/beats/libbeat/tests/system/test_cmd_keystore.py", line 130, in test_keystore_add_secret_from_stdin exit_code = self.add_secret("willnotdelete") File "/Users/akroh/go/src/github.com/elastic/beats/libbeat/tests/system/keystore.py", line 29, in add_secret os.write(proc.stdin_write, value) TypeError: a bytes-like object is required, not 'str' ```
Configuration menu - View commit details
-
Copy full SHA for 40bac68 - Browse repository at this point
Copy the full SHA 40bac68View commit details
Commits on Jan 24, 2020
-
Merge remote-tracking branch 'origin/master' into update-python3-fix-…
…auditbeat-and-dashboards
Configuration menu - View commit details
-
Copy full SHA for b09e537 - Browse repository at this point
Copy the full SHA b09e537View commit details -
Use 'python3 -m venv' instead of virtualenv (#15754)
Switch over to `python3 -m venv` instead of `virtualenv`. It's the recommended way to create virtual Python environments in 3.4 and above. https://docs.python.org/3/library/venv.html Remove any direct references to python to always allow a specific python binary or version to be used.
Configuration menu - View commit details
-
Copy full SHA for 81bb7ef - Browse repository at this point
Copy the full SHA 81bb7efView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4e0187 - Browse repository at this point
Copy the full SHA f4e0187View commit details -
Remove docs build from travis (#15816)
It is failing with python 3 and we have another more complete build to test this in Jenkins.
Configuration menu - View commit details
-
Copy full SHA for 01c531c - Browse repository at this point
Copy the full SHA 01c531cView commit details -
Merge remote-tracking branch 'jsoriano/update-python3-fix-auditbeat-a…
…nd-dashboards' into HEAD
Configuration menu - View commit details
-
Copy full SHA for 975abe9 - Browse repository at this point
Copy the full SHA 975abe9View commit details -
Add missing integration_tests check to metricbeat xpack test (#15779)
This test was running with the unit test target and failing.
Configuration menu - View commit details
-
Copy full SHA for 66250f0 - Browse repository at this point
Copy the full SHA 66250f0View commit details
Commits on Jan 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b34d460 - Browse repository at this point
Copy the full SHA b34d460View commit details -
Python3 Windows and Winlogbeat updates (#15831)
* Python3 Windows and Winlogbeat updates This updates the Vagrantfile and addresses a few issues. I installed Python3 on Windows via chocolotey and the python MSI and neither provided a `python3` command so I adjusted the build tooling to use `python` on Windows. Another issue I hit was that under Vagrant with the shared filesystem, `pip` would not install into the virtual environment. It only will install when moving the PYTHON_ENV off of the shared filesystem. So when provisining the Vagrant VM it will now put PYTHON_ENV in C:\beats-python-env. Remember this if you need need to do a completely clean build on Windows+Vagrant. There were some encoding issues I found while reading output files containing unicode. So I modified the libbeat's beat.py to specify `utf_8` encoding when opening output files. I was seeing errors like: ``` ====================================================================== ERROR: eventlogging - UTF-16 characters ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Gopath\src\github.com\elastic\beats\winlogbeat\tests\system\test_eventlogging.py", line 187, in test_utf16_characters evts = self.read_events(config={ File "C:\Gopath\src\github.com\elastic\beats\winlogbeat\tests\system\winlogbeat.py", line 110, in read_events return self.read_output() File "C:\Gopath\src\github.com\elastic\beats\winlogbeat\tests\system\../../../libbeat/tests/system\beat\beat.py", line 260, in read_output for line in f: File "C:\Python38\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 277: character maps to <undefined> ``` I bumped the Pillow version in the pip requirements because the newer version provides a precompiled wheel for Python 3 on Windows. This avoids having to compiling it. I bumped the Docker versions while debugging and just left them at the latest version since nothing broke. I tested Winlogbeat and Metricbeat's `mage pythonUnitTest` on Windows 2019 and all tests passed.
Configuration menu - View commit details
-
Copy full SHA for 7a72c55 - Browse repository at this point
Copy the full SHA 7a72c55View commit details
Commits on Jan 28, 2020
-
Try to fix flakiness of appsearch system tests (#15878)
Use the health check of the service for the docker health check, and check the status code of the response. Print nosetests output on builds.
Configuration menu - View commit details
-
Copy full SHA for cc6d798 - Browse repository at this point
Copy the full SHA cc6d798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32a680c - Browse repository at this point
Copy the full SHA 32a680cView commit details -
Use JSON string for dictionary example (#15898)
Some versions of python cannot guarantee order of dictionaries, so same dictionary can generate different documentation strings. Use a JSON string so its representation doesn't depend on how python encodes it. Also, fix versions in python-env for root directory.
Configuration menu - View commit details
-
Copy full SHA for ae546c7 - Browse repository at this point
Copy the full SHA ae546c7View commit details
Commits on Jan 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c6fdaf0 - Browse repository at this point
Copy the full SHA c6fdaf0View commit details
Commits on Jan 31, 2020
-
Merge remote-tracking branch 'origin/master' into hopefuly-last-updat…
…e-of-python3-branch
Configuration menu - View commit details
-
Copy full SHA for fcd87dc - Browse repository at this point
Copy the full SHA fcd87dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 91f7ea8 - Browse repository at this point
Copy the full SHA 91f7ea8View commit details
Commits on Feb 11, 2020
-
Use mage target instead of nosetests on Windows jenkins CI (#16141)
Replaces use of nosetests with mage wrapper in script for Windows CI workers. Mage manages their own python virtual environments, this is preferred to directly call python commands. Installs python 3 using chocolatey, as it is still not available in Windows CI workers. future was failing to install in Windows, but we don't actually need it anymore, so it is removed.
Configuration menu - View commit details
-
Copy full SHA for 1d2252d - Browse repository at this point
Copy the full SHA 1d2252dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ee61137 - Browse repository at this point
Copy the full SHA ee61137View commit details
Commits on Feb 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for dd503e6 - Browse repository at this point
Copy the full SHA dd503e6View commit details -
Skip monitoring flaky test (#16248)
Skip tests frequently failing in python 3 branch. #16247
Configuration menu - View commit details
-
Copy full SHA for 1d311e4 - Browse repository at this point
Copy the full SHA 1d311e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e24232b - Browse repository at this point
Copy the full SHA e24232bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 87155e8 - Browse repository at this point
Copy the full SHA 87155e8View commit details
Commits on Feb 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for bd6d8cf - Browse repository at this point
Copy the full SHA bd6d8cfView commit details