Skip to content

Add prepare-local-build.sh helper for local tracer testing#6499

Draft
bm1549 wants to merge 1 commit intomainfrom
brian.marks/prepare-local-build
Draft

Add prepare-local-build.sh helper for local tracer testing#6499
bm1549 wants to merge 1 commit intomainfrom
brian.marks/prepare-local-build

Conversation

@bm1549
Copy link
Contributor

@bm1549 bm1549 commented Mar 13, 2026

Motivation

Running system-tests against locally checked-out tracer repos requires knowing the per-language binaries/ conventions (JARs for Java, volume-mount pointer files for Node.js/Python, shallow clones for Go/Ruby/Rust/C++, tarballs for .NET/PHP). This script automates that setup.

Changes

Adds utils/scripts/prepare-local-build.sh — a helper that handles the copy/clone/pointer-file step for each of the 9 supported languages.

Features:

  • prepare-local-build.sh <lang> <path> — prepares binaries/ for the given language
  • prepare-local-build.sh --clean [lang] — removes binaries for one or all languages
  • prepare-local-build.sh --status — shows what's currently configured in binaries/
  • prepare-local-build.sh --list — lists supported languages and methods
  • --method flag for languages with multiple options (e.g., Node.js local vs clone, Python local vs wheel vs pip)
  • Auto-builds Java JARs with Gradle if not already present
  • Prints actionable next-step commands after setup

Follows the same shell style as utils/scripts/watch.sh (set -euo pipefail, error/die helpers).

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified? N/A
  • A scenario is added, removed or renamed? N/A

🤖 Generated with Claude Code

Adds a script that automates the binaries/ setup for running system-tests
against locally checked-out tracer repos. Supports all 9 languages with
their respective methods (JARs, volume mounts, shallow clones, tarballs).
Includes --clean, --status, and --list flags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

utils/scripts/prepare-local-build.sh                                    @DataDog/system-tests-core

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 13, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 18 Tests failed

tests.appsec.iast.sink.test_unvalidated_redirect.TestUnvalidatedRedirect.test_secure[uwsgi-poc] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Request failed with status code None
assert None == 200
 +  where None = HttpResponse(status_code:None, headers:{}, text:None).status_code

self = <tests.appsec.iast.sink.test_unvalidated_redirect.TestUnvalidatedRedirect object at 0x7f72884398e0>

    def test_secure(self):
>       super().test_secure()

tests/appsec/iast/sink/test_unvalidated_redirect.py:47: 
...
tests.appsec.test_blocking_addresses.Test_Blocking_client_ip.test_blocking_before[envoy] from system_tests_suite (Datadog) (Fix with Cursor)
ValueError: No appsec event validate this condition

self = <tests.appsec.test_blocking_addresses.Test_Blocking_client_ip object at 0x7f6662fa3470>

    def test_blocking_before(self):
        """Test that blocked requests are blocked before being processed"""
        # second request should block and must not set the tag in span
        assert self.block_req2.status_code == 403
>       interfaces.library.assert_waf_attack(self.block_req2, rule="blk-001-001")

...
tests.appsec.test_blocking_addresses.Test_Blocking_client_ip.test_blocking[envoy] from system_tests_suite (Datadog) (Fix with Cursor)
ValueError: No appsec event validate this condition

self = <tests.appsec.test_blocking_addresses.Test_Blocking_client_ip object at 0x7f6662fa33b0>

    def test_blocking(self):
        """Can block the request forwarded for the ip"""
    
        assert self.rm_req_block.status_code == 403
>       interfaces.library.assert_waf_attack(self.rm_req_block, rule="blk-001-001")

...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4e18f2d | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

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.

1 participant