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

ci: add vpa template configuration #12822

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

Conversation

jorgetomtz
Copy link
Contributor

@jorgetomtz jorgetomtz commented Mar 20, 2025

Problem

We are looking into modifying the default template used for VPA.

Solution

Set the annotation globally

Testing Done

https://app.datadoghq.com/s/yB5yjZ/xr8-36s-ip6

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

Copy link
Contributor

CODEOWNERS have been resolved as:

.gitlab-ci.yml                                                          @DataDog/apm-core-python

Copy link
Contributor

github-actions bot commented Mar 20, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 249 ± 6 ms.

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

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

Import time breakdown

The following import paths have grown:

ddtrace.auto 7.559 ms (3.03%)
ddtrace 4.867 ms (1.95%)
ddtrace._logger 3.485 ms (1.40%)
ddtrace.internal.telemetry 3.206 ms (1.29%)
ddtrace.internal.telemetry.writer 3.151 ms (1.26%)
http.client 1.042 ms (0.42%)
email.parser 0.468 ms (0.19%)
email.feedparser 0.468 ms (0.19%)
email._policybase 0.468 ms (0.19%)
email.utils 0.404 ms (0.16%)
socket 0.152 ms (0.06%)
_socket 0.052 ms (0.02%)
selectors 0.036 ms (0.01%)
email._parseaddr 0.116 ms (0.05%)
calendar 0.116 ms (0.05%)
locale 0.067 ms (0.03%)
urllib.parse 0.068 ms (0.03%)
random 0.043 ms (0.02%)
math 0.017 ms (0.01%)
email.header 0.065 ms (0.03%)
binascii 0.026 ms (0.01%)
ssl 0.219 ms (0.09%)
_ssl 0.077 ms (0.03%)
email.message 0.039 ms (0.02%)
http 0.036 ms (0.01%)
ddtrace.internal.utils.http 0.741 ms (0.30%)
dataclasses 0.375 ms (0.15%)
inspect 0.320 ms (0.13%)
dis 0.099 ms (0.04%)
opcode 0.047 ms (0.02%)
_opcode 0.021 ms (0.01%)
ast 0.084 ms (0.03%)
ddtrace.internal.http 0.195 ms (0.08%)
ddtrace.internal.runtime 0.151 ms (0.06%)
uuid 0.095 ms (0.04%)
platform 0.035 ms (0.01%)
_uuid 0.024 ms (0.01%)
ddtrace.internal.forksafe 0.040 ms (0.02%)
wrapt 0.019 ms (0.01%)
wrapt.__wrapt__ 0.019 ms (0.01%)
wrapt._wrappers 0.019 ms (0.01%)
ddtrace.internal.runtime.container 0.044 ms (0.02%)
ddtrace.internal.utils 0.032 ms (0.01%)
ddtrace.internal.utils.cache 0.017 ms (0.01%)
ddtrace.internal.utils.version 0.508 ms (0.20%)
ddtrace.vendor.packaging.version 0.495 ms (0.20%)
ddtrace.vendor.packaging 0.318 ms (0.13%)
ddtrace.vendor 0.318 ms (0.13%)
ddtrace.internal.module 0.318 ms (0.13%)
ddtrace.internal.wrapping.context 0.261 ms (0.10%)
ddtrace.internal.wrapping 0.196 ms (0.08%)
bytecode 0.196 ms (0.08%)
bytecode.bytecode 0.154 ms (0.06%)
bytecode.flags 0.122 ms (0.05%)
bytecode.instr 0.122 ms (0.05%)
bytecode.cfg 0.043 ms (0.02%)
bytecode.concrete 0.043 ms (0.02%)
contextvars 0.024 ms (0.01%)
_contextvars 0.024 ms (0.01%)
ddtrace.vendor.packaging._structures 0.024 ms (0.01%)
ddtrace.internal.encoding 0.307 ms (0.12%)
ddtrace.internal._encoding 0.045 ms (0.02%)
ddtrace.internal.telemetry.data 0.207 ms (0.08%)
ddtrace.internal.packages 0.163 ms (0.07%)
_sysconfigdata__linux_x86_64-linux-gnu 0.067 ms (0.03%)
ddtrace.settings.third_party 0.019 ms (0.01%)
sysconfig 0.044 ms (0.02%)
ddtrace.settings._agent 0.110 ms (0.04%)
ddtrace.settings._core 0.083 ms (0.03%)
ddtrace.internal.native 0.049 ms (0.02%)
ddtrace.internal.native._native 0.049 ms (0.02%)
ddtrace.settings._telemetry 0.059 ms (0.02%)
ddtrace.settings._inferred_base_service 0.059 ms (0.02%)
pathlib 0.059 ms (0.02%)
ddtrace.internal.periodic 0.055 ms (0.02%)
ddtrace.internal._threads 0.055 ms (0.02%)
ddtrace.internal.atexit 0.026 ms (0.01%)
signal 0.026 ms (0.01%)
ddtrace.internal.telemetry.metrics 0.023 ms (0.01%)
ddtrace.internal.telemetry.logging 0.022 ms (0.01%)
logging 0.174 ms (0.07%)
traceback 0.174 ms (0.07%)
contextlib 0.174 ms (0.07%)
typing 0.105 ms (0.04%)
ddtrace.trace 0.644 ms (0.26%)
ddtrace._trace.tracer 0.288 ms (0.12%)
ddtrace.internal.dogstatsd 0.111 ms (0.04%)
ddtrace.vendor.dogstatsd 0.111 ms (0.04%)
ddtrace.vendor.dogstatsd.base 0.111 ms (0.04%)
ddtrace.vendor.dogstatsd.container 0.029 ms (0.01%)
queue 0.025 ms (0.01%)
heapq 0.025 ms (0.01%)
_heapq 0.025 ms (0.01%)
ddtrace.internal.processor.endpoint_call_counter 0.069 ms (0.03%)
ddtrace.internal.debug 0.028 ms (0.01%)
ddtrace._trace.filters 0.232 ms (0.09%)
ddtrace._trace.processor 0.212 ms (0.08%)
ddtrace._trace.sampler 0.143 ms (0.06%)
ddtrace._trace.span 0.143 ms (0.06%)
ddtrace.internal.sampling 0.046 ms (0.02%)
ddtrace.internal._rand 0.035 ms (0.01%)
ddtrace.internal.writer 0.069 ms (0.03%)
ddtrace.internal.writer.writer 0.069 ms (0.03%)
ddtrace._trace.context 0.040 ms (0.02%)
ddtrace.settings._config 0.614 ms (0.25%)
ddtrace.internal.gitmetadata 0.187 ms (0.08%)
ddtrace.ext.ci 0.187 ms (0.08%)
ddtrace.ext.git 0.141 ms (0.06%)
shutil 0.088 ms (0.04%)
zlib 0.028 ms (0.01%)
ddtrace.internal.schema 0.036 ms (0.01%)
ddtrace.internal.schema.span_attribute_schema 0.036 ms (0.01%)
ddtrace._monkey 0.103 ms (0.04%)
ddtrace.settings.asm 0.058 ms (0.02%)
ddtrace.internal._unpatched 0.021 ms (0.01%)
json 0.021 ms (0.01%)
json.decoder 0.021 ms (0.01%)
json.scanner 0.021 ms (0.01%)
_json 0.021 ms (0.01%)
ddtrace.bootstrap.sitecustomize 2.691 ms (1.08%)
ddtrace.bootstrap.preload 2.243 ms (0.90%)
ddtrace.internal.products 1.078 ms (0.43%)
importlib.metadata 0.526 ms (0.21%)
importlib.abc 0.296 ms (0.12%)
importlib.resources 0.024 ms (0.01%)
importlib.resources._common 0.024 ms (0.01%)
importlib.resources.abc 0.024 ms (0.01%)
zipfile 0.063 ms (0.03%)
csv 0.040 ms (0.02%)
_csv 0.040 ms (0.02%)
importlib.metadata._meta 0.023 ms (0.01%)
ddtrace.internal.symbol_db.remoteconfig 0.176 ms (0.07%)
ddtrace.internal.symbol_db.symbols 0.176 ms (0.07%)
ddtrace.settings.symbol_db 0.030 ms (0.01%)
ddtrace.internal.remoteconfig._connectors 0.135 ms (0.05%)
ctypes 0.106 ms (0.04%)
_ctypes 0.050 ms (0.02%)
multiprocessing 0.091 ms (0.04%)
multiprocessing.context 0.091 ms (0.04%)
multiprocessing.reduction 0.064 ms (0.03%)
pickle 0.064 ms (0.03%)
multiprocessing.process 0.026 ms (0.01%)
ddtrace.settings.dynamic_instrumentation 0.056 ms (0.02%)
ddtrace.internal.remoteconfig.worker 0.052 ms (0.02%)
multiprocessing.sharedctypes 0.025 ms (0.01%)
multiprocessing.heap 0.025 ms (0.01%)
mmap 0.025 ms (0.01%)
ddtrace.internal.remoteconfig._pubsub 0.017 ms (0.01%)
ddtrace.internal.remoteconfig._subscribers 0.017 ms (0.01%)
ddtrace.settings.profiling 0.758 ms (0.30%)
ddtrace.vendor.psutil 0.634 ms (0.25%)
ddtrace.vendor.psutil._common 0.351 ms (0.14%)
ddtrace.vendor.psutil._pslinux 0.194 ms (0.08%)
glob 0.037 ms (0.01%)
ddtrace.vendor.psutil._psutil_linux 0.034 ms (0.01%)
ddtrace.internal.datadog.profiling.ddup 0.037 ms (0.01%)
ddtrace.internal.datadog.profiling.ddup._ddup 0.037 ms (0.01%)
ddtrace.internal.flare.flare 0.125 ms (0.05%)
logging.handlers 0.059 ms (0.02%)
ddtrace.settings.crashtracker 0.082 ms (0.03%)
ddtrace.internal.datadog.profiling.crashtracker 0.047 ms (0.02%)
ddtrace.internal.datadog.profiling.crashtracker._crashtracker 0.047 ms (0.02%)
ddtrace.appsec._remoteconfiguration 0.045 ms (0.02%)
ddtrace.appsec._capabilities 0.045 ms (0.02%)
ddtrace.internal.core.crashtracking 0.027 ms (0.01%)
ddtrace._trace.trace_handlers 0.217 ms (0.09%)
ddtrace._trace._inferred_proxy 0.104 ms (0.04%)
ddtrace.propagation.http 0.104 ms (0.04%)
ddtrace.internal._tagset 0.030 ms (0.01%)
ddtrace.contrib.trace_utils 0.059 ms (0.02%)
ddtrace.contrib.internal.trace_utils 0.059 ms (0.02%)
shlex 0.037 ms (0.01%)

The following import paths have shrunk:

ddtrace.auto 1.021 ms (0.41%)
ddtrace 0.640 ms (0.26%)
ddtrace.bootstrap.sitecustomize 0.382 ms (0.15%)
ddtrace.bootstrap.preload 0.382 ms (0.15%)
ddtrace.internal.products 0.382 ms (0.15%)
ddtrace.internal.remoteconfig.client 0.382 ms (0.15%)

@pr-commenter
Copy link

pr-commenter bot commented Mar 20, 2025

Benchmarks

Benchmark execution time: 2025-04-01 13:43:01

Comparing candidate commit ca9d041 in PR branch jorgetomtz/test-vpa-template-config with baseline commit ab2d207 in branch main.

Found 1 performance improvements and 2 performance regressions! Performance is the same for 495 metrics, 2 unstable metrics.

scenario:iast_aspects-ospathdirname_aspect

  • 🟥 execution_time [+397.822ns; +460.556ns] or [+10.688%; +12.374%]

scenario:iast_aspects-ospathsplitext_aspect

  • 🟩 execution_time [-339.544ns; -286.044ns] or [-8.477%; -7.141%]

scenario:iast_aspects-swapcase_aspect

  • 🟥 execution_time [+212.233ns; +243.964ns] or [+7.608%; +8.745%]

@jorgetomtz jorgetomtz changed the title Add vpa template configuraion Add vpa template configuration Mar 21, 2025
jorgetomtz added a commit that referenced this pull request Mar 21, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from 8e1afec to 6ac4044 Compare March 21, 2025 14:23
jorgetomtz added a commit that referenced this pull request Mar 21, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from 6ac4044 to 35ab719 Compare March 21, 2025 19:55
jorgetomtz added a commit that referenced this pull request Mar 24, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from 35ab719 to 9646268 Compare March 24, 2025 14:20
jorgetomtz added a commit that referenced this pull request Mar 27, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from 9646268 to 0b32546 Compare March 27, 2025 16:43
jorgetomtz added a commit that referenced this pull request Mar 27, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from 0b32546 to bdac44d Compare March 27, 2025 16:44
@jorgetomtz jorgetomtz marked this pull request as ready for review March 27, 2025 16:47
@jorgetomtz jorgetomtz requested a review from a team as a code owner March 27, 2025 16:47
@jorgetomtz jorgetomtz requested a review from juanjux March 27, 2025 16:47
@brettlangdon brettlangdon changed the title Add vpa template configuration ci: add vpa template configuration Mar 28, 2025
@brettlangdon brettlangdon added the changelog/no-changelog A changelog entry is not required for this PR. label Mar 28, 2025
@jorgetomtz jorgetomtz force-pushed the jorgetomtz/test-vpa-template-config branch from ca9d041 to ce8a799 Compare April 1, 2025 15:57
@erikayasuda erikayasuda enabled auto-merge (squash) April 3, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants