Skip to content

Conversation

@smola
Copy link
Member

@smola smola commented May 7, 2025

Follow up to #13272:

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

@smola smola added changelog/no-changelog A changelog entry is not required for this PR. ASM Application Security Monitoring labels May 7, 2025
@smola smola changed the title fix(iast): fix stacktrace exception fix(iast): avoid exception when no relevant frame is found May 7, 2025
@smola smola changed the title fix(iast): avoid exception when no relevant frame is found chore(iast): avoid exception when no relevant frame is found May 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

CODEOWNERS have been resolved as:

tests/appsec/iast/test_stacktrace.py                                    @DataDog/asm-python
ddtrace/appsec/_iast/_stacktrace.c                                      @DataDog/asm-python
ddtrace/appsec/_iast/taint_sinks/_base.py                               @DataDog/asm-python

@smola smola force-pushed the smola/fix-stacktrace-exception branch from cecb33e to 2e501b2 Compare May 7, 2025 12:22
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 234 ± 5 ms.

The average import time from base is: 236 ± 4 ms.

The import time difference between this PR and base is: -1.6 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.960 ms (0.84%)
ddtrace.bootstrap.sitecustomize 1.288 ms (0.55%)
ddtrace.bootstrap.preload 1.288 ms (0.55%)
ddtrace.internal.products 1.288 ms (0.55%)
ddtrace.internal.remoteconfig.client 0.643 ms (0.27%)
ddtrace 0.672 ms (0.29%)

@smola smola marked this pull request as ready for review May 7, 2025 13:02
@smola smola requested a review from a team as a code owner May 7, 2025 13:02
@pr-commenter
Copy link

pr-commenter bot commented May 7, 2025

Benchmarks

Benchmark execution time: 2025-05-07 13:12:03

Comparing candidate commit 2e501b2 in PR branch smola/fix-stacktrace-exception with baseline commit 6810265 in branch main.

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

scenario:iast_aspects-lstrip_aspect

  • 🟥 execution_time [+1.437µs; +1.577µs] or [+10.949%; +12.012%]

scenario:iast_aspects-replace_aspect

  • 🟥 execution_time [+587.451ns; +641.622ns] or [+12.501%; +13.654%]

scenario:iast_aspects-rstrip_aspect

  • 🟥 execution_time [+1.331µs; +1.476µs] or [+10.245%; +11.368%]

scenario:telemetryaddmetric-1-distribution-metric-1-times

  • 🟥 execution_time [+343.054ns; +389.990ns] or [+11.522%; +13.099%]

@smola smola merged commit 2e2cb67 into main May 7, 2025
407 checks passed
@smola smola deleted the smola/fix-stacktrace-exception branch May 7, 2025 13:31
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

The backport to 2.21 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.21 2.21
# Navigate to the new working tree
cd .worktrees/backport-2.21
# Create a new branch
git switch --create backport-13346-to-2.21
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2e2cb67d5483406d201263865ec042c3d45da9fe
# Push it to GitHub
git push --set-upstream origin backport-13346-to-2.21
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.21

Then, create a pull request where the base branch is 2.21 and the compare/head branch is backport-13346-to-2.21.

smola added a commit that referenced this pull request May 7, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 12, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 12, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 12, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 13, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 13, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
smola added a commit that referenced this pull request May 13, 2025
Follow up to #13272:

- Avoid an exception when no relevant frame is found, return a tuple of
`None` objects instead. This was a regression in #13272.

(cherry picked from commit 2e2cb67)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASM Application Security Monitoring backport 2.21 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.

3 participants