-
Require $version. If it is absent, ask for the Trino version.
-
Resolve the skill directory from the repository root:
repo_root="$(git rev-parse --show-toplevel)"
skill_dir="${repo_root}/.agents/skills/trino-release"
-
Run:
"${skill_dir}/scripts/preflight.sh" "$version"
-
If preflight fails, report stderr and stop.
-
Parse the successful stdout as key=value lines. Important keys:
requested_version, current_version, case, target_jdk,
current_jdk, local_java_major, release_branch_exists_local,
release_branch_exists_origin, release_branch_for_current_exists_local,
release_branch_for_current_exists_origin,
release_branch_for_current_local_sha,
release_branch_for_current_origin_sha, preserve_branch_push_needed,
local_existing_tags, remote_existing_tags, existing_tags, and
next_tag. existing_tags is the de-duplicated union of local and remote
release tags.
-
Enforce the common JDK gate before editing:
if local_java_major != target_jdk, tell the user to install/select the
target major JDK, for example with sdk install java <major> or
sdk use java <installed-version>, then stop.
-
Run git switch main. Preflight already verified a clean tree and
synchronized main.
-
Preserve the current release line:
- If
release_branch_for_current_exists_origin=true, do not create or
report a preserve-branch push command.
- If origin does not have
release/trino-M and the local branch does not
exist, run git branch release/trino-M HEAD while staying on main.
- If origin does not have it but the local branch already exists, do not
recreate it. Set final reporting to include its push command.
-
Read the official release notes for each version in (M, N] from
https://trino.io/docs/current/release/release-<version>.html.
Focus on General, Security, SPI, JDBC driver, breaking changes, and changes
related to trino-base-jdbc, trino-client, trino-jdbc, trino-parser,
trino-matching, trino-plugin-toolkit, and Airlift.
-
Before editing code, summarize the expected impact to the user.
-
Run:
"${skill_dir}/scripts/bump-version.sh" "$current_version" "$requested_version" "$target_jdk"
-
Review residual references printed by the script. Manually fix any legitimate
missed references; leave unrelated numbers untouched.
-
Run .github/scripts/bootstrap-trino-deps.sh.
-
Build in two stages:
mvn clean verify -DskipTests -Dair.check.skip-all=true
mvn clean verify
Use release notes and compiler/test failures to make the smallest compatible
code changes needed. If the full verify fails only because airstyle:check
reports formatting drift, run mvn airstyle:format, review the resulting
diff, then rerun mvn clean verify. If Checkstyle reports a mechanical
source-modernization rule from the new Trino/Airlift parent, make the
smallest syntax-only change and rerun the failing Maven stage.
-
Run the strict same-version remote Delta smoke release gate:
docker manifest inspect "trinodb/trino:${requested_version}" >/dev/null
Fail the release preparation with an exact reason if Docker is unavailable,
testing/remote-delta-smoke/run.sh is missing, or
trinodb/trino:${requested_version} has no Docker image manifest. Otherwise
run:
testing/remote-delta-smoke/run.sh
If the smoke fails, stop the release preparation and record the failing
command and target/remote-delta-smoke/ log directory.
-
Run the remote version smoke release gate:
-
Select remote version smoke versions:
read -r -a remote_version_smoke_versions < <("${skill_dir}/scripts/select-remote-version-smoke-versions.sh" "$requested_version")
-
Fail the release preparation with an exact reason if Docker is unavailable,
testing/remote-version-smoke/run.sh is missing, or either
trinodb/trino:${requested_version} or trinodb/trino:${remote_version}
has no Docker image manifest.
-
Otherwise run:
testing/remote-version-smoke/run.sh "$remote_version"
-
If the smoke fails, stop the release preparation. Record the remote
version, the failing command, and the log directory
target/remote-version-smoke/${requested_version}-to-${remote_version}/.
-
Report this only as a bounded remote version smoke gate, not as a cross-version
compatibility guarantee.
-
Commit on main:
-
If either release_branch_exists_local=true or
release_branch_exists_origin=true, stop. Report local_existing_tags,
remote_existing_tags, and existing_tags, then print only the re-release
command using next_tag, after switching/updating that existing release
branch manually.
-
Before branching or editing, run a backport impact review from main:
"${skill_dir}/scripts/backport-impact.sh" "$requested_version" "$current_version"
Use the helper output as evidence, not as an automatic decision. Review
official release notes in (N, M] for features added after N that current
main may depend on. Prioritize Add the ... type, Add support for,
Breaking change, Remove, Defunct, SPI, JDBC driver, Base JDBC,
connector API, configuration property, and Airlift lines. Search current
source, tests, docs, and smoke configs for matching Trino APIs, types,
properties, and EXPLAIN markers. Classify each likely issue before editing:
must-remove: type/API/feature first introduced after N, so unavailable in N.
signature-risk: connector or SPI method signatures changed across the gap.
runtime-config-risk: Docker/catalog/session properties may not exist in N.
test-expectation-risk: plan text or pushdown markers differ by version.
needs-compile-confirmation: release notes are suggestive but not decisive.
Summarize expected removals/adaptations to the user before the version bump.
For example, if release notes say a type was added in a version greater than
N and current code references that type, plan to remove or disable it on the
backport branch, then confirm with the target Trino artifacts and compiler.
-
Create and switch to the backport branch from main:
git switch -c "release/trino-N"
-
Run:
"${skill_dir}/scripts/bump-version.sh" "$current_version" "$requested_version" "$target_jdk"
-
Run .github/scripts/bootstrap-trino-deps.sh.
-
Build in two stages:
mvn clean verify -DskipTests -Dair.check.skip-all=true
mvn clean verify
-
Use the impact review and the actual compiler/test errors to make the minimal
compatibility changes required. If compilation fails because current main
code uses APIs missing from Trino N, inspect only the additional release notes
or upstream sources needed to explain the failing symbols. If the full verify
fails only because airstyle:check reports formatting drift, run
mvn airstyle:format, review the resulting diff, then rerun
mvn clean verify. If Checkstyle reports a mechanical
source-modernization rule from the selected Trino/Airlift parent, make the
smallest syntax-only change and rerun the failing Maven stage.
-
Run the strict same-version remote Delta smoke release gate:
docker manifest inspect "trinodb/trino:${requested_version}" >/dev/null
Fail the release preparation with an exact reason if Docker is unavailable,
testing/remote-delta-smoke/run.sh is missing, or
trinodb/trino:${requested_version} has no Docker image manifest. Otherwise
run:
testing/remote-delta-smoke/run.sh
If the smoke fails, stop the release preparation and record the failing
command and target/remote-delta-smoke/ log directory.
-
Run the remote version smoke release gate:
-
Select remote version smoke versions:
read -r -a remote_version_smoke_versions < <("${skill_dir}/scripts/select-remote-version-smoke-versions.sh" "$requested_version")
-
Fail the release preparation with an exact reason if Docker is unavailable,
testing/remote-version-smoke/run.sh is missing, or either
trinodb/trino:${requested_version} or trinodb/trino:${remote_version}
has no Docker image manifest.
-
Otherwise run:
testing/remote-version-smoke/run.sh "$remote_version"
-
If the smoke fails, stop the release preparation. Record the remote
version, the failing command, and the log directory
target/remote-version-smoke/${requested_version}-to-${remote_version}/.
-
Report this only as a bounded remote version smoke gate, not as a cross-version
compatibility guarantee.
-
Commit on the backport branch:
Do not edit files. Report that no version change is needed, list
existing_tags, and print the optional re-release command using next_tag.
If new versioned files appear, the residual reference scan should expose them.