newrelic / newrelic-lambda-cli

A CLI to install the New Relic AWS Lambda integration and layers.
https://newrelic.com/products/serverless-aws-lambda
Apache License 2.0
47 stars 53 forks source link

Latest emoji package release breaks new-relic-cli installation #281

Closed mateuszsokola closed 1 month ago

mateuszsokola commented 4 months ago

Description

A new version of the emoji package was released 30 minutes ago, causing installation issues with the new-relic-cli tool. It appears your repository does not freeze dependencies, which can lead to problems like this when upstream packages are updated. To prevent such issues, consider freezing dependencies to ensure stability.

Screenshot 2024-05-20 at 11 29 54

Steps to Reproduce

Just run:

pip3 install newrelic-lambda-cli

Expected Behaviour

Installation shouldn't fail

Relevant Logs / Console output

$ pip3 install newrelic-lambda-cli==0.9.0
Collecting newrelic-lambda-cli==0.9.0
  Using cached newrelic_lambda_cli-0.9.0-py2.py3-none-any.whl.metadata (21 kB)
Requirement already satisfied: boto3<5 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from newrelic-lambda-cli==0.9.0) (1.26.60)
Requirement already satisfied: click>=7.1.2 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from newrelic-lambda-cli==0.9.0) (8.1.3)
Requirement already satisfied: colorama in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from newrelic-lambda-cli==0.9.0) (0.4.6)
Collecting emoji<3,>=2 (from newrelic-lambda-cli==0.9.0)
  Downloading emoji-2.12.0-py3-none-any.whl.metadata (5.4 kB)
Collecting gql<3,>=2 (from newrelic-lambda-cli==0.9.0)
  Using cached gql-2.0.0-py2.py3-none-any.whl.metadata (4.8 kB)
Requirement already satisfied: requests<3 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from newrelic-lambda-cli==0.9.0) (2.28.1)
Requirement already satisfied: tabulate in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from newrelic-lambda-cli==0.9.0) (0.9.0)
Requirement already satisfied: botocore<1.30.0,>=1.29.60 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from boto3<5->newrelic-lambda-cli==0.9.0) (1.29.165)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from boto3<5->newrelic-lambda-cli==0.9.0) (1.0.1)
Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from boto3<5->newrelic-lambda-cli==0.9.0) (0.6.2)
Requirement already satisfied: typing-extensions in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from emoji<3,>=2->newrelic-lambda-cli==0.9.0) (4.4.0)
Requirement already satisfied: six>=1.10.0 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from gql<3,>=2->newrelic-lambda-cli==0.9.0) (1.16.0)
Collecting graphql-core<3,>=2.3.2 (from gql<3,>=2->newrelic-lambda-cli==0.9.0)
  Using cached graphql_core-2.3.2-py2.py3-none-any.whl.metadata (8.0 kB)
Collecting promise<3,>=2.3 (from gql<3,>=2->newrelic-lambda-cli==0.9.0)
  Using cached promise-2.3-py3-none-any.whl
Requirement already satisfied: charset-normalizer<3,>=2 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from requests<3->newrelic-lambda-cli==0.9.0) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from requests<3->newrelic-lambda-cli==0.9.0) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from requests<3->newrelic-lambda-cli==0.9.0) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from requests<3->newrelic-lambda-cli==0.9.0) (2022.9.24)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages (from botocore<1.30.0,>=1.29.60->boto3<5->newrelic-lambda-cli==0.9.0) (2.8.1)
Collecting rx<2,>=1.6 (from graphql-core<3,>=2.3.2->gql<3,>=2->newrelic-lambda-cli==0.9.0)
  Using cached Rx-1.6.3-py2.py3-none-any.whl
Using cached newrelic_lambda_cli-0.9.0-py2.py3-none-any.whl (42 kB)
Downloading emoji-2.12.0-py3-none-any.whl (431 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 431.4/431.4 kB 7.2 MB/s eta 0:00:00
Using cached gql-2.0.0-py2.py3-none-any.whl (10 kB)
Using cached graphql_core-2.3.2-py2.py3-none-any.whl ([25](https://github.com/stakefish/eth2-oracle/actions/runs/9154773368/job/25165913733?pr=1108#step:10:26)2 kB)
Installing collected packages: rx, promise, emoji, graphql-core, gql, newrelic-lambda-cli
Successfully installed emoji-2.12.0 gql-2.0.0 graphql-core-2.3.2 newrelic-lambda-cli-0.9.0 promise-2.3 rx-1.6.3
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.5/x64/bin/newrelic-lambda", line 5, in <module>
    from newrelic_lambda_cli.cli import main
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cli/__init__.py", line 5, in <module>
    from newrelic_lambda_cli.cli import functions, integrations, layers, subscriptions
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cli/integrations.py", line 6, in <module>
    from newrelic_lambda_cli import api, integrations, permissions
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/api.py", line 19, in <module>
    from newrelic_lambda_cli.cliutils import failure, success
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/newrelic_lambda_cli/cliutils.py", line 4, in <module>
    import emoji
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/emoji/__init__.py", line 47, in <module>
    from emoji.core import *
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/emoji/core.py", line 12, in <module>
    from typing_extensions import Literal, Match, TypedDict
ImportError: cannot import name 'Match' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/typing_extensions.py)

Your Environment

Ubuntu & macOS

workato-integration[bot] commented 4 months ago

https://new-relic.atlassian.net/browse/NR-271070

chaudharysaket commented 4 months ago

Hi @mateuszsokola Thank you for notifying us about the bug. We will look into the issue. In the meantime, We would recommend to please use virtual environment to avoid conflict with already installed packages.

chaudharysaket commented 1 month ago

Tracking the fix to the issue here