Skip to content

Conversation

@joshuarli
Copy link
Member

@joshuarli joshuarli commented Sep 13, 2022

This is a better version, they've removed pyobjc as a dependency which was a problematic one: #73

Also note that we're broken on salt-ssh 3005 requires jinja2==3.1.0 but would be an easy fix (we should also freeze our deps):

  File "/Users/josh/dev/ops/k8s/cli/sentry_kube/ext.py", line 6, in <module>
    from jinja2 import contextfunction
ImportError: cannot import name 'contextfunction' from 'jinja2' (/Users/josh/dev/ops/.ops-venv/lib/python3.8/site-packages/jinja2/__init__.py)

Gonna be testing salt-ssh if it works for ops usage.

Oh yeah, also note that dumpster has python 3.7, we need Python 3.8.

Nice, can't even pip install this thing on Python 3.8.

        File "/private/var/folders/fn/y6rxl3jd28d3yq5j0_702bbc0000gn/T/pip-build-env-g1ig9m60/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "<string>", line 987, in __init__
        File "<string>", line 993, in update_metadata
        File "<string>", line 1124, in _property_install_requires
        File "<string>", line 179, in _parse_requirements_file
      FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/fn/y6rxl3jd28d3yq5j0_702bbc0000gn/T/pip-install-ws4cuc7m/salt-ssh_3c965dea925249d2b94df3072ee009ac/requirements/static/pkg/py3.8/darwin.txt'

lmao, well, just copied that darwin.txt over to py3.8 and works locally for -r 'ls' and state.apply.

joshua.li@thanks-again-tim-apple pkg * use-prebuilt-dependencies $ ls -plAhG py3.8
total 24
-rw-r--r--@ 1 josh  staff   2.4K Aug 25 08:07 freebsd.txt
-rw-r--r--@ 1 josh  staff   2.4K Aug 25 08:07 linux.txt
-rw-r--r--@ 1 josh  staff   3.2K Aug 25 08:07 windows.txt
joshua.li@thanks-again-tim-apple pkg * use-prebuilt-dependencies $ ls -plAhG py3.9
total 32
-rw-r--r--@ 1 josh  staff   2.7K Aug 25 08:07 darwin.txt
-rw-r--r--@ 1 josh  staff   2.4K Aug 25 08:07 freebsd.txt
-rw-r--r--@ 1 josh  staff   2.5K Aug 25 08:07 linux.txt
-rw-r--r--@ 1 josh  staff   3.2K Aug 25 08:07 windows.txt

@joshuarli joshuarli mentioned this pull request Sep 14, 2022
@joshuarli
Copy link
Member Author

ok at this point still need to solve above for macos

and also in linux:

validating python3.10: dist/pyOpenSSL-19.0.0-py2.py3-none-any.whl
creating env
=> installing
=> importing
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

@asottile-sentry
Copy link
Contributor

ok at this point still need to solve above for macos

and also in linux:

validating python3.10: dist/pyOpenSSL-19.0.0-py2.py3-none-any.whl
creating env
=> installing
=> importing
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/tmp/tmph1hdmaar/venv/lib/python3.10/site-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

I think that error is that pyopenssl 19 doesn't support python 3.10?

as for the salt requirements -- we might need to fork to make it work correctly (also looks like they don't specify per-platform deps correctly either :S)

@joshuarli
Copy link
Member Author

joshuarli commented Sep 15, 2022

edit: https://github.com/getsentry/salt/tree/v3005-sentry-pypi

I think that error is that pyopenssl 19 doesn't support python 3.10?

as for the salt requirements -- we might need to fork to make it work correctly (also looks like they don't specify per-platform deps correctly either :S)

Yeah... forking would be the easiest, not sure how rare this kind of per-platform incorrectness is but not too keen on making up for it in pypi. At the same time can also try bumpingpyopenssl to latest (will unlock more modern cryptography package), at a glance their usage is basic and mostly used for making a TLS connection so it'd be easy to verify if it works for our use cases.

- pyopenssl [required: ==19.0.0, installed: 19.0.0]
    - cryptography [required: >=2.3, installed: 3.3.2]
      - cffi [required: >=1.12, installed: 1.14.6]
        - pycparser [required: Any, installed: 2.21]
      - six [required: >=1.4.1, installed: 1.16.0]
    - six [required: >=1.5.2, installed: 1.16.0]

@joshuarli joshuarli changed the title feat: salt-ssh==3005 for ops feat: getsentry/salt@v3005-sentry-pypi for ops Sep 15, 2022
@joshuarli joshuarli changed the title feat: getsentry/salt@v3005-sentry-pypi for ops feat: salt==v3005 for ops Sep 15, 2022
@joshuarli
Copy link
Member Author

superseded by #79

@joshuarli joshuarli closed this Sep 15, 2022
@joshuarli joshuarli deleted the ops-salt-3005 branch September 15, 2022 19:03
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.

3 participants