Skip to content

Conversation

anlowee
Copy link

@anlowee anlowee commented Oct 10, 2025

Description

An example of prepare release workflow execution: https://github.com/anlowee/presto/actions/runs/18409335825

  1. This step must be run from the main branch (the branch to make release).
  2. It first uses some maven tool to extract the version (the original version must end with -SNAPSHOT) from pom.xml files then create a release-{VERSION} branch and bump the version of a branch named release-preparation-{VERSION} forked from the current branch. For example, say in the current main branch the version is 0.293.0-yscope-SNAPSHOT, A tag 0.293.0-yscope, a branch release-preparation-0.293.0-yscope and a branch release-0.293.0-yscope will be created, the release-preparation-0.293.0-yscope branch's version will be 0.293.1-yscope-SNAPSHOT (this is automatically committed by maven plugin, for example here). A PR whose head is release-preparation-0.293.0-yscope will be created automatically, here is an example: feat: Bump version to 0.293.1-yscope-SNAPSHOT for next development cycle. anlowee/presto#8.
  3. We removed the publish release notes step which exists in OSS for now.

An example of publish release workflow execution: https://github.com/anlowee/presto/actions/runs/18411093552

  1. This step takes a version as the input (for example above, the input should be 0.293.0-yscope) then it will look for the tag with the same name and a branch of release-{VERSION}. It seems the branch that launches this workflow does not matter, because it always checks out the release branch/tag.
  2. It first ensures the release tag exists (if exists it deletes it and recreates one).
  3. Then it builds the presto project and have a bunch of related artifacts (I keep this part the same as OSS) and publish them in the github release.
  4. Then it builds coordinator image, worker's dep and runtime images, where I keep it the same as our current CI. The only difference is I make the tag of images same as the release tag (e.g., 0.293.0-yscope).

Here is the example of release:
https://github.com/anlowee/presto/releases/tag/0.293.0-yscope
The images are available at:
Coordinator image: ghcr.io/anlowee/presto/coordinator:0.293.0-yscope
Worker runtime image: ghcr.io/anlowee/presto/prestissimo-worker:0.293.0-yscope
Worker dependency image: ghcr.io/anlowee/presto/prestissimo-worker-dev-env:0.293.0-yscope

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

Tested in my own fork.

Summary by CodeRabbit

  • Chores
    • Added automated workflows to prepare and publish stable releases, with optional steps for tags, Maven artifacts, GitHub releases, Docker images, native images, and docs.
    • Implemented dynamic Presto version detection during builds, improving image tagging and metadata.
    • Updated artifact upload patterns to support versioned filenames.
    • Bumped project version to 0.293.0-yscope-SNAPSHOT and updated project repository links.
    • Standardized release branching and tagging, including automatic pull request creation for release preparation.

Copy link

coderabbitai bot commented Oct 10, 2025

Walkthrough

The PR adds two GitHub Actions workflows for release preparation and publishing, updates an existing Maven CI workflow to derive the Presto version dynamically and adjust artifact patterns, and updates Maven POMs to use the 0.293.0-yscope-SNAPSHOT parent and YScope SCM coordinates.

Changes

Cohort / File(s) Summary
CI: Maven checks workflow update
.github/workflows/maven-checks.yml
Adds step to compute PRESTO_DEVELOP_VERSION via Maven and export to env; replaces hardcoded image version with env-driven PRESTO_VERSION; switches artifact upload paths to wildcards for server/CLI artifacts.
CI: New release workflows
.github/workflows/presto-release-prepare.yml, .github/workflows/presto-release-publish.yml
Introduces manual release preparation workflow (checkout, Java setup, version derivation, release:prepare, branch/tag push, PR creation) and a configurable publish workflow (tag, Maven artifacts, GitHub release, Docker image, native image, docs) with orchestrated jobs and artifacts.
Root POM metadata/version
pom.xml
Updates version to 0.293.0-yscope-SNAPSHOT; changes scm connection/url to y-scope repo; scm tag set to HEAD.
Module POM parent version bump
presto-*/pom.xml
Updates <parent><version> from 0.293 to 0.293.0-yscope-SNAPSHOT across modules (e.g., accumulo, analyzer, hive*, spark*, server, cli, jdbc, spi, connectors, tests, docs). No other changes except inheritance effects.
Module-specific additional POM edits
presto-native-sidecar-plugin/pom.xml
Besides parent bump, updates test dependencies presto-tests and presto-native-execution to 0.293.0-yscope-SNAPSHOT.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Actions (maven-checks)
  participant MVN as Maven
  participant ENV as Env Vars
  participant META as Docker Metadata Action
  participant DCK as Docker Buildx

  Dev->>GH: Push / PR triggers workflow
  GH->>MVN: Run Maven to get project version
  MVN-->>GH: Print version
  GH->>ENV: Set PRESTO_DEVELOP_VERSION
  GH->>META: Generate image tags/labels (uses PRESTO_VERSION=env)
  GH->>DCK: Build & push coordinator image (build-arg PRESTO_VERSION)
  GH->>GH: Upload artifacts (wildcards: presto-server-*.tar.gz, presto-cli-*-executable.jar)
  note over GH: Artifact paths changed to wildcard patterns
Loading
sequenceDiagram
  autonumber
  actor RelEng as Release Engineer
  participant Prep as Workflow: presto-release-prepare
  participant Git as Git (origin)
  participant MVN as Maven

  RelEng->>Prep: workflow_dispatch (prepare_release)
  Prep->>Git: Checkout repository (shallow)
  Prep->>Git: Verify/reset to latest branch HEAD
  Prep->>Prep: Setup Java toolchain
  Prep->>MVN: Derive/set release version
  Prep->>Git: Create & push release-preparation branch
  Prep->>MVN: mvn release:prepare (batch, versions)
  Prep->>Git: Push tag and branch
  Prep->>Git: Create PR to base branch
Loading
sequenceDiagram
  autonumber
  actor RelEng as Release Engineer
  participant Pub as Workflow: presto-release-publish
  participant Tag as Job: publish-release-tag
  participant MavenJob as Job: publish-maven-artifacts
  participant GHRel as Job: publish-github-release
  participant Docker as Job: publish-docker-image
  participant Native as Job: publish-native-image

  RelEng->>Pub: workflow_dispatch (version + toggles)
  Pub->>Tag: Checkout, config git, recreate & push tag
  Tag-->>Pub: Tag available
  par Optional publishes (gated by inputs)
    Tag->>MavenJob: Build & upload Maven artifacts
    Note over MavenJob: Prepares disk, setup JDK, checkout tag, mvn deploy
  and
    MavenJob-->>GHRel: Download artifacts, create GitHub release
  and
    MavenJob-->>Docker: Download artifacts, build & push image (GHCR)
  and
    Tag-->>Native: Build Prestissimo images (dependency + runtime), push
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not conform to the repository’s template because it uses incorrect heading levels, omits required sections such as Motivation and Context, Impact, and Test Plan, and lacks the mandated Release Notes section and complete Contributor checklist. Please revise the PR description to match the provided template by using the exact “##” section headings for Description, Motivation and Context, Impact, and Test Plan, complete the Contributor checklist with all required items, and add a Release Notes section as specified.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title succinctly describes the key changes by indicating addition of prepare and publish release workflows, uses imperative form, aligns with conventional commit style, and clearly conveys the primary change in a concise single sentence.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@anlowee anlowee requested a review from kirkrodrigues October 10, 2025 17:43
@anlowee anlowee marked this pull request as ready for review October 15, 2025 14:07
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfa18ff and aff82d3.

📒 Files selected for processing (107)
  • .github/workflows/maven-checks.yml (2 hunks)
  • .github/workflows/presto-release-prepare.yml (1 hunks)
  • .github/workflows/presto-release-publish.yml (1 hunks)
  • pom.xml (2 hunks)
  • presto-accumulo/pom.xml (1 hunks)
  • presto-analyzer/pom.xml (1 hunks)
  • presto-atop/pom.xml (1 hunks)
  • presto-base-arrow-flight/pom.xml (1 hunks)
  • presto-base-jdbc/pom.xml (1 hunks)
  • presto-benchmark-driver/pom.xml (1 hunks)
  • presto-benchmark-runner/pom.xml (1 hunks)
  • presto-benchmark/pom.xml (1 hunks)
  • presto-benchto-benchmarks/pom.xml (1 hunks)
  • presto-bigquery/pom.xml (1 hunks)
  • presto-blackhole/pom.xml (1 hunks)
  • presto-bytecode/pom.xml (1 hunks)
  • presto-cache/pom.xml (1 hunks)
  • presto-cassandra/pom.xml (1 hunks)
  • presto-cli/pom.xml (1 hunks)
  • presto-clickhouse/pom.xml (1 hunks)
  • presto-client/pom.xml (1 hunks)
  • presto-clp/pom.xml (1 hunks)
  • presto-cluster-ttl-providers/pom.xml (1 hunks)
  • presto-common/pom.xml (1 hunks)
  • presto-delta/pom.xml (1 hunks)
  • presto-docs/pom.xml (1 hunks)
  • presto-druid/pom.xml (1 hunks)
  • presto-elasticsearch/pom.xml (1 hunks)
  • presto-example-http/pom.xml (1 hunks)
  • presto-expressions/pom.xml (1 hunks)
  • presto-function-namespace-managers-common/pom.xml (1 hunks)
  • presto-function-namespace-managers/pom.xml (1 hunks)
  • presto-function-server/pom.xml (1 hunks)
  • presto-geospatial-toolkit/pom.xml (1 hunks)
  • presto-google-sheets/pom.xml (1 hunks)
  • presto-grpc-api/pom.xml (1 hunks)
  • presto-grpc-testing-udf-server/pom.xml (1 hunks)
  • presto-hana/pom.xml (1 hunks)
  • presto-hdfs-core/pom.xml (1 hunks)
  • presto-hive-common/pom.xml (1 hunks)
  • presto-hive-function-namespace/pom.xml (1 hunks)
  • presto-hive-hadoop2/pom.xml (1 hunks)
  • presto-hive-metastore/pom.xml (1 hunks)
  • presto-hive/pom.xml (1 hunks)
  • presto-hudi/pom.xml (1 hunks)
  • presto-i18n-functions/pom.xml (1 hunks)
  • presto-iceberg/pom.xml (1 hunks)
  • presto-jdbc/pom.xml (1 hunks)
  • presto-jmx/pom.xml (1 hunks)
  • presto-kafka/pom.xml (1 hunks)
  • presto-kudu/pom.xml (1 hunks)
  • presto-lark-sheets/pom.xml (1 hunks)
  • presto-local-file/pom.xml (1 hunks)
  • presto-main-base/pom.xml (1 hunks)
  • presto-main/pom.xml (1 hunks)
  • presto-matching/pom.xml (1 hunks)
  • presto-memory-context/pom.xml (1 hunks)
  • presto-memory/pom.xml (1 hunks)
  • presto-ml/pom.xml (1 hunks)
  • presto-mongodb/pom.xml (1 hunks)
  • presto-mysql/pom.xml (1 hunks)
  • presto-native-execution/pom.xml (1 hunks)
  • presto-native-sidecar-plugin/pom.xml (3 hunks)
  • presto-native-tests/pom.xml (1 hunks)
  • presto-node-ttl-fetchers/pom.xml (1 hunks)
  • presto-open-telemetry/pom.xml (1 hunks)
  • presto-openapi/pom.xml (1 hunks)
  • presto-oracle/pom.xml (1 hunks)
  • presto-orc/pom.xml (1 hunks)
  • presto-parquet/pom.xml (1 hunks)
  • presto-parser/pom.xml (1 hunks)
  • presto-password-authenticators/pom.xml (1 hunks)
  • presto-pinot-toolkit/pom.xml (1 hunks)
  • presto-pinot/pom.xml (1 hunks)
  • presto-plugin-toolkit/pom.xml (1 hunks)
  • presto-postgresql/pom.xml (1 hunks)
  • presto-product-tests/pom.xml (1 hunks)
  • presto-prometheus/pom.xml (1 hunks)
  • presto-proxy/pom.xml (1 hunks)
  • presto-rcfile/pom.xml (1 hunks)
  • presto-record-decoder/pom.xml (1 hunks)
  • presto-redis/pom.xml (1 hunks)
  • presto-redshift/pom.xml (1 hunks)
  • presto-resource-group-managers/pom.xml (1 hunks)
  • presto-router-example-plugin-scheduler/pom.xml (1 hunks)
  • presto-router/pom.xml (1 hunks)
  • presto-server/pom.xml (1 hunks)
  • presto-session-property-managers/pom.xml (1 hunks)
  • presto-singlestore/pom.xml (1 hunks)
  • presto-spark-base/pom.xml (1 hunks)
  • presto-spark-classloader-interface/pom.xml (1 hunks)
  • presto-spark-common/pom.xml (1 hunks)
  • presto-spark-launcher/pom.xml (1 hunks)
  • presto-spark-package/pom.xml (1 hunks)
  • presto-spark-testing/pom.xml (1 hunks)
  • presto-spark/pom.xml (1 hunks)
  • presto-spi/pom.xml (1 hunks)
  • presto-sqlserver/pom.xml (1 hunks)
  • presto-teradata-functions/pom.xml (1 hunks)
  • presto-test-coverage/pom.xml (1 hunks)
  • presto-testing-docker/pom.xml (1 hunks)
  • presto-testing-server-launcher/pom.xml (1 hunks)
  • presto-testng-services/pom.xml (1 hunks)
  • presto-tests/pom.xml (1 hunks)
  • presto-thrift-api/pom.xml (1 hunks)
  • presto-thrift-connector/pom.xml (1 hunks)
  • presto-thrift-spec/pom.xml (1 hunks)
⛔ Files not processed due to max files limit (7)
  • presto-thrift-testing-server/pom.xml
  • presto-thrift-testing-udf-server/pom.xml
  • presto-tpcds/pom.xml
  • presto-tpch/pom.xml
  • presto-ui/pom.xml
  • presto-verifier/pom.xml
  • redis-hbo-provider/pom.xml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
📚 Learning: 2025-06-04T14:50:43.554Z
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

Applied to files:

  • .github/workflows/presto-release-prepare.yml
🔇 Additional comments (19)
presto-cache/pom.xml (1)

8-8: Parent version update looks good

The parent version bump aligns with the release workflow requirements.

presto-spark-classloader-interface/pom.xml (1)

6-6: Consistent parent version bump

This module now tracks the new 0.293.0-yscope-SNAPSHOT parent as expected.

presto-prometheus/pom.xml (1)

7-7: Version alignment confirmed

The parent POM now references 0.293.0-yscope-SNAPSHOT, matching the release plan.

presto-pinot/pom.xml (1)

7-7: LGTM on parent version

The parent version update keeps this module in sync with the new snapshot baseline.

presto-benchmark-driver/pom.xml (1)

8-8: Parent version bump verified

The module now inherits from the 0.293.0-yscope-SNAPSHOT parent, as required.

presto-spark-package/pom.xml (1)

8-8: Snapshot version update looks correct

Parent references the new 0.293.0-yscope-SNAPSHOT version, keeping packaging aligned.

presto-druid/pom.xml (1)

7-7: Parent version matches new baseline

Druid connector now inherits from the 0.293.0-yscope-SNAPSHOT parent as intended.

presto-expressions/pom.xml (1)

8-8: Version bump acknowledged

The expressions module now follows the 0.293.0-yscope-SNAPSHOT parent, aligning with the release work.

presto-postgresql/pom.xml (1)

8-8: Parent version update matches the new SNAPSHOT baseline.
The module now tracks the shared 0.293.0-yscope-SNAPSHOT parent as expected.

presto-parser/pom.xml (1)

8-8: Parent version bump confirmed.
The parser module now inherits from the 0.293.0-yscope-SNAPSHOT parent, matching the global version shift.

presto-session-property-managers/pom.xml (1)

8-8: Snapshot parent alignment looks good.
Session property managers now inherit from the 0.293.0-yscope-SNAPSHOT baseline in step with the rest of the tree.

presto-kafka/pom.xml (1)

8-8: Kafka module now follows the updated parent snapshot.
No further adjustments needed; the version tracks the new 0.293.0-yscope-SNAPSHOT lineage.

presto-hive-hadoop2/pom.xml (1)

8-8: Hive Hadoop2 inherits the new parent snapshot.
Change keeps the module aligned with the repo-wide 0.293.0-yscope-SNAPSHOT baseline.

presto-analyzer/pom.xml (1)

8-8: Analyzer module version inheritance updated.
The parent reference now points at 0.293.0-yscope-SNAPSHOT as intended.

presto-plugin-toolkit/pom.xml (1)

8-8: Plugin toolkit tracks the new parent snapshot.
Everything stays consistent with the 0.293.0-yscope-SNAPSHOT rollout.

presto-thrift-connector/pom.xml (1)

8-8: Thrift connector parent version matches the snapshot upgrade.
No further action required; it now inherits from 0.293.0-yscope-SNAPSHOT.

presto-server/pom.xml (1)

5-9: Version alignment looks good.

Parent now targets 0.293.0-yscope-SNAPSHOT, matching the new release lineage and keeping the module in sync with the rest of the build.

presto-common/pom.xml (1)

5-9: SNAPSHOT bump confirmed.

Parent POM version tracks the new yscope snapshot as expected; no additional updates needed here.

presto-main-base/pom.xml (1)

5-9: Consistent parent version.

This keeps presto-main-base aligned with the repository-wide 0.293.0-yscope-SNAPSHOT parent upgrade. All good.

Comment on lines +78 to +83
unset MAVEN_CONFIG && ./mvnw release:prepare --batch-mode \
-DskipTests \
-DautoVersionSubmodules \
-DdevelopmentVersion=${{ env.PRESTO_RELEASE_VERSION }} \
-DreleaseVersion=${{ env.PRESTO_RELEASE_VERSION }}
grep -m 2 "<version>" pom.xml
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix development version passed to mvn release:prepare.

-DdevelopmentVersion=${{ env.PRESTO_RELEASE_VERSION }} sets the next development cycle to the release version without the required -SNAPSHOT suffix. The Maven Release Plugin will either fail (because the development version must end with -SNAPSHOT) or leave the release-preparation branch stuck on the release version instead of bumping to the expected 0.293.1-yscope-SNAPSHOT. Compute and pass the actual next snapshot (e.g., 0.293.1-yscope-SNAPSHOT) or let the plugin pick it automatically so the follow-up PR matches the documented flow.

🤖 Prompt for AI Agents
.github/workflows/presto-release-prepare.yml around lines 78 to 83: the workflow
passes the release version as -DdevelopmentVersion which lacks the required
-SNAPSHOT suffix, causing the Maven Release Plugin to fail or leave the branch
at the release version; change the step to either omit -DdevelopmentVersion so
the plugin computes the next snapshot automatically, or compute and pass a
proper snapshot value (append -SNAPSHOT to the intended next development
version, e.g., 0.293.1-yscope-SNAPSHOT) before invoking ./mvnw release:prepare.

Comment on lines +85 to +95
needs: publish-release-tag
if: |
(!failure() &&!cancelled()) && (
github.event.inputs.publish_maven == 'true' ||
github.event.inputs.publish_image == 'true' ||
github.event.inputs.publish_docs == 'true' ||
github.event.inputs.publish_github_release == 'true'
)
runs-on: ubuntu-latest
environment: release
timeout-minutes: 60
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Decouple downstream jobs from the optional tag job.

All downstream jobs declare needs: publish-release-tag. When publish_release_tag is set to false, the tag job is skipped and GitHub consequently skips every dependent job, so you cannot publish Maven artifacts, Docker images, etc., without also creating the tag. Please remove the hard dependency (or provide an alternative gate) so the toggles behave independently as advertised.

🤖 Prompt for AI Agents
.github/workflows/presto-release-publish.yml lines 85-95: downstream jobs
currently declare a hard needs: publish-release-tag which causes all dependents
to be skipped when the tag job is disabled; remove that hard dependency and
instead rely on per-job if: conditions that check the relevant
github.event.inputs flags (e.g., publish_maven, publish_image, publish_docs,
publish_github_release) so each publish job runs independently; only keep needs:
publish-release-tag for jobs that truly require the tag (and combine that with
an if: that checks publish_github_release == 'true') or use conditional needs
via outputs from the tag job so the toggle for creating the tag does not gate
unrelated publish jobs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant