-
Notifications
You must be signed in to change notification settings - Fork 2
ci: Add prepare and publish release workflows. #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-0.293-clp-connector
Are you sure you want to change the base?
ci: Add prepare and publish release workflows. #81
Conversation
WalkthroughThe 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
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
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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Comment |
…elease-preparation-0.293.0-yscope
There was a problem hiding this 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
📒 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 goodThe parent version bump aligns with the release workflow requirements.
presto-spark-classloader-interface/pom.xml (1)
6-6
: Consistent parent version bumpThis module now tracks the new 0.293.0-yscope-SNAPSHOT parent as expected.
presto-prometheus/pom.xml (1)
7-7
: Version alignment confirmedThe parent POM now references 0.293.0-yscope-SNAPSHOT, matching the release plan.
presto-pinot/pom.xml (1)
7-7
: LGTM on parent versionThe parent version update keeps this module in sync with the new snapshot baseline.
presto-benchmark-driver/pom.xml (1)
8-8
: Parent version bump verifiedThe 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 correctParent references the new 0.293.0-yscope-SNAPSHOT version, keeping packaging aligned.
presto-druid/pom.xml (1)
7-7
: Parent version matches new baselineDruid connector now inherits from the 0.293.0-yscope-SNAPSHOT parent as intended.
presto-expressions/pom.xml (1)
8-8
: Version bump acknowledgedThe 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.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Description
An example of prepare release workflow execution: https://github.com/anlowee/presto/actions/runs/18409335825
-SNAPSHOT
) from pom.xml files then create arelease-{VERSION}
branch and bump the version of a branch namedrelease-preparation-{VERSION}
forked from the current branch. For example, say in the current main branch the version is0.293.0-yscope-SNAPSHOT
, A tag0.293.0-yscope
, a branchrelease-preparation-0.293.0-yscope
and a branchrelease-0.293.0-yscope
will be created, therelease-preparation-0.293.0-yscope
branch's version will be0.293.1-yscope-SNAPSHOT
(this is automatically committed by maven plugin, for example here). A PR whose head isrelease-preparation-0.293.0-yscope
will be created automatically, here is an example: feat: Bump version to0.293.1-yscope-SNAPSHOT
for next development cycle. anlowee/presto#8.An example of publish release workflow execution: https://github.com/anlowee/presto/actions/runs/18411093552
0.293.0-yscope
) then it will look for the tag with the same name and a branch ofrelease-{VERSION}
. It seems the branch that launches this workflow does not matter, because it always checks out the release branch/tag.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
breaking change.
Validation performed
Tested in my own fork.
Summary by CodeRabbit