Skip to content

ci: remove unnecessary conda env and Azure auth from Style job#2544

Open
BrendanWalsh wants to merge 2 commits intomasterfrom
brwals/slim-style-check
Open

ci: remove unnecessary conda env and Azure auth from Style job#2544
BrendanWalsh wants to merge 2 commits intomasterfrom
brwals/slim-style-check

Conversation

@BrendanWalsh
Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

Removes unnecessary dependencies from the CI Style job:

  • AzureCLI@2 wrapper → plain bash step for sbt scalastyle. The Azure auth is not needed — Secrets.scala values are all lazy val and never accessed during scalastyle.
  • Full conda environment (R, torch, horovod, pyspark, langchain, etc.) → pip install black[jupyter]==22.3.0. The only tool needed is black.

Validation

Tested in a clean container (eclipse-temurin:8-jdk-jammy):

  • sbt scalastyle test:scalastyle — ✅ passes without Azure CLI or conda
  • black --check — ✅ identical results (233 .py + 57 .ipynb files) with pip-only install

History

Python style checking was originally added via pip install -r requirements.txt (PR #1520, Jun 2022). The conda template was added later during a refactor — not for any functional reason.

How is this patch tested?

The PR CI itself validates this change — if the Style job passes, the change works.

The Style job was using AzureCLI@2 for sbt scalastyle (which doesn't
need Azure auth — Secrets.scala values are all lazy) and installing
the full conda environment (R, torch, horovod, langchain, etc.) just
to run black.

Replace with direct sbt invocation and pip install of black[jupyter].
Validated in a clean container: both scalastyle and black produce
identical results without conda or Azure auth.

History: Python style was originally added via pip install (PR #1520,
Jun 2022). The conda template was added later during a refactor,
not for any functional reason.
Copilot AI review requested due to automatic review settings April 4, 2026 03:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 694f769.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

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

This PR simplifies the Azure DevOps Style job in pipeline.yaml by removing Azure authentication and the full conda environment setup, replacing them with direct bash execution for Scala style checks and a minimal pip-based install for Black.

Changes:

  • Replace AzureCLI@2 wrapper with a plain bash step for sbt scalastyle test:scalastyle.
  • Remove templates/conda.yml from the Style job and switch Python formatting to pip install black[jupyter]==22.3.0 before running black.
Show a summary per file
File Description
pipeline.yaml Simplifies the Style job by removing AzureCLI + conda env usage and installing Black via pip for Python formatting checks.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines 106 to 109
- bash: |
set -e
source activate synapseml
pip install -q "black[jupyter]==22.3.0"
black --diff --color . && black --check -q .
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The Style job now installs Black via pip, but unlike other jobs it no longer provisions a known Python runtime (e.g., via UsePythonVersion in templates/update_cli.yml) and also removed the conda environment that previously guaranteed a writable Python env. This can make pip install and/or the black executable resolution fail depending on the hosted agent image.

Consider adding an explicit Python setup step (or creating a venv) before installing/running Black, and optionally add the same retry/timeout pattern used elsewhere in the pipeline for pip installs to reduce transient CI failures.

See below for a potential fix:

    - task: UsePythonVersion@0
      displayName: 'Use Python 3'
      inputs:
        versionSpec: '3.10'
    - bash: |
        set -e
        python -m pip install --upgrade pip
        for i in 1 2 3; do
          python -m pip install -q "black[jupyter]==22.3.0" && break
          if [ "$i" -eq 3 ]; then
            exit 1
          fi
          sleep 10
        done
        python -m black --diff --color . && python -m black --check -q .

Copilot uses AI. Check for mistakes.
Address review feedback — add UsePythonVersion to ensure a consistent
Python runtime on the hosted agent.
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.

2 participants