Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Addresses pylint 4.0.4 linting failures in azure-ai-ml by fixing exception logging and control flow patterns in _deployment_template_operations.py.

Changes

Exception Logging (do-not-log-exceptions-if-not-debug)

  • Changed exception logging from warning to debug level in _get_registry_endpoint(), get(), and delete() to prevent sensitive information exposure in production logs

Control Flow Simplification (try-except-raise, do-not-log-raised-errors)

  • Removed try-except blocks that only logged and re-raised exceptions in create_or_update(), archive(), and restore()
  • These blocks provided no error handling value while triggering pylint violations

Import Ordering

  • Alphabetically sorted module-level imports per Python conventions
# Before
except Exception as e:
    module_logger.warning("DeploymentTemplate get operation failed: %s", e)
    raise ResourceNotFoundError(f"DeploymentTemplate {name}:{version} not found") from e

# After  
except Exception as e:
    module_logger.debug("DeploymentTemplate get operation failed: %s", e)
    raise ResourceNotFoundError(f"DeploymentTemplate {name}:{version} not found") from e

These changes align with Azure SDK Python design guidelines and match fixes previously applied for pylint 3.3.6 in #44113.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pypi.org
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python -m pip download --progress-bar off --disable-pip-version-check --only-binary=:all: --no-deps --python-version 3.9 -d /home/REDACTED/.local/share/virtualenv/wheel/house pip==24.0 (dns block)
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python -m pip download --progress-bar off --disable-pip-version-check --only-binary=:all: --no-deps --python-version 3.9 -d /home/REDACTED/.local/share/virtualenv/wheel/house setuptools==77.0.3 (dns block)
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python python -m pip install pylint==4.0.4 (dns block)
  • pypi.python.org
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python -m pip download --progress-bar off --disable-pip-version-check --only-binary=:all: --no-deps --python-version 3.9 -d /home/REDACTED/.local/share/virtualenv/wheel/house setuptools==77.0.3 (dns block)
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/python -m pip download --progress-bar off --disable-pip-version-check --only-binary=:all: --no-deps --python-version 3.9 -d /home/REDACTED/.local/share/virtualenv/wheel/house pip==24.0 (dns block)
  • scanning-api.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>azure-ai-ml needs linting updates for pylint version 4.0.4</issue_title>
<issue_description>ACTION NEEDED: This version of pylint will be merged on 2026-04-13. The build will begin to fail for this library if errors are not fixed.

Library name: azure-ai-ml
Pylint version: 4.0.4
Pylint Build: Link to build (2026-01-18)
How to fix: Run the next-pylint tox command at the library package-level and resolve the linting errors.

  1. ../azure-ai-ml>pip install "tox<5"
  2. ../azure-ai-ml>tox run -e next-pylint -c ../../../eng/tox/tox.ini --root .

See the Pylint Guide for more information.</issue_description>

Comments on the Issue (you are @copilot in this section)

@saanikaguptamicrosoft Already addressed in this PR which is part of azure-ai-ml 1.31.0 release: https://github.com//pull/44113 @saanikaguptamicrosoft Duplicate of: https://github.com//issues/43635

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update linting for azure-ai-ml to pylint version 4.0.4 Fix azure-ai-ml pylint 4.0.4 compliance Jan 19, 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.

azure-ai-ml needs linting updates for pylint version 4.0.4

2 participants