Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eng/ci_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ setuptools==77.0.3
virtualenv==20.29.3
wheel==0.45.1
packaging==24.2
tox==4.24.2
pathlib2==2.3.7.post1
doc-warden==0.7.2
beautifulsoup4==4.13.3
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
AdditionalTestArgs: '--wheel_dir="$(Build.ArtifactStagingDirectory)"'
CoverageArg: $(CoverageArg)
PythonVersion: $(PythonVersion)
ToxTestEnv: $(toxenv)
CheckEnv: $(checks)
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
InjectedPackages: $(InjectedPackages)
TestProxy: ${{ parameters.TestProxy }}
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ parameters:
default: false
- name: OSName
type: string
- name: ToxTestEnv
- name: CheckEnv
type: string
default: 'whl'
- name: UseFederatedAuth
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
${{ insert }}: ${{ parameters.EnvVars }}
PythonVersion: $(PythonVersion)
OSVmImage: $(OSVmImage)
ToxTestEnv: ${{ parameters.ToxTestEnv }}
CheckEnv: ${{ parameters.CheckEnv }}
AdditionalTestArgs: ${{ parameters.AdditionalTestArgs }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
InjectedPackages: ${{ parameters.InjectedPackages }}
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ parameters:
- name: TestProxy
type: boolean
default: false
- name: ToxTestEnv
- name: CheckEnv
type: string
default: 'whl'
- name: Packages
Expand Down Expand Up @@ -137,7 +137,7 @@ extends:
BuildDocs: ${{ parameters.BuildDocs }}
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
TestProxy: ${{ parameters.TestProxy }}
ToxTestEnv: ${{ parameters.ToxTestEnv }}
CheckEnv: ${{ parameters.CheckEnv }}
UseFederatedAuth: ${{ parameters.UseFederatedAuth }}
PersistOidcToken: ${{ parameters.PersistOidcToken }}
MatrixConfigs:
Expand Down
12 changes: 0 additions & 12 deletions eng/pipelines/templates/steps/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,13 @@ steps:
inputs:
scriptPath: 'eng/scripts/dispatch_checks.py'
arguments: '"$(TargetingString)" --disable-compatibility-filter --service=${{parameters.ServiceDirectory}} --checks="verifysdist" ${{ parameters.AdditionalTestArgs }}'
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""

- task: PythonScript@0
displayName: 'Verify whl'
condition: and(succeededOrFailed(), ne(variables['Skip.VerifyWhl'],'true'))
inputs:
scriptPath: 'eng/scripts/dispatch_checks.py'
arguments: '"$(TargetingString)" --disable-compatibility-filter --service=${{parameters.ServiceDirectory}} --checks="verifywhl" ${{ parameters.AdditionalTestArgs }}'
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""

- template: run_mypy.yml
parameters:
Expand Down Expand Up @@ -133,10 +125,6 @@ steps:
inputs:
scriptPath: 'eng/scripts/dispatch_checks.py'
arguments: '"$(TargetingString)" --disable-compatibility-filter --service=${{parameters.ServiceDirectory}} --checks=verify_keywords ${{ parameters.AdditionalTestArgs }}'
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
condition: and(succeededOrFailed(), ne(variables['Skip.KeywordCheck'],'true'))

- template: ../steps/run_bandit.yml
Expand Down
4 changes: 0 additions & 4 deletions eng/pipelines/templates/steps/build-extended-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ steps:
--service="${{ parameters.ServiceDirectory }}"
--checks="sphinx"
--wheel_dir="$(Build.ArtifactStagingDirectory)"
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
- ${{ if eq(parameters.RunApiStubGen, 'true') }}:
- template: /eng/pipelines/templates/steps/run_apistub.yml
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/templates/steps/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
BeforeTestSteps: []
AfterTestSteps: []
CoverageArg: ''
ToxTestEnv: ""
CheckEnv: ""
RunCoverage: ne(variables['CoverageArg'], '--disablecov')
ToxEnvParallel: ''
InjectedPackages: ''
Expand Down Expand Up @@ -87,7 +87,7 @@ steps:
${{ parameters.CoverageArg }}
--mark_arg="$markArg"
--service="${{ parameters.ServiceDirectory }}"
--checks="${{ parameters.ToxTestEnv }}"
--checks="${{ parameters.CheckEnv }}"
--injected-packages="${{ parameters.InjectedPackages }}";
Write-Host "Last exit code: $LASTEXITCODE";
exit $LASTEXITCODE;
Expand All @@ -109,7 +109,7 @@ steps:
${{ parameters.CoverageArg }} `
--mark_arg="$markArg" `
--service="${{ parameters.ServiceDirectory }}" `
--checks="${{ parameters.ToxTestEnv }}" `
--checks="${{ parameters.CheckEnv }}" `
--injected-packages="${{ parameters.InjectedPackages }}";
exit $LASTEXITCODE;
env: ${{ parameters.EnvVars }}
Expand Down
4 changes: 0 additions & 4 deletions eng/pipelines/templates/steps/run_bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ steps:
--disable-compatibility-filter
--disablecov
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
condition: and(succeededOrFailed(), ne(variables['Skip.Bandit'],'true'))
4 changes: 0 additions & 4 deletions eng/pipelines/templates/steps/run_black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ steps:
--disable-compatibility-filter
--filter-type="Omit_management"
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
condition: and(succeededOrFailed(), ne(variables['Skip.Black'],'true'))
4 changes: 0 additions & 4 deletions eng/pipelines/templates/steps/run_breaking_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ steps:
--checks="breaking"
--disable-compatibility-filter
--disablecov
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
condition: and(succeededOrFailed(), ne(variables['Skip.BreakingChanges'],'true'))
4 changes: 0 additions & 4 deletions eng/pipelines/templates/steps/run_mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ steps:
--disablecov
--disable-compatibility-filter
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""
condition: and(succeededOrFailed(), ne(variables['Skip.MyPy'],'true'))
2 changes: 0 additions & 2 deletions eng/pipelines/templates/steps/run_pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ steps:
--disable-compatibility-filter
--filter-type="Omit_management"
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
condition: and(succeededOrFailed(), ne(variables['Skip.Pylint'],'true'))
10 changes: 2 additions & 8 deletions eng/pipelines/templates/steps/run_pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ steps:
--check="pyright"
--disable-compatibility-filter
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""

condition: and(succeededOrFailed(), ne(variables['Skip.Pyright'],'true'))

- task: PythonScript@0
Expand All @@ -34,8 +31,5 @@ steps:
--check="verifytypes"
--disable-compatibility-filter
${{ parameters.AdditionalTestArgs }}
env:
TOX_PIP_IMPL: "uv"
VIRTUAL_ENV: ""
PYTHONHOME: ""

condition: and(succeededOrFailed(), ne(variables['Skip.Verifytypes'],'true'))
1 change: 0 additions & 1 deletion eng/regression_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ virtualenv==20.23.0
wheel==0.43.0
Jinja2==3.1.2
packaging==23.1
tox==4.5.0
pathlib2==2.3.5
doc-warden==0.7.2
beautifulsoup4==4.9.1
Expand Down
51 changes: 0 additions & 51 deletions eng/scripts/invoke-tox-parallel.ps1

This file was deleted.

12 changes: 6 additions & 6 deletions eng/scripts/set_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ def resolve_devops_variable(var_value: str) -> List[str]:
if var_value.startswith("$("):
return []
else:
return [tox_env.strip() for tox_env in var_value.split(",") if tox_env.strip()]
return [check.strip() for check in var_value.split(",") if check.strip()]
else:
return []


def set_devops_value(resolved_set: List[str]) -> None:
string_value = ",".join(resolved_set)
set_ci_variable("toxenv", string_value)
set_ci_variable("checks", string_value)


def remove_unsupported_values(selected_set: List[str], unsupported_values: List[str]):
for unsupported_tox_env in unsupported_values:
if unsupported_tox_env in selected_set:
selected_set.remove(unsupported_tox_env)
for unsupported_check in unsupported_values:
if unsupported_check in selected_set:
selected_set.remove(unsupported_check)


def process_ci_skips(glob_string: str, service: str) -> None:
Expand Down Expand Up @@ -93,7 +93,7 @@ def process_ci_skips(glob_string: str, service: str) -> None:
"-o",
"--override",
dest="override_set",
help='If you have a set of tox environments that should override the defaults, provide it here. In CI this is runtime variable $(ChecksOverride). EG: "whl,sdist".',
help='If you have a set of checks that should override the defaults, provide it here. In CI this is runtime variable $(ChecksOverride). EG: "whl,sdist".',
)

parser.add_argument(
Expand Down
24 changes: 0 additions & 24 deletions eng/tools/azure-sdk-tools/ci_tools/environment_exclusions.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,6 @@ def is_check_enabled(package_path: str, check: str, default: Any = True) -> bool
return config


def filter_tox_environment_string(namespace_argument: str, package_path: str) -> str:
"""
Takes an incoming comma separated list of tox environments and package name. Resolves whether or not
each given tox environment should run, given comparison to single unified exclusion file in `environment_exclusions`.

:param namespace_argument: A namespace argument. This takes the form of a comma separated list: "whl,sdist,mindependency". "whl". "lint,pyright,sphinx".
:param package_path: The path to the package.
"""
if package_path.endswith("setup.py"):
package_path = os.path.dirname(package_path)

if namespace_argument:
tox_envs = namespace_argument.strip().split(",")
filtered_set = []

for tox_env in [env.strip().lower() for env in tox_envs]:
check_enabled = is_check_enabled(package_path, tox_env, CHECK_DEFAULTS.get(tox_env, True))
if check_enabled or tox_env in MUST_RUN_ENVS:
filtered_set.append(tox_env)
return ",".join(filtered_set)

return namespace_argument


def is_typing_ignored(package_name: str) -> bool:
"""
Evaluates a package name and evaluates whether or not this package should be ignored when invoking type checking.
Expand Down
7 changes: 4 additions & 3 deletions eng/tools/azure-sdk-tools/gh_tools/vnext_issue_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,18 @@ def create_vnext_issue(package_dir: str, check_type: CHECK_TYPE, check_version:
)
)

repo_root = discover_repo_root()
title = f"{package_name} needs {error_type} updates for {check_type} version {version}"
template = (
f"**ACTION NEEDED:** This version of {check_type} will be merged on **{merge_date}**. "
f"The build will begin to fail for this library if errors are not fixed."
f"\n\n**Library name:** {package_name}"
f"\n**{check_type.capitalize()} version:** {version}"
f"\n**{check_type.capitalize()} Build:** [Link to build ({today.strftime('%Y-%m-%d')})]({build_link})"
f"\n**How to fix:** Run the `next-{check_type}` tox command at the library package-level and resolve "
f"\n**How to fix:** Run the `next-{check_type}` azpysdk command at the library package-level and resolve "
f"the {error_type} errors.\n"
f'1) `../{package_name}>pip install "tox<5"`\n'
f"2) `../{package_name}>tox run -e next-{check_type} -c ../../../eng/tox/tox.ini --root .`\n\n"
f"1) `{repo_root}>pip install -e ./eng/tools/azure-sdk-tools`\n"
f"2) `../{package_name}>azpysdk next-{check_type} --isolate .`\n\n"
f"See the {guide_link} for more information."
)

Expand Down
8 changes: 2 additions & 6 deletions eng/tools/azure-sdk-tools/packaging_tools/package_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def create_package(prefolder, name):
@return_origin_path
def change_log_new(package_folder: str, lastest_pypi_version: bool) -> str:
os.chdir(package_folder)
cmd = f"{sys.executable} -m tox run -c ../../../eng/tox/tox.ini --root . -e breaking -- --changelog "
cmd = "azpysdk breaking --changelog"
if lastest_pypi_version:
cmd += "--latest-pypi-version"
cmd += " --latest-pypi-version"
try:
Comment on lines 33 to 38
Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't sure about this but it def can't be invoked as <executable> -m azpysdk bc it's not a module

_LOGGER.info(f"Run breaking change detector with command: {cmd}")
output = getoutput(cmd)
Expand Down Expand Up @@ -89,10 +89,6 @@ def change_log_generate(
# try new changelog tool
if prefolder:
try:
tox_cache_path = Path(prefolder, package_name, ".tox")
if tox_cache_path.exists():
_LOGGER.info(f"Remove {tox_cache_path} to avoid potential tox cache conflict")
shutil.rmtree(tox_cache_path)
return change_log_new(str(Path(prefolder) / package_name), not (last_stable_release and tag_is_stable))
except Exception as e:
_LOGGER.warning(f"Failed to generate changelog with breaking_change_detector: {e}")
Expand Down
1 change: 0 additions & 1 deletion eng/tools/azure-sdk-tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ azpysdk = "azpysdk.main:main"
conda = ["beautifulsoup4"]
systemperf = ["aiohttp>=3.0", "requests>=2.0", "tornado==6.0.3", "httpx>=0.21", "azure-core"]
ghtools = ["GitPython", "PyGithub>=1.59.0", "requests>=2.0"]
sdkgenerator = ["tox"]
Copy link
Member

@scbedd scbedd Mar 18, 2026

Choose a reason for hiding this comment

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

I agree with this. Plox double check through the whole repo to ensure this isn't used by a management script though. CC @msyyc for FYI.


[tool.setuptools]
include-package-data = true
Expand Down
2 changes: 1 addition & 1 deletion scripts/auto_release/PythonSdkLiveTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
export ISSUE_OWNER=$(ISSUE_OWNER)
# install azure-sdk-tools
python -m pip install $root_path/eng/tools/azure-sdk-tools[ghtools,sdkgenerator]
python -m pip install $root_path/eng/tools/azure-sdk-tools[ghtools]
# install requirements
python -m pip install -r $script_path/requirement.txt
Expand Down
2 changes: 1 addition & 1 deletion scripts/automation_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# init env
python -m pip install -U pip > /dev/null
python -m pip install eng/tools/azure-sdk-tools[ghtools,sdkgenerator] > /dev/null
python -m pip install eng/tools/azure-sdk-tools[ghtools] > /dev/null

# install tsp-client
echo Install tsp-client
Expand Down
Loading
Loading