{CI} Fix env-setup action to prevent setuptools downgrade in old PR branches#33779
Closed
naga-nandyala with Copilot wants to merge 2 commits into
Closed
{CI} Fix env-setup action to prevent setuptools downgrade in old PR branches#33779naga-nandyala with Copilot wants to merge 2 commits into
naga-nandyala with Copilot wants to merge 2 commits into
Conversation
|
Hi @copilot, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job GH Check CLI Linter
{CI} Fix env-setup action to prevent setuptools downgrade in old PR branches
Jul 23, 2026
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.
Old PR branches that haven't been rebased (e.g., from 2022) carry a stale
requirements.txtwithsetuptools==52.0.0. Whenazdev setupinstalls from this file, it silently downgrades setuptools, breakingsetuptools.build_metasupport — editable installs fail butazdev setupexits 0, leaving the venv withoutazure.cli. Subsequent steps likescripts/ci/service_name.pythen fail withModuleNotFoundError: No module named 'azure.cli'.Changes
.github/actions/env-setup/action.yml: Added a "Use base branch requirements" step between the PR branch checkout and the Python/azdev install. It fetchesrequirements.txtfrom the base repo/branch (depth=1, efficient) and checks it out beforeazdev setupruns, ensuring setuptools is always at a compatible version regardless of how stale the PR branch is.Related command
N/A — CI infrastructure fix only.
Testing Guide
Re-trigger the "GH Check CLI Linter" workflow on PR #21261 (
runpybranch). Previously failing withModuleNotFoundError: No module named 'azure.cli'; should now complete theazdev linterstep.History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.