Upgrading to 3.77.0 & Python 3.9 Results in Import Error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with latest.yaml and the lambda_function entry point, then reproduce the deployment on Python 3.9 and inspect why ddtrace.internal cannot provide _rand. Done means the CloudFormation update completes and the Log Forwarder handles invocations successfully on Python 3.9 without the import error.
Written by the indexing model from the issue text.
Description
Describe what happened:
We use the DD provided cloudformation stack to deploy the Lambda Log forwarder. However it was on version 3.59.0. We upgraded to 3.77.0 using the latest.yaml template. The update went through, but suddenly the lambda failed all invocations with the following:
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': cannot import name '_rand' from 'ddtrace.internal' (/var/task/ddtrace/internal/__init__.py)
Traceback (most recent call last):
Manually changing the run time from Python 3.9 to 3.8 fixed this issue.
As a result we rolled back to 3.73.0 which is the last Python 3.8 deployment, and everything is working OK.
Describe what you expected:
Expected to run latest.yaml Cloudformation template and the Log Forwarder to work.
Steps to reproduce the issue:
Deployed latest.yaml as an update to our CloudFormation stack.
- Dominant language
- Python
- Stars
- 351
- Forks
- 397
- Avg merge
- 5h 50m
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/datadog-serverless-functions
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DataDog/datadog-serverless-functions#1219 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
DataDog/datadog-serverless-functions#1187 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
DataDog/datadog-serverless-functions#1148 · 1 reaction ·
Maintainers usually reply within 1 day
-
Overriding environment variables that are reserved by AWS Lambda might lead to unexpected behavior.Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
DataDog/datadog-serverless-functions#1198 ·
Maintainers usually reply within 1 day
-
Support DD_TAGS on internal forwarder telemetry metricsPossibly taken @patbos claimed this 149 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
DataDog/datadog-serverless-functions#1145 ·
Maintainers usually reply within 1 day
All issues in DataDog/datadog-serverless-functions
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sususweet/midea_auto_cloud#285 ·
Maintainers usually reply within 1 day
-
Short positive Table maxlen values produce oversized cellsPossibly taken @Gambit-Checkmate claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 18 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
MangasMango/bound-to-rot#41 · 1 comment ·
-
breaking change
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Word viper missingOpen
Difficulty 1/5 Under an hour Newbie friendliness 68/100
dwyl/english-words#244 ·