Skip to content

Clean commits that include non-ASCII characters - #12179

Open
sarahchen6 wants to merge 5 commits into
masterfrom
sarahchen6/cherry-commits
Open

Clean commits that include non-ASCII characters#12179
sarahchen6 wants to merge 5 commits into
masterfrom
sarahchen6/cherry-commits

Conversation

@sarahchen6

@sarahchen6 sarahchen6 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Remove all non-ASCII characters from "CI_COMMIT_TITLE", "CI_COMMIT_MESSAGE", and "CI_COMMIT_DESCRIPTION" in Gradle smoke tests.

test_smoke: [8, 8/8] job failure when running against commit that starts with 🍒 and no fix: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-java/-/jobs/1938746622

test_smoke: [8, 8/8] job failure when running against commit that starts with 🍒 and fix: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-java/-/jobs/1938934433

Motivation

Gradle 4.10.3's native-platform crashes on Linux when restoring non-ASCII environment values for test_smoke: [8, 8/8] job, as seen in failures in the two latest patch releases with 🍒-prefixed commits:

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@sarahchen6
sarahchen6 force-pushed the sarahchen6/cherry-commits branch from 2367191 to 6be21d4 Compare August 10, 2026 19:04
@dd-octo-sts

dd-octo-sts Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.81 s 14.70 s [-0.3%; +1.8%] (no difference)
startup:insecure-bank:tracing:Agent 13.65 s 13.63 s [-0.7%; +0.9%] (no difference)
startup:petclinic:appsec:Agent 16.39 s 16.64 s [-5.9%; +2.9%] (no difference)
startup:petclinic:iast:Agent 16.84 s 16.84 s [-0.9%; +0.9%] (no difference)
startup:petclinic:profiling:Agent 16.59 s 16.72 s [-2.0%; +0.4%] (no difference)
startup:petclinic:sca:Agent 16.79 s 16.49 s [+0.7%; +3.0%] (maybe worse)
startup:petclinic:tracing:Agent 15.99 s 16.07 s [-1.4%; +0.4%] (no difference)

Commit: 66dfc3a3 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@sarahchen6 sarahchen6 changed the title Address commits that start with emojis Clean commits that include non-ASCII characters Aug 10, 2026
@sarahchen6 sarahchen6 added type: bug fix Bug fix comp: testing Testing tag: no release notes Changes to exclude from release notes labels Aug 10, 2026
@sarahchen6
sarahchen6 marked this pull request as ready for review August 10, 2026 20:26
@sarahchen6
sarahchen6 requested a review from a team as a code owner August 10, 2026 20:26
Comment on lines +19 to +25
// Gradle 4.10.3's native-platform crashes on Linux when restoring non-ASCII environment values, so remove all non-ASCII chars.
["CI_COMMIT_TITLE", "CI_COMMIT_MESSAGE", "CI_COMMIT_DESCRIPTION"].each { name ->
String value = environment[name]
if (value != null) {
environment[name] = value.replaceAll("[^\\p{ASCII}]", "")
}
}

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD Aug 10, 2026

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.

Just curious if this should be on test level?
Maybe similar to the fix I recently did to exclude noise env vars: in PR #11180

public static final Set<String> NOISY_ENVIRONMENT_VARIABLES = ImmutableSet.of('CI_COMMIT_MESSAGE', 'CI_COMMIT_DESCRIPTION')

We may probably exclude all CI_xxx env variables as noisy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it needs to be at this level to pre-date the Gradle daemon starting 🤔 but yes we could entirely remove the CI_* variables instead of just cleaning them!

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 think we start Gradle 4.10.3 from code. You can quickly check just by commenting your fix and excluding all CI_xxx vars in code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreed, I would rather do it in the test code to avoid messing with gradle task definition and their cache when possible 🙏

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It looks like removing env vars from the "Test" task does not affect the cache, as "Gradle does not track changes in environment variables for tasks." (ref).

But otherwise sure trying out removing the variables in the tests here: 4ba8e46 (pipeline)!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removing from just the tests fails: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-java/-/jobs/1941794160

The Gradle daemon is started (I think here) before the env configs are applied (here), and once the non-ASCII is passed to the daemon, it crashes. I'll revert back to the original change for now, but open to other suggestions (or perhaps there is a better place to remove the variables).

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.

Oh, got it.. we actually have 2 issues that looks similar and confused me...

  1. We have smoke-app and CI_xxx variables leaked into it's logs.
  2. We have Gradle itself and CI_xxx variables also leaked into Gradle and affected it.

Just curious if we should delete CI_xxx variables instead of tweaking them? or maybe we can somehow prevent them at all? maybe on GitLab level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes we can delete all the variables too like I mentioned above. I don't particularly have a preference - I was just implementing a minimal fix here.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot 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.

Datadog Autotest: PASS

More details

The configured Gradle Test environment strips emoji, accented Latin, CJK, and supplementary Unicode from all three commit metadata variables while preserving ASCII and unset values, including independent-variable handling. This directly exercises the environment passed to smoke-test workers and found no output-shape regression.

Was this helpful? React 👍 or 👎

📊 Validated against 7 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 2ceeb08 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

❔ question: ‏Can this break gradle task cache?

EDIT: I commented later in the existing thread. I can’t remove this comment any more 😓

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.93% (-0.03%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 66dfc3a | Docs | Datadog PR Page | Give us feedback!

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

Labels

comp: testing Testing tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants