Skip to content

chore(ci): riotize appsec_integration_django #13868

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

juanjux
Copy link
Collaborator

@juanjux juanjux commented Jul 3, 2025

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@juanjux juanjux self-assigned this Jul 3, 2025
@juanjux juanjux added the changelog/no-changelog A changelog entry is not required for this PR. label Jul 3, 2025
@juanjux juanjux requested review from a team as code owners July 3, 2025 09:09
@juanjux juanjux added the ASM Application Security Monitoring label Jul 3, 2025
@juanjux juanjux requested a review from a team as a code owner July 3, 2025 09:09
@juanjux juanjux requested review from avara1986 and Kyle-Verhoog July 3, 2025 09:09
Copy link
Contributor

github-actions bot commented Jul 3, 2025

CODEOWNERS have been resolved as:

.riot/requirements/1310347.txt                                          @DataDog/apm-python
.riot/requirements/176fdea.txt                                          @DataDog/apm-python
.riot/requirements/17bea9e.txt                                          @DataDog/apm-python
.riot/requirements/181ead4.txt                                          @DataDog/apm-python
.riot/requirements/193c2a8.txt                                          @DataDog/apm-python
.riot/requirements/1bee964.txt                                          @DataDog/apm-python
.riot/requirements/1ca8a0e.txt                                          @DataDog/apm-python
.riot/requirements/1ce81e3.txt                                          @DataDog/apm-python
.riot/requirements/1fdd310.txt                                          @DataDog/apm-python
.riot/requirements/3c0d0e9.txt                                          @DataDog/apm-python
.riot/requirements/4ee4ae4.txt                                          @DataDog/apm-python
.riot/requirements/57eb2c8.txt                                          @DataDog/apm-python
.riot/requirements/5cb6b77.txt                                          @DataDog/apm-python
.riot/requirements/6d52d9c.txt                                          @DataDog/apm-python
.riot/requirements/72027cc.txt                                          @DataDog/apm-python
.riot/requirements/891b825.txt                                          @DataDog/apm-python
.riot/requirements/8c5fae9.txt                                          @DataDog/apm-python
.riot/requirements/94282bb.txt                                          @DataDog/apm-python
.riot/requirements/a12d611.txt                                          @DataDog/apm-python
.riot/requirements/b0ca79b.txt                                          @DataDog/apm-python
.riot/requirements/cef811a.txt                                          @DataDog/apm-python
.riot/requirements/e151245.txt                                          @DataDog/apm-python
.riot/requirements/10f86d9.txt                                          @DataDog/apm-python
.riot/requirements/111353f.txt                                          @DataDog/apm-python
.riot/requirements/111dce9.txt                                          @DataDog/apm-python
.riot/requirements/1170953.txt                                          @DataDog/apm-python
.riot/requirements/11b13af.txt                                          @DataDog/apm-python
.riot/requirements/122a76e.txt                                          @DataDog/apm-python
.riot/requirements/13e1c0c.txt                                          @DataDog/apm-python
.riot/requirements/14191ba.txt                                          @DataDog/apm-python
.riot/requirements/14c3865.txt                                          @DataDog/apm-python
.riot/requirements/156842b.txt                                          @DataDog/apm-python
.riot/requirements/1670b58.txt                                          @DataDog/apm-python
.riot/requirements/1696c78.txt                                          @DataDog/apm-python
.riot/requirements/16ae446.txt                                          @DataDog/apm-python
.riot/requirements/16cf7dd.txt                                          @DataDog/apm-python
.riot/requirements/16d69d5.txt                                          @DataDog/apm-python
.riot/requirements/1721127.txt                                          @DataDog/apm-python
.riot/requirements/1737c11.txt                                          @DataDog/apm-python
.riot/requirements/176c4e4.txt                                          @DataDog/apm-python
.riot/requirements/1826cd3.txt                                          @DataDog/apm-python
.riot/requirements/187928c.txt                                          @DataDog/apm-python
.riot/requirements/188ce67.txt                                          @DataDog/apm-python
.riot/requirements/18a650f.txt                                          @DataDog/apm-python
.riot/requirements/18d52a7.txt                                          @DataDog/apm-python
.riot/requirements/1932336.txt                                          @DataDog/apm-python
.riot/requirements/19498a9.txt                                          @DataDog/apm-python
.riot/requirements/1a98a60.txt                                          @DataDog/apm-python
.riot/requirements/1ab97dd.txt                                          @DataDog/apm-python
.riot/requirements/1c15175.txt                                          @DataDog/apm-python
.riot/requirements/1d35b33.txt                                          @DataDog/apm-python
.riot/requirements/1e1c2b7.txt                                          @DataDog/apm-python
.riot/requirements/1e656eb.txt                                          @DataDog/apm-python
.riot/requirements/1f4ed67.txt                                          @DataDog/apm-python
.riot/requirements/1f7d94e.txt                                          @DataDog/apm-python
.riot/requirements/2c6ccbc.txt                                          @DataDog/apm-python
.riot/requirements/31bdefd.txt                                          @DataDog/apm-python
.riot/requirements/3459dc4.txt                                          @DataDog/apm-python
.riot/requirements/3f34788.txt                                          @DataDog/apm-python
.riot/requirements/46d34dd.txt                                          @DataDog/apm-python
.riot/requirements/5410e1c.txt                                          @DataDog/apm-python
.riot/requirements/5b1bf57.txt                                          @DataDog/apm-python
.riot/requirements/5b956b7.txt                                          @DataDog/apm-python
.riot/requirements/6c15ef8.txt                                          @DataDog/apm-python
.riot/requirements/75bc4d4.txt                                          @DataDog/apm-python
.riot/requirements/803d32f.txt                                          @DataDog/apm-python
.riot/requirements/846ba1d.txt                                          @DataDog/apm-python
.riot/requirements/9cd36b5.txt                                          @DataDog/apm-python
.riot/requirements/9e63ee7.txt                                          @DataDog/apm-python
.riot/requirements/a1026b8.txt                                          @DataDog/apm-python
.riot/requirements/a669651.txt                                          @DataDog/apm-python
.riot/requirements/a96d894.txt                                          @DataDog/apm-python
.riot/requirements/ade49fb.txt                                          @DataDog/apm-python
.riot/requirements/ae50f7d.txt                                          @DataDog/apm-python
.riot/requirements/b43c003.txt                                          @DataDog/apm-python
.riot/requirements/bb60b77.txt                                          @DataDog/apm-python
.riot/requirements/bf356da.txt                                          @DataDog/apm-python
.riot/requirements/ce8d896.txt                                          @DataDog/apm-python
.riot/requirements/d548d24.txt                                          @DataDog/apm-python
.riot/requirements/d7a340e.txt                                          @DataDog/apm-python
.riot/requirements/f346262.txt                                          @DataDog/apm-python
ddtrace/appsec/_iast/_handlers.py                                       @DataDog/asm-python
hatch.toml                                                              @DataDog/python-guild
riotfile.py                                                             @DataDog/apm-python
tests/appsec/suitespec.yml                                              @DataDog/asm-python

@juanjux juanjux marked this pull request as draft July 3, 2025 09:10
Signed-off-by: Juanjo Alvarez <[email protected]>
Copy link
Contributor

github-actions bot commented Jul 3, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 285 ± 9 ms.

The average import time from base is: 290 ± 10 ms.

The import time difference between this PR and base is: -4.5 ± 0.4 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.173 ms (0.76%)
ddtrace.bootstrap.sitecustomize 1.487 ms (0.52%)
ddtrace.bootstrap.preload 1.487 ms (0.52%)
ddtrace.internal.remoteconfig.client 0.700 ms (0.25%)
ddtrace 0.686 ms (0.24%)
ddtrace.internal._unpatched 0.034 ms (0.01%)
json 0.034 ms (0.01%)
json.decoder 0.034 ms (0.01%)
re 0.034 ms (0.01%)
enum 0.034 ms (0.01%)
types 0.034 ms (0.01%)

juanjux added 2 commits July 3, 2025 11:43
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
@pr-commenter
Copy link

pr-commenter bot commented Jul 3, 2025

Benchmarks

Benchmark execution time: 2025-07-03 15:54:02

Comparing candidate commit a132902 in PR branch juanjux/riotize-integrations-djang-second-try with baseline commit 427c82b in branch main.

Found 0 performance improvements and 3 performance regressions! Performance is the same for 543 metrics, 4 unstable metrics.

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+683.547ns; +835.092ns] or [+16.034%; +19.588%]

scenario:iastaspectsospath-ospathnormcase_aspect

  • 🟥 execution_time [+407.285ns; +456.148ns] or [+11.621%; +13.015%]

scenario:iastaspectsospath-ospathsplitext_aspect

  • 🟥 execution_time [+696.084ns; +797.948ns] or [+15.261%; +17.494%]

@juanjux juanjux marked this pull request as ready for review July 3, 2025 12:03
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

question about a code change that should be unrelated, but otherwise lgtm

@@ -190,7 +190,8 @@ def _on_django_func_wrapped(fn_args, fn_kwargs, first_arg_expected_type, *_):
return

http_req = fn_args[0]
set_iast_request_endpoint(http_req.method, http_req.resolver_match.route)
if http_req.resolver_match is not None:
Copy link
Member

Choose a reason for hiding this comment

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

necessary change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think is not needed (I was testing something because it failed with a None on that on CI, but the problem was because a wrong dependency), but let me test without it.

Copy link
Collaborator Author

@juanjux juanjux Jul 3, 2025

Choose a reason for hiding this comment

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

Well, it was needed on riot, yup [raw log without this]. .

What wasn't needed was (if the current run finish correctly) the remote config env var.

Copy link
Member

Choose a reason for hiding this comment

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

wait, but what changed? version of a dep being installed or something?

I'd expect this to be failing on hatch?

Signed-off-by: Juanjo Alvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants