Skip to content

ci: add release branch compatibility check to PR validation#2548

Closed
smamindl wants to merge 1 commit intomicrosoft:masterfrom
smamindl:smamindl/release-branch-compat
Closed

ci: add release branch compatibility check to PR validation#2548
smamindl wants to merge 1 commit intomicrosoft:masterfrom
smamindl:smamindl/release-branch-compat

Conversation

@smamindl
Copy link
Copy Markdown
Collaborator

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

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?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

Copilot AI review requested due to automatic review settings April 14, 2026 21:04
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
1 pipeline(s) require an authorized user to comment /azp run to run.

@smamindl
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ReleaseBranchCompat job that fetches a release branch, attempts a rebase onto the PR head, and then runs sbt 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.

Comment thread pipeline.yaml
Comment on lines +840 to +841
git checkout FETCH_HEAD
git rebase --onto HEAD $MASTER_BASE 2>&1 || {
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment thread pipeline.yaml
Comment on lines +852 to +859
- task: AzureCLI@2
displayName: 'Compile $(RELEASE_BRANCH) after rebase'
timeoutInMinutes: 20
inputs:
azureSubscription: 'SynapseML Build'
scriptLocation: inlineScript
scriptType: bash
inlineScript: |
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- 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: |

Copilot uses AI. Check for mistakes.
Comment thread pipeline.yaml Outdated
Comment on lines +859 to +864
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"
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.30%. Comparing base (a833941) to head (bcad72b).

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@smamindl smamindl force-pushed the smamindl/release-branch-compat branch from 56b0c9e to 3c33dca Compare April 14, 2026 21:37
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
1 pipeline(s) require an authorized user to comment /azp run to run.

@smamindl
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@github-actions
Copy link
Copy Markdown

Hey @smamindl 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@smamindl smamindl force-pushed the smamindl/release-branch-compat branch from 3c33dca to 2faa481 Compare April 14, 2026 22:40
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
1 pipeline(s) require an authorized user to comment /azp run to run.

@smamindl
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

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>
@smamindl smamindl force-pushed the smamindl/release-branch-compat branch from 2faa481 to bcad72b Compare April 14, 2026 23:31
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
1 pipeline(s) require an authorized user to comment /azp run to run.

@smamindl
Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@smamindl smamindl closed this Apr 15, 2026
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.

3 participants