Skip to content

Stable release process (every 2 months)

Steve Burnett edited this page Mar 27, 2025 · 39 revisions

For release after 0.291

There are 2 actions after refactoring.

Release process

The release process consists of 5 steps: 2 steps with actions and 3 steps with manual actions:

graph TD
    A((Start))
    B[Run Prepare Action]
    C[Review & Merge Release notes PR]
    D[Run Publish Action]
    E[Review & Merge Release docs PR]
    F[Verify Artifacts & Update Website]
    G([Released])

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G
Loading
  1. Use the GitHub action Presto Stable Release - Prepare to creates the release tag/branch and generates release notes pull request.
  2. Review the release notes pull request and merge it to the master branch.
  3. Run the GitHub action Presto Stable Release - Publish to publish release artifacts to various platforms (maven repository, dockerhub), create release docs pull request.
  4. Review the release docs pull request and merge it to the master branch (auto published to https://prestodb.github.io/ after PR merged).
  5. Verify the artifacts and Docker images released to Maven Central and Docker Hub. Contact Ali to update the link to the new release doc on the website (https://prestodb.io/).

Release artifacts

Action workflows

  1. Presto Stable Release - Prepare
presto_release_preapre_workflow
  1. Presto Stable Release - Publish
presto_release_publish_workflow

Action details

Action 1: Presto Stable Release - Prepare

Trigger

The prepare workflow (presto-release-prepare.yml) can be triggered manually from the GitHub Actions UI.

Input Parameters

presto_release_prepare_inputs
  • prepare_release (boolean, optional)
    • Default: true
    • Controls release branch and tag preparation
  • prepare_release_notes (boolean, optional)
    • Default: true
    • Controls release notes pull request generation

Key outputs

  1. Job: prepare-release-branch

    • Creates release commits and release tag(e.g. 0.292) using maven release plugin
    • Creates release branch(e.g. release-0.292) with the release tag
    • Push the release branch and tag
    • Push the commits to master branch(with new development version)
  2. Job: prepare-release-notes

    • Creates release notes and commit to a new release note branch(e.g. release-notes-0.292)
    • Creates the release notes pull request to master branch

Failure actions

  • If Job: prepare-release-branch failed, delete the release branch(e.g. release-0.292) and tag(e.g. 0292), then re-run the failed job
  • If Job: prepare-release-notes failed, close the release notes pull request(if created), delete the release notes branch(e.g. release-notes-0.292), then re-run the failed job
Action 2: Presto Stable Release - Publish

Trigger

The publish workflow (presto-release-publish.yml) can be triggered manually from the GitHub Actions UI after the prepare workflow completed(to release a new version) or with existing released versions(to release an existing version again).

Input Parameters

presto_release_publish_inputs
  • RELEASE_VERSION (required)
    • Description: 'Release version (e.g., 0.292)'
  • publish_release_tag (boolean, optional)
    • Description: 'Publish release tag'
    • Default: true
  • release-notes-commit (optional)
    • Description: 'Commit SHA of release notes(required when publish_release_tag is checked)'
  • publish_maven (boolean, optional)
    • Description: 'Publish maven artifacts'
    • Default: true
  • publish_docker (boolean, optional)
    • Description: 'Publish docker images'
    • Default: true
  • publish_native_docker (boolean, optional)
    • Description: 'Publish native docker images'
    • Default: true
  • tag_image_as_latest (boolean, optional)
    • Description: 'Tag the image as latest'
    • Default: true
  • dependency_image (optional)
    • Description: 'Dependency image(e.g., prestodb/presto-native-dependency:0.290-20241014120930-e1fc090)'
    • Default: ''
  • publish_docs (boolean, optional)
    • Description: 'Publish docs'
    • Default: true

Key outputs

  1. Job: publish-release-tag

    • Cherry-picks release notes commit into release branch(e.g. release-0.292)
    • Delete the release tag, and re-creates it with the new release branch(e.g. 0.292)
    • Push the new release tag and updated release branch
  2. Job: publish-native-images

    • Native Docker images:
      • prestodb/presto-native:{version}
      • prestodb/presto-native:latest (if tag_image_as_latest=true)
    • Dependency image (if not provided):
      • prestodb/presto-native-dependency:{version}-{commit_sha}
  3. Job: publish-maven-artifacts

    • Maven artifacts published to Maven Central
    • Uploaded artifacts for step 4 and step 5:
      • presto-server-{version}.tar.gz
      • presto-cli-{version}-executable.jar
      • presto-docs-{version}.zip
  4. Job: publish-docker-images

    • Multi-arch Docker images (amd64, arm64, ppc64le):
      • prestodb/presto:{version}
      • prestodb/presto:latest (if tag_image_as_latest=true)
  5. Job: publish-docs

Failure actions

  • If job: publish-release-tag failed, reset the release branch(e.g. 0.292) to delete the release notes commit(if cherry-pick successfully), then re-run the failed job
  • If job: publish-native-images failed, just re-run the failed job
  • If job: publish-maven-artifacts failed, just re-run the failed job
  • If job: publish-docker-images failed, just re-run the failed job
  • If job: publish-docs failed, go to repository prestodb.github.io, close the docs pull request(if created), delete the docs branch(e.g. release-docs-0.292), then re-run the job

Publishing Locations


For release before 0.291

Step 1: Create a release branch and increment the version in the master branch

Run this pipeline once.

Run the Presto Stable Release Workflow action once.

Step 1.1: Manually verify quality of release

Linsong will add instructions on identifying the Docker image in the Docker hub.

https://github.com/prestodb/presto/wiki/Presto-release-testing-script

Step 2: Create the release notes PR

You must have the GitHub presto repo on a remote named "upstream" You must have your fork on a remote named "origin"

add git config with your github user and email.

Then ensure that Step1: is complete and the release branch has been created by the pipeline.

Run the below script from the local master. The script should automatically create a PR for you.

Run this script in your recently rebased repo root folder: tdcmeehan@Timothys-MBP presto % ./src/release/release-notes.sh tdcmeehan <ACCESS_TOKEN>, where ACCESS_TOKEN is a personal access token with read privileges to the repository generated from https://github.com/settings/tokens.

Reviews may take up to 2 weeks to complete.

The PR is against the master branch; once the master branch copy is merged, we need to cherry-pick it into the release branch.

Note: For now, you must manually make a code change to add the date next to the release (see release.rst)

Note: you'll need to check each PR that doesn't have a release note and verify if it's due to the note being malformed or not present. If malformed, you'll need to edit the PR to add it. If not present, contact the author to suggest a release note.

Note: you'll also want to manually update the release.rst file to include the date when the release was cut (step 1).

Note: when you run this script, it will error out as below. This error is harmless, and if you check the latest pull requests in Presto, you will find the release notes PR.

2024-08-23T16:08:00.430-0400	ERROR	main	Bootstrap	Uncaught exception in thread main
java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.LinkedHashMap` out of START_ARRAY token
 at [Source: (StringReader); line: 1, column: 33505] (through reference chain: java.util.LinkedHashMap["extensions"]->java.util.LinkedHashMap["warnings"])
	at com.facebook.presto.release.git.GithubGraphQlAction.githubApi(GithubGraphQlAction.java:198)
	at com.facebook.presto.release.git.GithubGraphQlAction.createPullRequest(GithubGraphQlAction.java:175)
	at com.facebook.presto.release.tasks.GenerateReleaseNotesTask.run(GenerateReleaseNotesTask.java:175)
	at com.facebook.presto.release.tasks.AbstractReleaseCommand.run(AbstractReleaseCommand.java:50)
	at com.facebook.presto.release.PrestoReleaseService.main(PrestoReleaseService.java:38)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.LinkedHashMap` out of START_ARRAY token
 at [Source: (StringReader); line: 1, column: 33505] (through reference chain: java.util.LinkedHashMap["extensions"]->java.util.LinkedHashMap["warnings"])
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
	at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1343)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1139)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1093)
	at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromEmpty(StdDeserializer.java:600)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:360)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
	at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3023)
	at com.facebook.presto.release.git.GithubGraphQlAction.githubApi(GithubGraphQlAction.java:195)
	... 4 more

Submitted PR https://github.com/prestodb/presto-release-tools/pull/39 to improve the readability of the error message.

Step 3: clean up the tag

  • on GitHub web, delete the tag for this release
  • in your local git repo, on the release branch (e.g. branch release-0.289), delete the local tag via git tag -d TAG, where TAG is the tag name of the tag you just deleted from the web UI.
  • Copy release notes merged on master into the release branch, e.g. git checkout release-0.289;git cherry-pick SHA;git push upstream release-0.289, where SHA is the commit ID of the release notes merge.
  • Tag this branch with 0.289: git tag -a TAG -m "release TAG", where TAG is the tag name of the tag you just deleted from the web UI.
  • push to Github remote: git push; git push upstream refs/tags/TAG, where TAG is the tag name of the tag you just deleted from the web UI.

Step 4: Publish Maven and Docker artifacts

These pipelines may be flaky. If so, reach out to Linsong Wang.

Publish to maven repo:

Publis docker image:

Note: You may need to exclude additional submodules when publishing due to timeouts in Maven Central. You may not have the proper credentials to rebuild and exclude submodules, if so, you will need to reach out to Linsong Wang to get the proper permissions.

Step 5: Publish docs website

Run this job: https://ci.ibm.prestodb.dev/job/presto-release-tools/job/presto-release-tools/job/pipeline-release-docs/build?delay=0sec

When it's finished, examine the logs of the job. You'll see something like the following:~~

[2024-08-12T07:41:13.407Z] + git push --set-upstream https://wanglinsong:****@github.com/wanglinsong/prestodb.github.io.git 0.288.1-docs
[2024-08-12T07:41:16.714Z] remote: 
[2024-08-12T07:41:16.714Z] remote: Create a pull request for '0.288.1-docs' on GitHub by visiting:        
[2024-08-12T07:41:16.715Z] remote:      https://github.com/wanglinsong/prestodb.github.io/pull/new/0.288.1-docs        
[2024-08-12T07:41:16.715Z] remote: 
[2024-08-12T07:41:16.715Z] To https://github.com/wanglinsong/prestodb.github.io.git

Follow the link to create the PR for the docs.

Edit the PR and run the following on the branch from that PR across all files:

Added this PR to automate the steps below:

sed -ibak -e 's/@supports selector(.*11\.5rem)}}//' website/static/docs/current/_static/sphinx_immaterial_theme.*.css

Add the changed file to siteConfig.js in the same PR (see example).

Then squash and merge that commit back and the PR is ready for review.

Check the sites below for publishing result

Step 6: Finalize

Verify from Maven Central that the artifacts have been uploaded there. Verify from DockerHub that the images have been pushed. Reach out to Ali to update the links on the website.

Clone this wiki locally