ci: add release branch compatibility check to PR validation#2548
ci: add release branch compatibility check to PR validation#2548smamindl wants to merge 1 commit intomicrosoft:masterfrom
Conversation
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a PR-validation CI job intended to detect whether release branches (starting with spark4.0) can be cleanly rebased onto the PR head and still compile.
Changes:
- Introduces a
ReleaseBranchCompatjob that fetches a release branch, attempts a rebase onto the PR head, and then runssbt compile test:compile. - Uses a matrix strategy to make it easy to add more release branches.
- Marks the job as non-blocking via
continueOnError: true.
| git checkout FETCH_HEAD | ||
| git rebase --onto HEAD $MASTER_BASE 2>&1 || { |
There was a problem hiding this comment.
git rebase --onto HEAD ... is using HEAD after git checkout FETCH_HEAD, so HEAD now points to the release branch tip rather than the PR head. This makes the rebase target incorrect (effectively rebasing onto the release tip). Capture the PR head commit hash before switching to FETCH_HEAD (e.g., PR_HEAD=$(git rev-parse HEAD)) and use that in --onto (git rebase --onto $PR_HEAD $MASTER_BASE).
| - task: AzureCLI@2 | ||
| displayName: 'Compile $(RELEASE_BRANCH) after rebase' | ||
| timeoutInMinutes: 20 | ||
| inputs: | ||
| azureSubscription: 'SynapseML Build' | ||
| scriptLocation: inlineScript | ||
| scriptType: bash | ||
| inlineScript: | |
There was a problem hiding this comment.
This compile step uses AzureCLI@2 with a service connection (azureSubscription), even though the script only runs sbt. For PR validation—especially from forks—service connections are typically unavailable and can also increase secret-exposure risk. Use a plain script task (e.g., Bash@3) for the sbt invocation, or add a condition to skip this task when the PR is from a fork (e.g., based on System.PullRequest.IsFork).
| - task: AzureCLI@2 | |
| displayName: 'Compile $(RELEASE_BRANCH) after rebase' | |
| timeoutInMinutes: 20 | |
| inputs: | |
| azureSubscription: 'SynapseML Build' | |
| scriptLocation: inlineScript | |
| scriptType: bash | |
| inlineScript: | | |
| - task: Bash@3 | |
| displayName: 'Compile $(RELEASE_BRANCH) after rebase' | |
| timeoutInMinutes: 20 | |
| inputs: | |
| targetType: inline | |
| script: | |
| inlineScript: | | ||
| set -e | ||
| export SBT_OPTS="-Xmx4G -Xss2M -Duser.timezone=GMT" | ||
| echo "=== Compiling $(RELEASE_BRANCH) rebased onto PR HEAD ===" | ||
| sbt compile test:compile | ||
| echo "##vso[task.logissue type=info]$(RELEASE_BRANCH) compiles successfully after rebase" |
There was a problem hiding this comment.
PR description says "Reports merge conflicts and compile failures as warnings", but compile failures here will fail the task without emitting a type=warning logissue (only success emits type=info). If you want failures to be reported as warnings, catch sbt non-zero exit and log ##vso[task.logissue type=warning]... before exiting non-zero (or set continueOnError: true on this task and explicitly log the warning on failure).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2548 +/- ##
==========================================
- Coverage 84.70% 82.30% -2.40%
==========================================
Files 335 335
Lines 17753 17753
Branches 1615 1615
==========================================
- Hits 15037 14611 -426
- Misses 2716 3142 +426 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
56b0c9e to
3c33dca
Compare
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hey @smamindl 👋! 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. |
3c33dca to
2faa481
Compare
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Add a ReleaseBranchCompat job that runs on every PR to master. It rebases each release branch (starting with spark4.0) onto the PR HEAD and runs sbt compile test:compile to catch breakage before it lands in master. - Non-blocking (continueOnError: true) - Matrix-based for easy expansion to more release branches - Reports merge conflicts and compile failures as warnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2faa481 to
bcad72b
Compare
|
Azure Pipelines: 1 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Add a ReleaseBranchCompat job that runs on every PR to master. It rebases each release branch (starting with spark4.0) onto the PR HEAD and runs sbt compile test:compile to catch breakage before it lands in master.
Related Issues/PRs
#xxx
What changes are proposed in this pull request?
Briefly describe the changes included in this Pull Request.
How is this patch tested?
Does this PR change any dependencies?
Does this PR add a new feature? If so, have you added samples on website?
website/docs/documentationfolder.Make sure you choose the correct class
estimators/transformersand namespace.DocTablepoints to correct API link.yarn run startto make sure the website renders correctly.<!--pytest-codeblocks:cont-->before each python code blocks to enable auto-tests for python samples.WebsiteSamplesTestsjob pass in the pipeline.