Skip to content

ci: gate Databricks CPU and GPU tests independently - #2582

Merged
ranadeepsingh merged 2 commits into
rana/harden-sbt-maven-429from
ci/databricks-impact-gating
Aug 4, 2026
Merged

ci: gate Databricks CPU and GPU tests independently#2582
ranadeepsingh merged 2 commits into
rana/harden-sbt-maven-429from
ci/databricks-impact-gating

Conversation

@ranadeepsingh

@ranadeepsingh ranadeepsingh commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Related Issues/PRs

PR #2581 is cross-fork, so GitHub native stacks cannot include it directly. This PR is based on an upstream mirror of its exact head commit.

What changes are proposed?

  • Classify changed paths against the actual Databricks CPU and GPU notebook/runtime dependencies.
  • Emit independent runDatabricksCpuE2E and runDatabricksGpuE2E decisions.
  • Use separate CPU and GPU jobs with direct output-variable conditions; the CPU job expands to five matrix legs while GPU remains one leg.
  • Fail open for shared build/runtime infrastructure, unknown paths, unsafe paths, and missing diffs.
  • Add focused path-classification, pipeline-wiring, and template tests.

This prevents CPU-only changes such as LightGBM work from waiting for scarce GPU capacity or executing unrelated GPU fine-tuning notebooks.

ADO validation

  • Build 229194199 exposed that suite-dependent conditions on one matrix job produced zero jobs despite both detector outputs being true.
  • The job split fixes that Azure Pipelines evaluation issue.
  • Build 229205405 completed all 67 jobs successfully, including five CPU Databricks jobs and the GPU job.
  • The cumulative CI-only validation intentionally ran both suites because pipeline.yaml changes are fail-open. Future CPU-only/GPU-only PRs use the independent path decisions.

How is this patch tested?

  • Unit tests cover CPU-only, GPU-only, shared, safe, unknown, and fail-open paths.
  • Full stack validation: 35 Python tests, Black, ScalaStyle, YAML parsing, and whitespace checks.
  • Full ADO validation passed.

Dependencies / feature surface

  • No dependency changes.
  • CI behavior only; no user-facing feature.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Hey @ranadeepsingh 👋!
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.

@ranadeepsingh ranadeepsingh changed the title Gate Databricks CPU and GPU tests independently ci: gate Databricks CPU and GPU tests independently Aug 1, 2026
## Summary
Classify changed paths against the actual Databricks CPU and GPU runtime surfaces, emit separate fail-open decisions, and gate each matrix leg independently.

## Prompting Intent
The engineer asked to determine exactly when Databricks tests should run, lock down the path rules, and deliver the work as a stacked pull request above PR #2581.

## Linked Sources
- Base CI hardening PR: #2581
- GitHub stacked PR documentation: https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/creating-stacked-pull-requests
- ADO timing audit: build 229176406

## Rationale
CPU and GPU decisions are separated because most module changes cannot affect the expensive GPU notebooks. Unknown paths and shared build or test infrastructure remain fail-open, while explicit test-only and unrelated tooling paths skip safely. This preserves coverage while avoiding unrelated GPU capacity waits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

Status update: #2588 merged as 27bfeefd. It adds the T4 local RAG notebook to the active Databricks GPU suite and updates the shared GPU library pins. This does not supersede the independent CPU/GPU gating work here. When this stack is rebased onto master, please ensure the impact classifier continues treating changes to the new GPU notebook, its suite registration, and GPU dependency pins as GPU-affecting paths.

* Fix and streamline release branch compatibility checks

## Summary
Run release compatibility checks for both GitHub target-branch formats and replace redundant compile, setup, credential, and per-package SBT tasks with one cached, project-scoped validation process.

## Prompting Intent
The engineer asked to fix the silently skipped ReleaseBranchCompat job and simplify it before enabling it so the check is both reliable and efficient.

## Linked Sources
- Base CI hardening PR: #2581
- Evidence build with skipped phase: ADO build 229176406
- Parent stack layer: ci/databricks-impact-gating

## Rationale
The target condition accepts both values observed across Azure Repos and GitHub PR providers. A single SBT process retains full test compilation and the intended core, VW, and OpenCV compatibility suites while removing repeated build loading, root-wide IntelliJ setup, unnecessary Key Vault access, and Azure CLI authentication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: use Entra authentication for ACR cleanup (#2584)

* Use Entra authentication for ACR cleanup

Make the weekly ACR cleanup schedule-only, switch it to the dedicated cleanup service connection, replace storage connection-string authentication with Azure CLI Entra authentication, and add fail-safe cleanup tests.

The engineer asked to repair the weekly cleanup failures caused by disabled key-based storage authentication, use the declared least-privileged identity, and prevent accidental CI or PR execution.

- Failed scheduled build: ADO build 228250033
- Base CI hardening PR: #2581
- Azure CLI pipeline-run reference: https://learn.microsoft.com/en-us/cli/azure/acr/pipeline-run
- Parent stack layer: ci/release-branch-compat

Using az storage blob exists with auth-mode login keeps all operations inside the AzureCLI task identity and removes runtime SDK installation, Key Vault access, and storage keys. Images are deleted only after the archive is confirmed, and subprocess argument lists avoid shell interpolation of registry-controlled names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove redundant CI authentication and Conda work (#2585)

## Summary
Run non-Azure setup and coverage commands as Bash steps, install pinned Black without restoring the 8.6 GB Conda environment, and remove the ineffective standalone Conda cache consumer.

## Prompting Intent
The engineer asked for additional improvements that should ship with the requested CI fixes to make builds faster and more reliable without broad behavioral changes.

## Linked Sources
- CI efficiency audit from ADO build 229176406
- Base CI hardening PR: #2581
- Parent stack layer: ci/fix-acr-cleanup-auth

## Rationale
AzureCLI tasks create an isolated login for every invocation, so setup and coverage steps that never call az gain no authentication benefit. The Style job only needs pinned Black, not the full cached environment. The standalone Conda job was not a dependency and therefore could not prewarm consumers or prevent cold-cache fan-out.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ranadeepsingh
ranadeepsingh merged commit 124d521 into rana/harden-sbt-maven-429 Aug 4, 2026
3 checks passed
@ranadeepsingh
ranadeepsingh deleted the ci/databricks-impact-gating branch August 4, 2026 07:05
ranadeepsingh added a commit to ranadeepsingh/SynapseML that referenced this pull request Aug 4, 2026
## Summary
Merge the reviewed microsoft#2582 squash commit back into microsoft#2581 after a concurrent
master refresh displaced the child merge, restoring the cumulative microsoft#2582-
microsoft#2585 pipeline changes on top of current master.

## Prompting Intent
The engineer asked to diagnose the failing tests on microsoft#2581 while completing,
reviewing, and fully validating the stacked CI pull requests without losing
work already merged through the stack.

## Linked Sources
- Parent PR: microsoft#2581
- Databricks gating PR: microsoft#2582
- Release compatibility PR: microsoft#2583
- ACR authentication PR: microsoft#2584
- CI setup cleanup PR: microsoft#2585
- Failed Fabric build: https://msdata.visualstudio.com/b9b2accc-2d1c-45b3-9d24-0eb5d78cc47f/_build/results?buildId=229191951

## Rationale
The old red build was caused by a transient DNS failure resolving the Fabric
service endpoint, not by the CI changes. During the investigation, a branch
refresh raced with the stacked merges and moved microsoft#2581 past microsoft#2582's squash
commit. Merging the official squash commit preserves the exact reviewed child
tree and its history instead of reconstructing or duplicating those changes,
while retaining the latest master updates already present on the parent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant