Skip to content

ci: per-component build cache #13674

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gnufede
Copy link
Member

@gnufede gnufede commented Jun 16, 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

Copy link
Contributor

github-actions bot commented Jun 16, 2025

CODEOWNERS have been resolved as:

scripts/build_cache.py                                                  @DataDog/apm-core-python
scripts/component_config.py                                             @DataDog/apm-core-python
scripts/get_component_hashes.py                                         @DataDog/apm-core-python
scripts/gen_gitlab_config.py                                            @DataDog/apm-core-python
scripts/get-native-sources-hash.sh                                      @DataDog/apm-core-python
setup.py                                                                @DataDog/python-guild

elif args.command == 'check':
should_rebuild = cache.should_rebuild_extension(args.extension)
print(f"Extension {args.extension} should be rebuilt: {should_rebuild}")
exit(0 if not should_rebuild else 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

do not use exit() (...read more)

Use sys.exit() instead of exit(). Exit is a builtin and done mostly for the console. sys.exit() is done for program with a proper return argument (see documentation).

Learn More

View in Datadog  Leave us feedback  Documentation

Copy link
Contributor

github-actions bot commented Jun 16, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

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

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

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

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.991 ms (0.71%)
ddtrace.bootstrap.sitecustomize 1.314 ms (0.47%)
ddtrace.bootstrap.preload 1.314 ms (0.47%)
ddtrace.internal.remoteconfig.client 0.632 ms (0.23%)
ddtrace 0.676 ms (0.24%)
ddtrace.internal._unpatched 0.030 ms (0.01%)
json 0.030 ms (0.01%)
json.decoder 0.030 ms (0.01%)
re 0.030 ms (0.01%)
enum 0.030 ms (0.01%)
types 0.030 ms (0.01%)

needs:
- job: build_base_venv
artifacts: true
{chr(10).join(f" - job: build_{component}" + chr(10) + " artifacts: true" for component in all_components)}
Copy link
Contributor

Choose a reason for hiding this comment

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

🟠 Code Quality Violation

use f-string or .format to format strings (...read more)

Concatenation of multiple strings is not efficient and make the code hard to read and understand.

Instead of concatenating multiple strings, use an f-string or a format string.

Learn More

View in Datadog  Leave us feedback  Documentation

@pr-commenter
Copy link

pr-commenter bot commented Jun 16, 2025

Benchmarks

Benchmark execution time: 2025-06-16 16:44:42

Comparing candidate commit 0480d38 in PR branch gnufede/iw-build-cache-improvements with baseline commit 5692392 in branch main.

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

scenario:iastaspectsospath-ospathjoin_aspect

  • 🟥 execution_time [+888.792ns; +971.718ns] or [+14.505%; +15.858%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant