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

Kapitan depends on azure.keyvault.v2016_10_01 explicitly #761

Open
sodul opened this issue Aug 5, 2021 · 3 comments
Open

Kapitan depends on azure.keyvault.v2016_10_01 explicitly #761

sodul opened this issue Aug 5, 2021 · 3 comments
Labels

Comments

@sodul
Copy link

sodul commented Aug 5, 2021

Describe the bug/feature
The Azure SDK ships with copies of the SDKs all the back to 2015, this makes the Azure directory under site-packages to be close to 700MB, and growing. In most case these very old directories are useless and cause docker images to be needlessly very large. Most projects do not pin to specific version of the obsolete SDKs, but kapitan does.

To Reproduce
Steps to reproduce the behavior:

  1. Delete the site-packages/azure/keyvault/v2016_10_01 directory.
  2. run kapitan -h
  3. Stacktrace
Traceback (most recent call last):
  File "/Users/me/.pyenv/versions/3.9.6/bin/kapitan", line 5, in <module>
    from kapitan.cli import main
  File "/Users/me/.pyenv/versions/3.9.6/lib/python3.9/site-packages/kapitan/cli.py", line 24, in <module>
    from kapitan.refs.cmd_parser import handle_refs_command
  File "/Users/me/.pyenv/versions/3.9.6/lib/python3.9/site-packages/kapitan/refs/cmd_parser.py", line 14, in <module>
    from kapitan.refs.secrets.azkms import AzureKMSSecret
  File "/Users/me/.pyenv/versions/3.9.6/lib/python3.9/site-packages/kapitan/refs/secrets/azkms.py", line 7, in <module>
    from azure.keyvault.keys.crypto import CryptographyClient, EncryptionAlgorithm
  File "/Users/me/.pyenv/versions/3.9.6/lib/python3.9/site-packages/azure/keyvault/__init__.py", line 25, in <module>
    from .key_vault_client import KeyVaultClient
  File "/Users/me/.pyenv/versions/3.9.6/lib/python3.9/site-packages/azure/keyvault/key_vault_client.py", line 22, in <module>
    from azure.keyvault.v2016_10_01.version import VERSION as v2016_10_01_VERSION
ModuleNotFoundError: No module named 'azure.keyvault.v2016_10_01'

Expected behavior
Kapitan should not be pinned to an SDK from 2016.
A workaround is to ln -s v7_0 v2016_10_01 so kapitan can run for us without having to make our docker images larger.

** If it's a bug (please complete the following information):**

  • python --version: Python 3.9.6
  • pip3 --version: pip 21.2.1
  • kapitan==0.29.5
  • Using pyenv

Additional context
Azure/azure-sdk-for-python#17801

@ramaro
Copy link
Member

ramaro commented Nov 28, 2021

Hey @sodul thanks for opening the issue and sorry for the delay! I completely agree, this is largely outdated. I honestly don't use azure myself so it's not on top of my mind. I think it makes sense to move azkms (and others) as package extras instead. What do you think?

@sodul
Copy link
Author

sodul commented Nov 28, 2021

Sounds good. I do not use the project that frequently myself so I would not be able to give the best advice.

Copy link

This issue is stale because it has been open for 1 year with no activity.
Remove the stale label or comment if this issue is still relevant for you.
If not, please close it yourself.

@github-actions github-actions bot added the Stale label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants