Skip to content

Automate monthly release process#916

Merged
zhixiangli merged 6 commits into
fsspec:mainfrom
Yonghui-Lee:auto-release
Jun 29, 2026
Merged

Automate monthly release process#916
zhixiangli merged 6 commits into
fsspec:mainfrom
Yonghui-Lee:auto-release

Conversation

@Yonghui-Lee

Copy link
Copy Markdown
Collaborator

Overview

This PR introduces an automated monthly release pipeline for GCSFS.

How It Works (The Two-Phase Release Flow)

graph TD
    Cron[1. Scheduled Trigger: 5th of Month] --> PrepWF[2. Run Release Preparation Workflow]
    PrepWF --> Script[3. Run prepare_release.py]
    Script --> Calc[3a. Calculate Next CalVer]
    Script --> Log[3b. Extract Git Commits since last tag]
    Script --> UpdateRst[3c. Insert entries into changelog.rst]
    PrepWF --> PR[4. Create Release PR with 'autorelease' label]
    
    PR --> CI[5. CI & E2E Tests run automatically]
    CI -->|All Checks Green| Review[6. Maintainer reviews & manually merges PR]
    
    Review --> OnMergeWF[7. Run Release on Merge Workflow]
    OnMergeWF --> Tag[8. Automatically Create & Push Git Tag YYYY.M.PATCH]
    Tag --> Publish[9. Reusable release.yml: Build & PyPI Publish]
Loading

Phase 1: Automated Preparation (Every 5th of the month)

  • prepare_release.py calculates the next CalVer version, extracts all non-merge commits since the last tag, and inserts the new release section at the top of docs/source/changelog.rst.
  • It commits the changes, pushes them to a new branch release-YYYY.M.PATCH, and opens a Pull Request labeled autorelease.

Phase 2: Manual Review & Automated Publish (On PR Merge)

  • release-on-merge.yml detects the merge, extracts the version, creates/pushes the Git tag, and calls the reusable release.yml to build and publish the package to PyPI.

Next Step

  • Create the autorelease Label

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a release preparation script (prepare_release.py) along with comprehensive unit tests and minor isort configuration updates. The script automates calculating the next CalVer version, fetching changelog entries, and updating the changelog file. The review feedback suggests improving observability by capturing and logging stderr on subprocess failures, simplifying redundant error handling in get_latest_tag, and updating the version matching regex to support version suffixes (such as pre-releases or post-releases) to prevent pipeline failures.

Comment thread .github/release/prepare_release.py
Comment thread .github/release/prepare_release.py Outdated
Comment thread .github/release/prepare_release.py Outdated
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.68%. Comparing base (fae888f) to head (c67c8a8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #916   +/-   ##
=======================================
  Coverage   89.68%   89.68%           
=======================================
  Files          16       16           
  Lines        3579     3579           
=======================================
  Hits         3210     3210           
  Misses        369      369           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/release/test_prepare_release.py
Comment thread .github/workflows/release-on-merge.yml
@zhixiangli zhixiangli requested a review from martindurant June 22, 2026 05:43
@ankitaluthra1

Copy link
Copy Markdown
Collaborator

@martindurant Can you please take a look at these changes, and merge this if all looks good

@martindurant

Copy link
Copy Markdown
Member

Does this process update the fsspec requirement whenever that has had a release?

When we talked about this, I think we agreed that there could be "missing" patch numbers in the case that one or other of the siblings has had to have multiple releases within a month. In fact, that was the design, because the idea was that gcsfs would generally need more rapid releases.

@Yonghui-Lee

Copy link
Copy Markdown
Collaborator Author

Does this process update the fsspec requirement whenever that has had a release?

I enabled prepare_release script to update fsspec requirement to current YYYY.MM.0. We can modify PR manually if the latest version is not that.

When we talked about this, I think we agreed that there could be "missing" patch numbers in the case that one or other of the siblings has had to have multiple releases within a month. In fact, that was the design, because the idea was that gcsfs would generally need more rapid releases.

The release-preparation is schedule to run monthly to generate the first release. If we need release some patch versions, we can trigger release-preparation manually and it will creates PR for patched versions.

Comment thread .github/release/prepare_release.py
@zhixiangli

Copy link
Copy Markdown
Collaborator

@martindurant Do you have any other concerns?

@zhixiangli zhixiangli merged commit a91711f into fsspec:main Jun 29, 2026
10 checks passed
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.

4 participants