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

feat: Remove requests and all its dependencies. #547

Merged
merged 13 commits into from
Jan 28, 2025

Conversation

purple4reina
Copy link
Contributor

What does this PR do?

Requires DataDog/datadogpy#879 to be merged and released.

Removes requests and all of its dependencies from being packaged with the layer.

Motivation

v0.51.0 of the datadog package will no longer require requests, instead falling back to urllib3 when present.

Testing Guidelines

See testing notes in DataDog/datadogpy#879

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@purple4reina purple4reina requested a review from a team as a code owner December 23, 2024 22:27
@purple4reina purple4reina marked this pull request as draft December 23, 2024 22:28
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from 7132262 to cceb6de Compare January 27, 2025 18:51
@purple4reina purple4reina marked this pull request as ready for review January 27, 2025 18:51
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from cceb6de to 5182136 Compare January 27, 2025 18:54
@astuyve
Copy link
Contributor

astuyve commented Jan 27, 2025

image 10 mb!!!

@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from 9164bda to ef66ae7 Compare January 28, 2025 17:45
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from 2aba4b7 to e7fd46c Compare January 28, 2025 18:25
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from e7fd46c to b1f0490 Compare January 28, 2025 18:29
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from e518fe9 to 6ef0058 Compare January 28, 2025 20:55
@purple4reina purple4reina force-pushed the rey.abolofia/rm-requests branch from 6ef0058 to c719f58 Compare January 28, 2025 21:07
@@ -25,7 +25,7 @@ classifiers = [

[tool.poetry.dependencies]
python = ">=3.8.0,<4"
datadog = ">=0.41.0,<1.0.0"
datadog = ">=0.51.0,<1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we also need to run a poetry update to refresh the poetry lock file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh good call

Comment on lines +25 to +37
- { Ref: PythonRequirementsLambdaLayer }

plugins:
- serverless-python-requirements

custom:
pythonRequirements:
pythonBin: python3
pipCmdExtraArgs:
- --no-deps # install just requests
layer:
compatibleRuntimes:
- ${env:SERVERLESS_RUNTIME}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add new requirements? Could you give me a brief explanation so I understand it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We removed requests from the lambda layer, yet the tests still rely on it. So we must add requests back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I imagine these are the ones that ping URLs?

@purple4reina purple4reina merged commit 7fd33d4 into main Jan 28, 2025
50 checks passed
@purple4reina purple4reina deleted the rey.abolofia/rm-requests branch January 28, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants