Skip to content

chore: raise compressed layer size limit to 10 MB - #857

Merged
joeyzhao2018 merged 2 commits into
mainfrom
joey/bump-layer-size-limit
Sep 24, 2026
Merged

joeyzhao2018 merged 2 commits into
mainfrom
joey/bump-layer-size-limit

Conversation

@joeyzhao2018

@joeyzhao2018 joeyzhao2018 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Raises MAX_LAYER_COMPRESSED_SIZE_KB in scripts/check_layer_size.sh from 9231 KB to 10240 KB (10 MB).

Motivation

check-layer-size fails on every amd64 runtime from 3.11 to 3.14 as soon as the build resolves ddtrace 4.15.x (released 2026-09-16). This blocks all PRs, and main would fail the same way. arm64 still passes.

amd64 layer (zipped) ddtrace 4.12.0 ddtrace 4.14.0 ddtrace 4.15.2
py3.11 8433 KB 8825 KB 9272 KB
py3.12 8408 KB 8793 KB 9238 KB
py3.13 8451 KB 8837 KB 9283 KB
py3.14 8666 KB 9077 KB 9538 KB

Almost all of the 4.14 → 4.15 growth is in ddtrace's Rust extension, ddtrace/internal/native/_native.so (+401 KB compressed). libddwaf.so adds another +60 KB. I measured each commit's CI wheel against its parent (cp312 x86_64, compressed). The largest contributors:

Δ dd-trace-py PR
+233 KB DataDog/dd-trace-py#19631: enables the agentless feature of libdd-remote-config
+88 KB DataDog/dd-trace-py#19580: libdatadog v41
+62 KB DataDog/dd-trace-py#19487: debugger uses the libdatadog sender
+60 KB DataDog/dd-trace-py#20331: libddwaf 2.1.0

Upstream gates didn't catch this:

  • The serverless-tools per-PR size check has no merge target on dd-trace-py branch pipelines, so it compares the layer against itself.
  • It also builds from the ddtrace_serverless wheel rather than the PyPI ddtrace wheel that this layer ships.

This is a short-term unblock. The size regression should be addressed upstream.

Testing Guidelines

  • 10240 KB covers the largest layer today (py3.14-amd64, 9538 KB) with about 700 KB of headroom. At recent growth (about 150 KB of _native.so per ddtrace minor release), that's several releases of runway, so fixing the size upstream can happen without re-blocking CI.
  • The dd-trace-py main wheel (4.16.0rc1) has the same _native.so size as 4.15.2, so the next release shouldn't immediately exceed the new limit.
  • The unzipped check (25600 KB) is unchanged. It was skipped on the failing jobs, but py3.14-arm64 is 22987 KB unzipped, and amd64 has historically run 180–310 KB above arm64.
  • The check-layer-size jobs on this PR should pass for all runtimes.

Additional Notes

The previous bump was #760 (9216 → 9231 KB).

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

🤖 Generated with Claude Code

ddtrace 4.15.x grew the amd64 layers past the 9231 KB limit (3.14-amd64
is 9538 KB, 3.11-3.13 are 9238-9283 KB). Nearly all of the growth is in
ddtrace's native extension (_native.so, +401 KB compressed), led by
DataDog/dd-trace-py#19631 (+233 KB).

Raise the limit to 9.5 MB to unblock CI while the size regression is
addressed upstream.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@datadog-datadog-prod-us1

This comment has been minimized.

@purple4reina purple4reina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love how very specific our math has become here.... lol

Leave ~700 KB of headroom over the current largest layer (py3.14-amd64,
9538 KB) so the next few ddtrace releases don't immediately re-block CI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@joeyzhao2018 joeyzhao2018 changed the title chore: raise compressed layer size limit to 9728 KB chore: raise compressed layer size limit to 10 MB Sep 23, 2026
@joeyzhao2018
joeyzhao2018 merged commit 9990e88 into main Sep 24, 2026
104 checks passed
@joeyzhao2018
joeyzhao2018 deleted the joey/bump-layer-size-limit branch September 24, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants