CodeCatalyst: pip install failed on Lambda using Active images

0

Hi,

We use test action aws/managed-test@v1 as part of our workflow in CodeCatalyst.

To test our Python Lambda's code, we installed some extra package using pip install before running pytest. Recently we add iceberg in our stack, so we need to test our Lambda's code using the package pyiceberg.

But the action failed to run when we try to do pip install pyiceberg with the error: ERROR: Cannot set --home and --prefix together

This is similar to the issue mentioned in https://github.com/pypa/pip/issues/11129

In fact, when I tried to do pip config debug on the Compute.Type Lambda, it was:

env_var:
env:
global:
/etc/xdg/pip/pip.conf, exists: False
/etc/pip.conf, exists: True
global.target: /tmp/opt/python/site-packages
site:
/usr/local/pip.conf, exists: False

When I did the same thing on the Compute.Type EC2, it doesn't have global.target as part of the config. But since we can't use sudo to run a command in Steps, I can't remove the global.target from pip config. My currently workaround is running our test on Compute.Type EC2 instead of Lambda.

Should this be considered as a bug to be fix ? Any other recommendation to fix the issue so that we can continue to run our tests on the Compyte.Type Lambda?

Thanks in advance for your help.

Vu Hai
質問済み 1ヶ月前46ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ