Zappa
Zappa copied to clipboard
Add support for private repositories
Context
If your virtual env uses a package from a private repository zappa will fail to package all of the project dependcies.
Expected Behavior
Zappa will try to query all the urls that pip is configured to use when trying to package the dependcies.
Actual Behavior
Zappa only tries to fetch files from Pypi. this causes a KeyError in get_manylinux_wheel_url, specifically in line 1030 if package_version not in data["releases"]: if the package is not in Pypi "releases" is not a key in data.
Possible Fix
Check pip to see what urls it's checking. A easier solution is to change line 1030 to if package_version not in data.get("releases", []): but it wont download the manylinux files if they exists
Steps to Reproduce
- Add a dependency from a private repo 2.Run zappa deploy or zappa update
Your Environment
- Zappa version used: 0.54.1
- Operating System and Python version: 3.8.10
We could add support for parsing the pip.conf file to look for alternative repos. This wouldn't cover all cases though as you can install packages from other repositories without adding it to the pip.conf file, it also wouldn't cover other package managers like Poetry.
I'm unsure if there is enough need to go as far as parsing various configs looking for private repos at this stage or whether we just update the code to handle there being no releases as you mentioned
I believe I've installed from a private github repository before, this is refering to a private package repository, right?
I believe I've installed from a private github repository before, this is refering to a private package repository, right?
Hi @monkut, can you explain more detail on this, I got same error with zappa when trying using private repository as dependency. Hope you can help me figure out to fix this
@kurojs can you post the Zappa version and error logs here?
@kurojs can you post the Zappa version and error logs here?
Hi @sridhar562345, I this is my environments
Zappa version used: 0.56.1 Operating System and Python version: 3.8.10 Poetry version 1.3.1
For the logs, I rolled back already on our staging machine, but something like Django cannot recognize my private git module Seem like when deployed, zappa didn't pack our private module into the zip. Do you have any clues about this, thank you
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.