Restructure requirements for easier upstream syncing#222
Conversation
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Local Verification Results
|
|
FYI I also have a smaller scope PR that just addresses the urllib3 vulns here: #221. But after thinking about it more I decided to go with this approach to sync from upstream. I'm open to whichever the maintainers of this repo prefer. |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
maxime.perusse@datadoghq.com unqueued this merge request |
|
/merge -c |
|
View all feedbacks in Devflow UI.
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
devflow unqueued this merge request: It did not become mergeable within the expected time |
|
/merge |
|
View all feedbacks in Devflow UI.
PR already in the queue with status waiting |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
maxime.perusse@datadoghq.com unqueued this merge request |
|
/merge -c |
|
View all feedbacks in Devflow UI.
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
|
/merge |
|
View all feedbacks in Devflow UI.
PR already in the queue with status waiting |
Split requirements.in into: - requirements-base.in: synced from upstream Netflix/lemur - requirements-datadog.in: Datadog-specific additions and security overrides This makes future upstream syncs easier - just overwrite requirements-base.in from upstream and recompile, no merge conflicts. Removed redundant security pins that upstream now satisfies: - requests (upstream has 2.32.5) - werkzeug (upstream has 3.1.5) - Flask-Cors (upstream has 6.0.2) - grpcio (upstream has 1.76.0) - sentry-sdk (upstream has 2.51.0) - pyjwt (upstream has 2.10.1) - zipp (upstream has 3.23.0) Kept security pins still needed (upstream vulnerable): - urllib3 >= 2.5.0 (upstream has 1.26.18) - jinja2 >= 3.1.6 (upstream has 3.1.3) - python_ldap >= 3.4.5 (upstream has 3.4.4) - h11 >= 0.16.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SQLALCHEMY_ENGINE_OPTIONS to test config with connection/statement timeouts to prevent test fixture cleanup from hanging indefinitely - Fix exception handling in verify.py: "except ConnectionError or Timeout" only catches ConnectionError in Python. Changed to "except (ConnectionError, Timeout)"
- Convert user ID to string when creating JWT payload to ensure consistency. - Update user retrieval logic to handle string user IDs by converting them back to integers before fetching from the user service. - Adjust test vectors to reflect updated JWT tokens for valid users and admins.
josepy.util module is now a deprecation wrapper in newer versions. Patch the class where it's actually imported in acme_handlers.py instead.
The request_certificate method doesn't use ComparableX509 (only revoke_certificate does). Removing the mock fixes compatibility with newer josepy versions.
PyJWT 2.10+ requires 'sub' to be a string, but existing tokens have integer sub. Adding verify_sub=False allows both old (int) and new (string) tokens to work. The isinstance check in login_required handles normalization for user lookup.
4ccceaf to
8d49cae
Compare
107ba25
into
DataDog:master
Summary
This PR restructures the Python requirements files to use an overlay approach, making it easier to sync with upstream Netflix/lemur:
requirements.in- can be overwritten withcurlduring upstream syncDatadog-specific additions include:
Security pins removed (upstream now satisfies):
Security pins remained (upstream still vulnerable):
Security pins added:
This is the underlying purpose of the PR, adding this security fix.
Future Upstream Sync Workflow
Test plan
pip install -r requirements.txtworkspip install -r requirements-tests.txtworks