Skip to content

Conversation

@saewoni
Copy link
Contributor

@saewoni saewoni commented Sep 26, 2025


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings September 26, 2025 06:02
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Sep 26, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link

Hi @saewoni,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 26, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
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 adds better null value handling for the LocalDNS configuration feature in Azure AKS CLI extension. The change addresses edge cases where DNS override sections can be null in JSON configuration files, preventing crashes and ensuring proper handling of empty or partial configurations.

  • Introduces a process_dns_overrides helper function to safely handle null values in DNS configurations
  • Adds comprehensive test coverage for various edge cases and invalid scenarios
  • Updates test data files to support more testing scenarios

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
_helpers.py Adds process_dns_overrides utility function for null-safe DNS override processing
agentpool_decorator.py Refactors LocalDNS profile handling to use the new helper function
test_localdns_profile.py Adds new expected default DNS override configurations
test_aks_commands.py Extends test coverage with additional LocalDNS scenarios
test_agentpool_decorator.py Adds unit tests for LocalDNS profile updates and helper functions
test_aks_invalid_localdns_cases.py New test file with comprehensive invalid/edge case testing
data/localdnsconfig/*.json Multiple test configuration files for various scenarios
HISTORY.rst Documents the fix in release notes

Comment on lines +10 to +11

class InvalidLocalDnsConfigTests:
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

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

The class InvalidLocalDnsConfigTests should inherit from a proper test base class (like ScenarioTest or unittest.TestCase) to ensure proper test framework integration and access to test utilities.

Suggested change
class InvalidLocalDnsConfigTests:
from azure.cli.testsdk import ScenarioTest
class InvalidLocalDnsConfigTests(ScenarioTest):

Copilot uses AI. Check for mistakes.
@saewoni saewoni changed the title Sakwa/feature localdns none input handling LocalDNS - Add more Live Test Cases Sep 26, 2025
@github-actions
Copy link

github-actions bot commented Sep 26, 2025

Hi @saewoni

Release Suggestions

Module: aks-preview

  • Update VERSION to 18.0.0b41 in src/aks-preview/setup.py

Notes

@yonzhan yonzhan requested a review from zhoxing-ms September 26, 2025 06:30
* Add blue-green upgrade strategy support for AKS node pools:
- `az aks nodepool add/update/upgrade`: Add `--upgrade-strategy` parameter to switch between rolling and blue-green nodepool upgrades.
- `az aks nodepool add/update/upgrade`: Add `--drain-batch-size`, `--drain-timeout-bg`, `--batch-soak-duration`, `--final-soak-duration` parameters to configure blue-green upgrade settings.
* Fix `--localdns-config` parameter to handle null values in JSON configuration files gracefully, preventing crashes when DNS override sections are null.
Copy link
Member

Choose a reason for hiding this comment

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

please either choose a new version number or move your history notes to the pending section

return None


def process_dns_overrides(overrides_dict, target_dict, build_override_func):
Copy link
Member

Choose a reason for hiding this comment

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

similar to the change in #9188, is the work duplicated?

Copy link
Contributor

Choose a reason for hiding this comment

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

this will be a follow up PR! once #9188 is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

abandoning/closing this PR and will be making a new PR since juan's is merged: #9252

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@saewoni saewoni closed this Sep 29, 2025
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.

5 participants