Re-runs the RC1 checklist on GA and adds SSL-bundle options on the LDAP client, the migrator fail switch, OpenTelemetry convention spellings, migrated RestClient/RestTestClient, compiler removal warnings for RestTemplate, TestRestTemplate and Pulsar, and jar/BOM probes. Transcripts in output/. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5G8Z7wYEQnr5w4DfG
144 lines
8.0 KiB
Bash
Executable File
144 lines
8.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Reads facts straight out of the published Spring Boot 4.1.3 and 4.2.0 artifacts on Maven Central:
|
|
# output/10-config-defaults.txt defaults from META-INF/spring-configuration-metadata.json
|
|
# output/11-buildpack-defaults.txt default builder / run image constants (javap -constants)
|
|
# output/12-bom-versions.txt spring-boot-dependencies BOM properties, 4.1.3 vs 4.2.0
|
|
# Needs JDK 25 (javap), python3, curl, unzip.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
OLD=4.1.3; NEW=4.2.0
|
|
W=target/probe; mkdir -p "$W" output
|
|
M=https://repo1.maven.org/maven2/org/springframework/boot
|
|
|
|
fetch() { # <artifact> <version> <ext>
|
|
local f="$W/$1-$2.$3"
|
|
[ -s "$f" ] || curl -sfL -o "$f" "$M/$1/$2/$1-$2.$3"
|
|
echo "$f"
|
|
}
|
|
unpack() { # <artifact> <version> -> dir
|
|
local d="$W/x-$2/$1"
|
|
[ -d "$d" ] || { mkdir -p "$d"; unzip -q -o "$(fetch "$1" "$2" jar)" -d "$d"; }
|
|
echo "$d"
|
|
}
|
|
|
|
for v in "$OLD" "$NEW"; do for a in spring-boot-tomcat spring-boot-micrometer-observation spring-boot-opentelemetry spring-boot-buildpack-platform; do unpack $a $v >/dev/null; done; done
|
|
for a in spring-boot-amqp; do unpack $a $OLD >/dev/null; done
|
|
for a in spring-boot-rabbitmq spring-boot-amqp-rabbitmq; do unpack $a $NEW >/dev/null; done
|
|
|
|
# ---- 10: configuration metadata defaults -------------------------------------------------------
|
|
python3 - "$W" "$OLD" "$NEW" > output/10-config-defaults.txt <<'PY'
|
|
import json, sys, subprocess, os
|
|
W, OLD, NEW = sys.argv[1:4]
|
|
# (artifact in 4.1.3, artifact in 4.2.0, key in 4.1.3, key in 4.2.0)
|
|
ROWS = [
|
|
("spring-boot-tomcat", "spring-boot-tomcat", "server.tomcat.use-relative-redirects", "server.tomcat.servlet.use-relative-redirects"),
|
|
("spring-boot-tomcat", "spring-boot-tomcat", "server.tomcat.redirect-context-root", "server.tomcat.servlet.redirect-context-root"),
|
|
("spring-boot-amqp", "spring-boot-rabbitmq", "spring.rabbitmq.username", "spring.rabbitmq.username"),
|
|
("spring-boot-amqp", "spring-boot-rabbitmq", "spring.rabbitmq.password", "spring.rabbitmq.password"),
|
|
("spring-boot-amqp", "spring-boot-amqp-rabbitmq", "spring.rabbitmq.username", "spring.amqp.rabbitmq.username"),
|
|
("spring-boot-amqp", "spring-boot-amqp-rabbitmq", "spring.rabbitmq.password", "spring.amqp.rabbitmq.password"),
|
|
("spring-boot-amqp", "spring-boot-amqp-rabbitmq", "spring.rabbitmq.template.exchange", "spring.amqp.rabbitmq.template.exchange"),
|
|
("spring-boot-amqp", "spring-boot-amqp-rabbitmq", "spring.rabbitmq.template.routing-key", "spring.amqp.rabbitmq.template.routing-key"),
|
|
("spring-boot-micrometer-observation", "spring-boot-micrometer-observation", "management.observations.conventions", "management.observations.conventions"),
|
|
("spring-boot-opentelemetry", "spring-boot-opentelemetry", "management.opentelemetry.otlp.endpoint", "management.opentelemetry.otlp.endpoint"),
|
|
]
|
|
def load(art, ver):
|
|
d = os.path.join(W, f"x-{ver}", art, "META-INF", "spring-configuration-metadata.json")
|
|
if not os.path.exists(d):
|
|
return {}
|
|
return {p["name"]: p for p in json.load(open(d))["properties"]}
|
|
print(f"# 10-config-defaults (spring-configuration-metadata.json from the {OLD} and {NEW} jars)")
|
|
print(f"{'key':<52} {OLD:<16} {NEW}")
|
|
for a_old, a_new, k_old, k_new in ROWS:
|
|
o = load(a_old, OLD).get(k_old); n = load(a_new, NEW).get(k_new)
|
|
def show(p, key):
|
|
if p is None: return "(absent)"
|
|
d = p.get("defaultValue", "(none)")
|
|
d = repr(d) if d != "(none)" else d
|
|
dep = p.get("deprecation")
|
|
return d + (" [deprecated]" if dep else "")
|
|
label = k_old if k_old == k_new else f"{k_old} -> {k_new}"
|
|
print(f"{label}")
|
|
print(f"{'':<4}{OLD}: {show(o, k_old):<24} {NEW}: {show(n, k_new)}")
|
|
PY
|
|
|
|
# ---- 11: buildpack defaults --------------------------------------------------------------------
|
|
{
|
|
echo "# 11-buildpack-defaults (javap -constants on BuildRequest in spring-boot-buildpack-platform)"
|
|
for v in "$OLD" "$NEW"; do
|
|
d=$(unpack spring-boot-buildpack-platform "$v")
|
|
echo "[$v]"
|
|
javap -constants -p -cp "$d" org.springframework.boot.buildpack.platform.build.BuildRequest 2>&1 \
|
|
| grep -E 'static final java.lang.String DEFAULT_' | sed -E 's/^ +static final java.lang.String //'
|
|
done
|
|
} > output/11-buildpack-defaults.txt
|
|
|
|
# ---- 12: BOM versions --------------------------------------------------------------------------
|
|
python3 - "$W" "$OLD" "$NEW" > output/12-bom-versions.txt <<'PY'
|
|
import re, sys, subprocess, os
|
|
W, OLD, NEW = sys.argv[1:4]
|
|
def props(v):
|
|
f = os.path.join(W, f"spring-boot-dependencies-{v}.pom")
|
|
txt = open(f).read()
|
|
block = re.search(r"<properties>(.*?)</properties>", txt, re.S).group(1)
|
|
return dict(re.findall(r"<([A-Za-z0-9.\-]+)>([^<]+)</\1>", block))
|
|
for v in (OLD, NEW):
|
|
subprocess.run(["curl", "-sfL", "-o", os.path.join(W, f"spring-boot-dependencies-{v}.pom"),
|
|
f"https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/{v}/spring-boot-dependencies-{v}.pom"], check=True)
|
|
o, n = props(OLD), props(NEW)
|
|
WANT = ["spring-framework.version","spring-security.version","spring-data-bom.version","spring-batch.version",
|
|
"spring-kafka.version","spring-amqp.version","spring-integration.version","spring-graphql.version",
|
|
"spring-session.version","spring-ldap.version","hibernate.version","jackson-bom.version","jackson-2-bom.version",
|
|
"micrometer.version","micrometer-tracing.version","opentelemetry.version","netty.version","tomcat.version",
|
|
"jetty.version","flyway.version","junit-jupiter.version","mockito.version","assertj.version","lettuce.version",
|
|
"thymeleaf.version","logback.version","log4j2.version","snakeyaml.version","kotlin.version","h2.version",
|
|
"testcontainers.version","reactor-bom.version","janino.version"]
|
|
print(f"# 12-bom-versions (spring-boot-dependencies POM properties)")
|
|
print(f"{'property':<28}{OLD:<18}{NEW}")
|
|
for k in WANT:
|
|
print(f"{k:<28}{o.get(k,'(not managed)'):<18}{n.get(k,'(not managed)')}")
|
|
changed = [k for k in n if k in o and n[k] != o[k]]
|
|
added = [k for k in n if k not in o]; removed = [k for k in o if k not in n]
|
|
print(f"properties: {len(o)} in {OLD}, {len(n)} in {NEW}; changed {len(changed)}, added {len(added)}, removed {len(removed)}")
|
|
print("removed: " + ", ".join(sorted(removed)))
|
|
print("added: " + ", ".join(sorted(added)))
|
|
PY
|
|
|
|
|
|
# ---- 15: what the AMQP starter names mean ------------------------------------------------------
|
|
python3 - "$W" "$OLD" "$NEW" > output/15-amqp-starters.txt <<'PY'
|
|
import re, sys, urllib.request
|
|
W, OLD, NEW = sys.argv[1:4]
|
|
def pom(art, ver):
|
|
url = f"https://repo1.maven.org/maven2/org/springframework/boot/{art}/{ver}/{art}-{ver}.pom"
|
|
try:
|
|
return urllib.request.urlopen(url).read().decode()
|
|
except Exception:
|
|
return None
|
|
print("# 15-amqp-starters (published POMs: description and boot-level dependency)")
|
|
for ver in (OLD, NEW):
|
|
print(f"[{ver}]")
|
|
for art in ("spring-boot-starter-amqp", "spring-boot-starter-rabbitmq", "spring-boot-starter-amqp-rabbitmq"):
|
|
t = pom(art, ver)
|
|
if t is None:
|
|
print(f" {art:<36} (not published in {ver})")
|
|
continue
|
|
desc = re.search(r"<description>(.*?)</description>", t, re.S).group(1).strip()
|
|
deps = [d for d in re.findall(r"<artifactId>(spring-boot-[a-z0-9-]+)</artifactId>", t)[1:] if d != "spring-boot-starter"]
|
|
print(f" {art:<36} \"{desc}\" -> {', '.join(deps)}")
|
|
PY
|
|
|
|
# ---- 16: properties-migrator failure switch ----------------------------------------------------
|
|
{
|
|
echo "# 16-migrator-fail-switch (spring-boot-properties-migrator $NEW)"
|
|
d=$(unpack spring-boot-properties-migrator "$NEW")
|
|
python3 - "$d" <<'PY'
|
|
import json, sys
|
|
d = json.load(open(sys.argv[1] + "/META-INF/spring-configuration-metadata.json"))
|
|
for p in d["properties"]:
|
|
print(f"{p['name']} default={p.get('defaultValue')}")
|
|
PY
|
|
javap -constants -p -cp "$d" 'org.springframework.boot.context.properties.migrator.PropertiesMigrationListener$Fail' 2>&1 \
|
|
| grep -E 'public static final' | sed -E 's/.*Fail //;s/;//' | sed 's/^/ value: /'
|
|
} > output/16-migrator-fail-switch.txt
|