Skip to content

Update version loading for cpp_kong#6409

Open
adeshkumar1 wants to merge 2 commits intomainfrom
cpp-kong-version-correction
Open

Update version loading for cpp_kong#6409
adeshkumar1 wants to merge 2 commits intomainfrom
cpp-kong-version-correction

Conversation

@adeshkumar1
Copy link
Contributor

@adeshkumar1 adeshkumar1 commented Mar 2, 2026

  • load-binary.sh: Clone from main instead of downloading tip .rock. Supports $LIBRARY_TARGET_BRANCH.
  • install_ddtrace.sh: Fallback downloads latest release as a source tarball instead of git cloning. Only dev builds (with
    .git present) get the -dev+<sha> version suffix.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

CODEOWNERS have been resolved as:

utils/build/docker/cpp_kong/install_ddtrace.sh                          @DataDog/system-tests-core
utils/scripts/load-binary.sh                                            @DataDog/system-tests-core

@datadog-datadog-prod-us1-2
Copy link

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

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from 768f677 to c3513b5 Compare March 2, 2026 22:44
@adeshkumar1 adeshkumar1 marked this pull request as ready for review March 3, 2026 15:24
@adeshkumar1 adeshkumar1 requested a review from a team as a code owner March 3, 2026 15:24
@adeshkumar1 adeshkumar1 requested a review from cbeauchesne March 3, 2026 15:24
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4894cc28d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +313 to +314
git clone --depth 1 --branch "$LIBRARY_TARGET_BRANCH" \
https://github.com/DataDog/kong-plugin-ddtrace.git kong-plugin-ddtrace

Choose a reason for hiding this comment

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

P2 Badge Handle existing kong-plugin-ddtrace checkout before cloning

The new cpp_kong path always executes git clone ... kong-plugin-ddtrace, but there is no cleanup/update path when that directory already exists from a previous run. In that local workflow (for example, rerunning with a different LIBRARY_TARGET_BRANCH), git clone fails with destination path 'kong-plugin-ddtrace' already exists and is not an empty directory, so the script cannot refresh the binary without manual directory deletion.

Useful? React with 👍 / 👎.

@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from c4894cc to 0435fff Compare March 3, 2026 15:39
@adeshkumar1 adeshkumar1 requested a review from cbeauchesne March 3, 2026 15:45
@adeshkumar1
Copy link
Contributor Author

/remove

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Mar 3, 2026

View all feedbacks in Devflow UI.

2026-03-03 19:31:52 UTC ℹ️ Start processing command /remove


2026-03-03 19:31:54 UTC ℹ️ Devflow: /remove

PLUGIN_VERSION=$(grep -oP 'VERSION\s*=\s*"\K[^"]+' \
kong-plugin-ddtrace/kong/plugins/ddtrace/handler.lua)

if [ -d kong-plugin-ddtrace/.git ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

When running from release, the repo will be also present, and the -dev pre-release tag will be added, see https://github.com/DataDog/system-tests/actions/runs/22676081296/job/65767017910?pr=6409#step:19:22

@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from 3ad0b60 to ee4d5b3 Compare March 5, 2026 17:18
@adeshkumar1
Copy link
Contributor Author

FYI: v0.2.4 is now the latest official release for kong-plugin-ddtrace

@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from ee4d5b3 to 07731f4 Compare March 5, 2026 18:30
@cbeauchesne cbeauchesne marked this pull request as draft March 6, 2026 11:18
@cbeauchesne
Copy link
Collaborator

Converting to draft to unstress my notifications queue, please set it back to normal once i's readuy for review

@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from 07731f4 to b1a8131 Compare March 6, 2026 18:03
@adeshkumar1 adeshkumar1 force-pushed the cpp-kong-version-correction branch from b1a8131 to f0c89d3 Compare March 6, 2026 18:03
@adeshkumar1 adeshkumar1 marked this pull request as ready for review March 6, 2026 20:04
@adeshkumar1 adeshkumar1 requested a review from cbeauchesne March 6, 2026 20:04
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0c89d3ebf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if [ "$KONG_IS_RELEASE" = "false" ]; then
auth_header=$(get_authentication_header)
COMMIT_SHA=$(eval "curl --silent --fail --retry 3 $auth_header \
https://api.github.com/repos/DataDog/kong-plugin-ddtrace/commits/main" \

Choose a reason for hiding this comment

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

P2 Badge Use checked-out plugin commit for dev version suffix

load-binary.sh now supports LIBRARY_TARGET_BRANCH for cpp_kong, but the version suffix logic here always reads DataDog/kong-plugin-ddtrace/commits/main, so the emitted SYSTEM_TESTS_LIBRARY_VERSION can point to a different revision than the plugin actually copied into the image whenever a non-main branch is tested (or main moves between clone and build). That mislabels build metadata and can misattribute experiment results during triage.

Useful? React with 👍 / 👎.

Comment on lines +314 to +315
git clone --depth 1 --branch "$LIBRARY_TARGET_BRANCH" \
https://github.com/DataDog/kong-plugin-ddtrace.git kong-plugin-ddtrace

Choose a reason for hiding this comment

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

P2 Badge Clear old rock artifacts before cloning cpp_kong

This new clone path does not remove existing kong-plugin-ddtrace*.rock files from prior runs, and install_ddtrace.sh still prioritizes .rock artifacts over kong-plugin-ddtrace/ when both are present. In that common rerun scenario, the build silently uses the stale rock instead of the freshly cloned branch, so tests run against unintended plugin code.

Useful? React with 👍 / 👎.

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.

2 participants