Automate monthly release process#916
Conversation
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
c2dccc2 to
0f32b6f
Compare
|
@martindurant Can you please take a look at these changes, and merge this if all looks good |
|
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. |
I enabled prepare_release script to update fsspec requirement to current
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. |
d05e516 to
694bcc0
Compare
|
@martindurant Do you have any other concerns? |
4e3f8c7 to
c67c8a8
Compare
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]Phase 1: Automated Preparation (Every 5th of the month)
docs/source/changelog.rst.release-YYYY.M.PATCH, and opens a Pull Request labeledautorelease.Phase 2: Manual Review & Automated Publish (On PR Merge)
Next Step
autoreleaseLabel