airbnb / streamalert

StreamAlert is a serverless, realtime data analysis framework which empowers you to ingest, analyze, and alert on data from any environment, using datasources and alerting logic you define.
https://streamalert.io
Apache License 2.0
2.86k stars 333 forks source link

Python package version bumps #1306

Closed deanillfeld closed 3 years ago

deanillfeld commented 3 years ago

to: cc: @airbnb/streamalert-maintainers related to: resolves:

Background

This PR resolves 2 errors i encountered when deploying streamalert on Macos Big Sur with Python3.7.

The first is when running pip install -r requirements.txt

Collecting cffi==1.14.1
  Using cached cffi-1.14.1.tar.gz (468 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/dbi/Code/streamalert/venv/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-install-0t13an5f/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-install-0t13an5f/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-pip-egg-info-4y77wv44
         cwd: /private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-install-0t13an5f/cffi/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-install-0t13an5f/cffi/setup.py", line 152, in <module>
        if 'darwin' in sys.platform and macosx_deployment_target() >= (10, 15):
      File "/private/var/folders/pq/pd76h5710d5b0f4nbbf_dvzc0000gn/T/pip-install-0t13an5f/cffi/setup.py", line 76, in macosx_deployment_target
        return tuple(map(int, get_config_var("MACOSX_DEPLOYMENT_TARGET").split('.')))
    AttributeError: 'int' object has no attribute 'split'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

The second is when building the lambda functions

[INFO 2021-02-08 17:55:51,707 (streamalert_cli.manage_lambda.package:66)]: Creating package for streamalert
[INFO 2021-02-08 17:55:51,925 (streamalert_cli.manage_lambda.package:124)]: Installing libraries: boto3==1.14.29, jmespath==0.10.0, netaddr==0.8.0, backoff==1.10.0, pymsteams==0.1.13, policyuniverse==1.3.2.1, pathlib2==2.3.5, jsonlines==1.2.0, google-api-python-client==1.10.0, requests==2.24.0, cbapi==1.7.1
ERROR: moto 1.3.14 has requirement idna<2.9,>=2.5, but you'll have idna 2.10 which is incompatible.

Changes

Testing

I have ran the unit tests, however i'm new to streamalert so have not performed any kind of detailed testing.

Ryxias commented 3 years ago

Rebasing onto release-3-5-0