Skip to content

Commit 670cd91

Browse files
authored
Merge branch 'main' into fix-gradle-caching
2 parents 3266096 + 9a274e8 commit 670cd91

222 files changed

Lines changed: 2161 additions & 919 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/draft-release-notes.agent.md

Lines changed: 0 additions & 122 deletions
This file was deleted.

.github/agents/knowledge/config-property-stability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ must be communicated through:
6767
(`otel.instrumentation.…`) since that is what most users configure today:
6868

6969
```java
70-
boolean captureEventName = config.getBoolean("capture_event_name/development", false);
71-
if (captureEventName) {
70+
boolean oldSetting = config.getBoolean("old_setting/development", false);
71+
if (oldSetting) {
7272
logger.warning(
73-
"The otel.instrumentation.logback-appender.experimental.capture-event-name setting is"
73+
"The otel.instrumentation.<module>.experimental.old-setting setting is"
7474
+ " deprecated and will be removed in a future version.");
7575
}
7676
```

.github/scripts/code-review/build-review-matrix.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def parse_modules() -> list[tuple[str, str]]:
3939
pairs = []
4040
for entry in sorted(raw):
4141
parts = entry.split(":")
42+
# Skip shared/helper modules (e.g. "cdi-testing") that don't follow the
43+
# <library>:<variant> layout used for real instrumentation modules.
44+
if len(parts) < 2:
45+
continue
4246
module_dir = "instrumentation/" + "/".join(parts)
4347
# Gradle module name: second-to-last:last
4448
gradle_name = f"{parts[-2]}:{parts[-1]}"
Lines changed: 13 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash -e
22

3+
# this has mostly been replaced by .github/scripts/draft-release-notes/draft-release-notes.py
4+
# keeping this around as a backup since that script relies on Copilot CLI
5+
36
version=$("$(dirname "$0")/get-version.sh")
47

58
if [[ $version =~ ([0-9]+)\.([0-9]+)\.0 ]]; then
@@ -27,9 +30,10 @@ echo "# Changelog"
2730
echo
2831
echo "## Unreleased"
2932
echo
30-
31-
"$(dirname "$0")/extract-labeled-prs.sh" "$range"
32-
33+
echo "### ⚠️ Breaking changes to non-stable APIs"
34+
echo
35+
echo "### 🚫 Deprecations"
36+
echo
3337
echo "### 🌟 New javaagent instrumentation"
3438
echo
3539
echo "### 🌟 New library instrumentation"
@@ -38,100 +42,10 @@ echo "### 📈 Enhancements"
3842
echo
3943
echo "### 🛠️ Bug fixes"
4044
echo
41-
echo "### 🧰 Tooling"
42-
echo
43-
44-
# Group commits by file type and @Deprecated detection
45-
declare -A src_main_commits
46-
declare -A no_src_main_commits
47-
declare -A deprecated_added_commits
48-
declare -A deprecated_removed_commits
49-
50-
format_commit_msg() {
51-
git log --format=%s -n 1 "$1" | sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'
52-
}
53-
54-
while IFS= read -r commit_hash; do
55-
files=$(git diff-tree --no-commit-id --name-only -r "$commit_hash")
56-
57-
has_src_main=false
58-
59-
while IFS= read -r file; do
60-
if [[ $file =~ /src/main/ ]] && [[ ! $file =~ ^smoke-tests/ ]] && [[ ! $file =~ ^smoke-tests-otel-starter/ ]] && [[ ! $file =~ /testing/ ]] && [[ ! $file =~ -testing/ ]] && [[ ! $file =~ ^instrumentation-docs/ ]]; then
61-
has_src_main=true
62-
break
63-
fi
64-
done <<< "$files"
65-
66-
commit_msg=$(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')
67-
68-
# Check diff for @Deprecated additions/removals in src/main Java files
69-
# Count added vs removed to distinguish real changes from moves/refactors
70-
diff_output=$(git diff-tree -p "$commit_hash" -- '*/src/main/**/*.java' 2>/dev/null || true)
71-
72-
added_count=$(echo "$diff_output" | grep -cP '^\+(?!\+).*@Deprecated' || true)
73-
removed_count=$(echo "$diff_output" | grep -cP '^-(?!-).*@Deprecated' || true)
7445

75-
# Net new @Deprecated annotations = new deprecation
76-
if [[ $added_count -gt $removed_count ]]; then
77-
deprecated_added_commits["$commit_hash"]=1
78-
fi
79-
# Net removed @Deprecated annotations = removed deprecated API (breaking)
80-
if [[ $removed_count -gt $added_count ]]; then
81-
deprecated_removed_commits["$commit_hash"]=1
82-
fi
83-
84-
# Categorize commit
85-
if [[ $has_src_main == true ]]; then
86-
src_main_commits["$commit_hash"]="$commit_msg"
87-
else
88-
no_src_main_commits["$commit_hash"]="$commit_msg"
89-
fi
90-
done < <(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range")
91-
92-
# Output @Deprecated-based breaking changes (removed @Deprecated = removed deprecated API)
93-
if [[ ${#deprecated_removed_commits[@]} -gt 0 ]]; then
94-
echo "#### Possible breaking changes (diff removes @Deprecated)"
95-
echo
96-
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
97-
if [[ -n ${deprecated_removed_commits[$commit_hash]} ]]; then
98-
echo "- $(format_commit_msg "$commit_hash")"
99-
fi
100-
done
101-
echo
102-
fi
103-
104-
# Output @Deprecated-based deprecations (added @Deprecated = new deprecation)
105-
if [[ ${#deprecated_added_commits[@]} -gt 0 ]]; then
106-
echo "#### Possible deprecations (diff adds @Deprecated)"
107-
echo
108-
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
109-
if [[ -n ${deprecated_added_commits[$commit_hash]} ]]; then
110-
echo "- $(format_commit_msg "$commit_hash")"
111-
fi
112-
done
113-
echo
114-
fi
115-
116-
# Output grouped commits
117-
if [[ ${#src_main_commits[@]} -gt 0 ]]; then
118-
echo "#### Changes with src/main updates"
119-
echo
120-
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
121-
if [[ -n ${src_main_commits[$commit_hash]} ]] && [[ -z ${deprecated_added_commits[$commit_hash]} ]] && [[ -z ${deprecated_removed_commits[$commit_hash]} ]]; then
122-
echo "- $(format_commit_msg "$commit_hash")"
123-
fi
124-
done
125-
echo
126-
fi
127-
128-
if [[ ${#no_src_main_commits[@]} -gt 0 ]]; then
129-
echo "#### Changes without src/main updates"
130-
echo
131-
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
132-
if [[ -n ${no_src_main_commits[$commit_hash]} ]] && [[ -z ${deprecated_added_commits[$commit_hash]} ]] && [[ -z ${deprecated_removed_commits[$commit_hash]} ]]; then
133-
echo "- $(format_commit_msg "$commit_hash")"
134-
fi
135-
done
136-
echo
137-
fi
46+
git log --reverse \
47+
--perl-regexp \
48+
--author='^(?!renovate\[bot\] )' \
49+
--pretty=format:"- %s" \
50+
"$range" \
51+
| sed -E 's,\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'

0 commit comments

Comments
 (0)