Skip to content

Conversation

@HonahX
Copy link
Contributor

@HonahX HonahX commented Nov 13, 2025

This PR include github workflow, "Python Client Build Release Candidate" to build release artifacts for polaris python CLI. Currently anyone with write permission could manually trigger the workflow and specifying the version and rc version, and the workflow will give you 2 artifact

  • python-client-pypi-release-candidate-1.2.0rc1.zip
  • python-client-svn-release-candidate-1.2.0rc1.zip
    Each artifact will contain sdist and wheels built for macos and linux (TODO: support windows)
unzip -l  python-client-pypi-release-candidate-1.2.0rc1.zip 
Archive:  python-client-pypi-release-candidate-1.2.0rc1.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
   544427  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp310-cp310-macosx_14_0_arm64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp310-cp310-macosx_15_0_arm64.whl
   544430  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp310-cp310-manylinux_2_28_x86_64.whl
   544429  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp310-cp310-musllinux_1_2_x86_64.whl
   544425  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp311-cp311-macosx_14_0_arm64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp311-cp311-macosx_15_0_arm64.whl
   544429  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp311-cp311-manylinux_2_28_x86_64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp311-cp311-musllinux_1_2_x86_64.whl
   544427  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp312-cp312-macosx_14_0_arm64.whl
   544429  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp312-cp312-macosx_15_0_arm64.whl
   544431  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp312-cp312-manylinux_2_28_x86_64.whl
   544430  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp312-cp312-musllinux_1_2_x86_64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp313-cp313-macosx_14_0_arm64.whl
   544427  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp313-cp313-macosx_15_0_arm64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp313-cp313-manylinux_2_28_x86_64.whl
   544431  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp313-cp313-musllinux_1_2_x86_64.whl
   544427  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp39-cp39-macosx_14_0_arm64.whl
   544427  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp39-cp39-macosx_15_0_arm64.whl
   544430  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp39-cp39-manylinux_2_28_x86_64.whl
   544428  11-19-2025 04:09   apache_polaris-1.2.0rc1-cp39-cp39-musllinux_1_2_x86_64.whl
   231413  11-19-2025 04:09   apache_polaris-1.2.0rc1.tar.gz
---------                     -------
 11119980                     21 files

Note the only difference between pypi and svn artifact is that the pypi version will have the rc1 attached to the package version, so that it could be uploaded to pypi as a "pre-release" version. The svn artifact should be the one to vote and publish finally.

This workflow pipeline is modified from https://github.com/apache/iceberg-python/blob/main/.github/workflows/python-release.yml, great thanks to @kevinjqliu who was the original author of that.

cc: @binarycat0 @MonkeyCanCode @flyrain @snazy

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@HonahX HonahX changed the title [Draft] Workflows to build python CLI release and pypi artifacts Workflows to build python CLI release and pypi artifacts Nov 19, 2025
logging.basicConfig(level=logging.INFO, format="%(message)s")

if os.environ.get("POLARIS_CLI_SKIP_CLIENT_GENERATION", "false").lower() == "true":
logger.info("POLARIS_CLI_SKIP_CLIENT_GENERATION is set to true, skipping client generation.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cibuildwheel environment does not have java, so we add this to skip the generation there

@HonahX HonahX marked this pull request as ready for review November 19, 2025 04:41
@MonkeyCanCode MonkeyCanCode self-requested a review November 19, 2025 04:48
# Use test values for pull_request trigger, actual inputs for workflow_dispatch
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "Workflow triggered by pull_request - using test values"
VERSION="1.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Not sure if we should use 1.2.0 as the default version during test. Maybe we should do 0.0.0 instead to avoid confusion?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hello 👋 Just want to highlight that in this dev@ thread was discussed legal aspects and versioning. I think it's better to sync with JB and other engineers who has expertise.

Copy link
Contributor Author

@HonahX HonahX Nov 19, 2025

Choose a reason for hiding this comment

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

Hi @MonkeyCanCode @binarycat0 This aims to be an example version when the workflow is triggered by pull request to verify if CLI changes break the wheel build

When it comes to real release, the release manager will need to manually enter the version and rc number to build the release artifacts. And the workflow will verify if the version is consistent with the one in the package metadata For example (pyiceberg)
Screenshot 2025-11-19 at 11 46 59 AM

And of course, in the future it could be integrated into release automation pipeline

@MonkeyCanCode
Copy link
Contributor

@HonahX very nice work. We are almost there to have package in PyPI.

Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

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

Is there a particular reason to not extent the release-automation workflows?

We have to follow the ASF release policy. It seems there are some steps missing in this PR:

  • checksums
  • gpg signatures
  • RC staging
  • staging the source tarball and artifacts to vote on
  • eventually publishing exactly the artifacts that have been voted on

@HonahX
Copy link
Contributor Author

HonahX commented Nov 20, 2025

Hi @snazy Thanks for highlighting these important elements of the final release candidate for python CLI. Given the number of missing pieces in the CLI release process, my goal is to separate the pipeline into 2 milestone:

  1. Have a formalized way to build release artifacts (wheels) that will later be released to PyPI for users to install.
  2. Have a formalized way to build and upload release candidate that include proper signature and checksum of release artifacts (release automation pipeline)

This PR aims to focus on the first milestone in order to have additional CI to ensure that all changes are compatible with the release process and unblock nightly build. The signature/checksum/release candidate are goals in the second milestone. This way we could first determine what to release and start testing the artifacts and then finishing the rest part. WDYT?

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.

Python CLI Publication: Github workflow to build artifacts

4 participants