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

Python package version bumps #1306

Merged
merged 3 commits into from
Feb 10, 2021
Merged

Conversation

deanillfeld
Copy link
Contributor

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

  • Update cffi to 1.14.4
  • Explicitly install idna 2.8 to prevent install error in moto 1.3.14

Testing

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

@Ryxias Ryxias changed the base branch from master to release-3-5-0 February 10, 2021 18:17
@Ryxias
Copy link
Contributor

Ryxias commented Feb 10, 2021

Rebasing onto release-3-5-0

Copy link
Contributor

@Ryxias Ryxias left a comment

Choose a reason for hiding this comment

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

SRTM

@Ryxias Ryxias merged commit b510d39 into airbnb:release-3-5-0 Feb 10, 2021
ryandeivert pushed a commit that referenced this pull request Nov 4, 2021
* bump cffi to resolve install issues on osx big sur

* define idna version to resolve conflict

Co-authored-by: Dean Illfeld <[email protected]>
Co-authored-by: Ryxias <[email protected]>
@ryandeivert ryandeivert added this to the 3.5.0 milestone Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants