razorpay / alohomora

alohomora is razorpay's secret distribution system
32 stars 3 forks source link

[fix] credstash lookup failing #12

Closed tasdikrahman closed 7 years ago

tasdikrahman commented 7 years ago

A new method got introduced on cryptography==2.0 named load_pem_parameters of which I had a discussion on #cryptography-d, possibly failing due to the older version of cryptography installed.

All the 3 tests are passing run using pytest

relevant slack conversation: https://razorpay.slack.com/archives/C0ZJSSQSV/p1502222997470404

captn3m0 commented 7 years ago

The requirements.txt file isn't used during installations, so this wouldn't work. This is the log I get for installing alohomora on a fresh venv:

pip install razorpay.alohomora
Collecting razorpay.alohomora
  Downloading razorpay.alohomora-0.3.0.tar.gz
Collecting credstash (from razorpay.alohomora)
  Downloading credstash-1.13.2.tar.gz
Collecting click (from razorpay.alohomora)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 554kB/s 
Collecting jinja2 (from razorpay.alohomora)
  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
    100% |████████████████████████████████| 348kB 2.5MB/s 
Collecting botocore (from razorpay.alohomora)
  Downloading botocore-1.5.93-py2.py3-none-any.whl (3.6MB)
    100% |████████████████████████████████| 3.6MB 219kB/s 
Collecting cryptography<2.0,>=1.5 (from credstash->razorpay.alohomora)
  Downloading cryptography-1.9.tar.gz (409kB)
    100% |████████████████████████████████| 419kB 341kB/s 
Collecting boto3>=1.1.1 (from credstash->razorpay.alohomora)
  Downloading boto3-1.4.5-py2.py3-none-any.whl (128kB)
    100% |████████████████████████████████| 133kB 201kB/s 
Collecting MarkupSafe>=0.23 (from jinja2->razorpay.alohomora)
  Downloading MarkupSafe-1.0.tar.gz
Collecting jmespath<1.0.0,>=0.7.1 (from botocore->razorpay.alohomora)
  Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting docutils>=0.10 (from botocore->razorpay.alohomora)
  Downloading docutils-0.14-py3-none-any.whl (543kB)
    100% |████████████████████████████████| 552kB 274kB/s 
Collecting python-dateutil<3.0.0,>=2.1 (from botocore->razorpay.alohomora)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 415kB/s 
Collecting idna>=2.1 (from cryptography<2.0,>=1.5->credstash->razorpay.alohomora)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 447kB/s 
Collecting asn1crypto>=0.21.0 (from cryptography<2.0,>=1.5->credstash->razorpay.alohomora)
  Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
    100% |████████████████████████████████| 102kB 433kB/s 
Collecting six>=1.4.1 (from cryptography<2.0,>=1.5->credstash->razorpay.alohomora)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting cffi>=1.7 (from cryptography<2.0,>=1.5->credstash->razorpay.alohomora)
  Downloading cffi-1.10.0-cp36-cp36m-manylinux1_x86_64.whl (406kB)
    100% |████████████████████████████████| 409kB 280kB/s 
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3>=1.1.1->credstash->razorpay.alohomora)
  Downloading s3transfer-0.1.10-py2.py3-none-any.whl (54kB)
    100% |████████████████████████████████| 61kB 397kB/s 
Collecting pycparser (from cffi>=1.7->cryptography<2.0,>=1.5->credstash->razorpay.alohomora)
  Downloading pycparser-2.18.tar.gz (245kB)
    100% |████████████████████████████████| 256kB 196kB/s 
Building wheels for collected packages: razorpay.alohomora, credstash, cryptography, MarkupSafe, pycparser
  Running setup.py bdist_wheel for razorpay.alohomora ... done
  Stored in directory: /home/nemo/.cache/pip/wheels/16/24/6f/107ab7afba1583e4b305fd14f628c2f92fc8ecd03b42c6c5ea
  Running setup.py bdist_wheel for credstash ... done
  Stored in directory: /home/nemo/.cache/pip/wheels/6b/5a/2a/596bb70ea65ec8f1b3110e5ff9c6b7fc36b069490ddc189c94
  Running setup.py bdist_wheel for cryptography ... done
  Stored in directory: /home/nemo/.cache/pip/wheels/ff/a5/ef/186bb4f6a89ef0bb8373bf53e5c9884b96722f0857bd3111b8
  Running setup.py bdist_wheel for MarkupSafe ... done
  Stored in directory: /home/nemo/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
  Running setup.py bdist_wheel for pycparser ... done
  Stored in directory: /home/nemo/.cache/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6
Successfully built razorpay.alohomora credstash cryptography MarkupSafe pycparser
Installing collected packages: idna, asn1crypto, six, pycparser, cffi, cryptography, jmespath, docutils, python-dateutil, botocore, s3transfer, boto3, credstash, click, MarkupSafe, jinja2, razorpay.alohomora
Successfully installed MarkupSafe-1.0 asn1crypto-0.22.0 boto3-1.4.5 botocore-1.5.93 cffi-1.10.0 click-6.7 credstash-1.13.2 cryptography-1.9 docutils-0.14 idna-2.6 jinja2-2.9.6 jmespath-0.9.3 pycparser-2.18 python-dateutil-2.6.1 razorpay.alohomora-0.3.0 s3transfer-0.1.10 six-1.10.0

The crypto dependency comes from credstash, which has pushed out a fix for this already: https://github.com/fugue/credstash/pull/157. However, they have not yet pushed out a release for this.

Any suggestions on how we can fix this?

captn3m0 commented 7 years ago

Marking this as closed, as we have a workaround in another repo (install cryptography==2.0.3 after installing alohomora)