feat: Automate release preparation, notes, and artifact verification - #2628
Draft
Rana Singh (ranadeepsingh) wants to merge 1 commit into
Draft
feat: Automate release preparation, notes, and artifact verification#2628Rana Singh (ranadeepsingh) wants to merge 1 commit into
Rana Singh (ranadeepsingh) wants to merge 1 commit into
Conversation
Automates the mechanical parts of the SynapseML Fabric release so the remaining human work is decision-making and approvals. Fixes to scripts/bump-version.py (it currently FAILS on master): - PR microsoft#2589 (CDN migration) rewrote "docs/Reference/R Setup.md" to per-module archive names (synapseml-core-1.1.3.zip) and added VerifyRCodegen.scala with hardcoded version strings. Neither is matched by the existing patterns, so the script hard-fails and would block the next release. Added a generic "-{V}.zip" line anchor plus file anchors for VerifyRCodegen. - _detect_version() read docusaurus.config.js without an encoding, raising UnicodeDecodeError on a cp1252 console. - analyze() and the EXPECTED_FILES manifest check compared str(rel), which yields backslashes on Windows and never matches the "/" paths in the anchor tables, producing false "not updated" warnings. - Non-ASCII status output crashed on a cp1252 console *after* files had been rewritten, leaving a half-applied bump behind a non-zero exit. - Added DENYLIST_PATHS for files whose basename is too common to denylist safely. New tooling in scripts/release/: - release_matrix.py derives every tag, UPack version, pip version and BBC-VHD value from one input version. One release spans 7 tags per repo and 4 mutually inconsistent naming conventions; notably the OSS UPack package mangles spark dots to dashes (1.1.3-spark4-0) while the Internal package preserves them (1.1.3-0-spark4.0). - verify_release.py checks every tag and artifact against the matrix. Worth running even on a green publish pipeline, because several of its publish steps use continueOnError: true. - bump_bbcvhd.py applies a release to a BBC-VHD component, replacing the most error-prone hand-edit in the process. New workflows: - release-prepare.yml opens the version-bump PR. Two of the last four bumps landed as unsigned direct pushes to master with no PR. - release-notes.yml publishes the GitHub Release on a vX.Y.Z tag. v1.1.1 has a tag but no Release, which made v1.1.3's auto-generated notes span two releases; the workflow pins the diff base to the previous primary tag so notes stay correct regardless. Expected values in the tests are transcribed from live v1.1.1 and v1.1.3 data, so a failure means the tooling has drifted from what was actually shipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Hey Rana Singh (@ranadeepsingh) 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Automates the mechanical parts of the SynapseML Fabric release, and fixes
scripts/bump-version.py, which currently fails onmasterand would block the next release.Complements #2540 (which automates tagging and the spark rebase PRs). No overlap: this PR covers the version bump, the GitHub Release, and the artifact/BBC-VHD side.
Why
scripts/bump-version.pyhard-fails on currentmaster. #2589 (CDN migration) rewrotedocs/Reference/R Setup.mdto per-module archive names (synapseml-core-1.1.3.zip) and addedVerifyRCodegen.scalawith hardcoded version strings. Neither is covered by the existing anchors, so the script exits non-zero before doing anything useful.Beyond that, three things about the current process show up clearly in the history:
Version bumps bypass review. v1.1.0 and v1.1.3 landed as unsigned direct pushes to
masterwith no PR. v1.1.2 was bumped (baf63dce) and then removed by resettingmasterback to its parent, with no revert PR — the tag simply never existed.GitHub Releases are inconsistent.
v1.1.1has a tag but no Release object, and neither do any of thev1.1.3-spark4.*/-python3.*tags. Because GitHub anchors auto-generated notes to the previous Release rather than the previous tag, v1.1.3's notes silently spanned both v1.1.1 and v1.1.3.Version strings are hand-typed across four inconsistent conventions. The same release is spelled four different ways, and the differences are invisible unless two real releases are compared side by side:
Changes
scripts/bump-version.py(fixes)docs/Reference/R Setup.md+VerifyRCodegen.scalanot matched after #2589_detect_version()readdocusaurus.config.jswith no encodingUnicodeDecodeErroron a cp1252 consoleanalyze()and theEXPECTED_FILEScheck comparedstr(rel)/anchor tables on Windows; false "not updated" warningsAlso adds
DENYLIST_PATHSfor files whose basename is too common to denylist safely.scripts/release/(new)release_matrix.py— derives every tag, UPack version, pip version and BBC-VHD value from one input version, so the four conventions above are applied by code rather than by hand.--jsonfor pipeline consumption.verify_release.py— checks every tag and published artifact against the matrix. Worth running even on a green publish pipeline, because several publish steps inSynapseML-Publish-OfficialusecontinueOnError: trueand can fail silently.bump_bbcvhd.py— applies a release to a BBC-VHD component (setup.sh+version.txt), replacing the most error-prone hand-edit in the process..github/workflows/(new)release-prepare.yml—workflow_dispatch(version)runs the bump and opens the release PR, so a release can't be an unreviewed direct push. Refuses to run offmaster, or if the tag or branch already exists.release-notes.yml— publishes the GitHub Release when avX.Y.Ztag is pushed, pinning the diff base to the previous primary tag so notes stay correct even when an older Release object is missing. Verifies the tag is an ancestor ofmasterfirst.Validation
192 passed(test_bump_version.py+test_release_matrix.py). On this branch's base commit the same suite is 7 failed / 166 passed / 4 errors on Windows.verify_release.py --version 1.1.3→ 26 checks, 0 missing, exit 0 against the live feeds.verify_release.py --version 1.1.1→ 5 missing, exit 1, correctly detecting a real historical gap.release_matrix.pyreproduces the live BBC-VHDdev/spark40/setup.shbyte-for-byte, including the-1rebuild counter on the OSS package and its absence on the Internal one.bump_bbcvhd.pyrun against a copy of the real BBC-VHD files produces a 2-line diff with no line-ending damage.actionlintclean on both workflows.black==22.3.0(the pinned CI version) clean on all changed Python.Expected values in the tests are transcribed from live v1.1.1 / v1.1.3 data rather than from documentation, so a failure means the tooling has drifted from what was actually shipped.
Note for #2540
release-tag.ymlcreatesv<version>-python3.11onmasterbut notv<version>-spark3.5. That tag exists for both released versions that use the convention:Worth adding there, since it's the tag the Spark 3.5 publish leg keys off.
Not included
Anything that crosses into Azure DevOps (the
SynapseML-Internalbump, triggering the publish pipeline, opening the BBC-VHD PR) is deliberately left out of this repo — it would need an ADO PAT in a public repository. That half belongs in the ADOSynapseML-OSSrepo, which already has a GitHub service connection and can drive both sides.