Skip to content

Add normalized location to delete endpoint call#145

Merged
joratz merged 1 commit intomainfrom
users/joratz/normalizedelete
Jan 8, 2026
Merged

Add normalized location to delete endpoint call#145
joratz merged 1 commit intomainfrom
users/joratz/normalizedelete

Conversation

@joratz
Copy link
Contributor

@joratz joratz commented Jan 8, 2026

This pull request refactors how Azure region locations are normalized in the BotConfigurator service. The normalization logic, which converts display names like "Canada Central" into API-friendly names like "canadacentral", has been extracted into a dedicated helper method. This change improves maintainability and ensures consistent location formatting across endpoint creation and deletion operations.

Refactoring and Consistency Improvements:

  • Extracted location normalization logic into a private NormalizeLocation helper method, replacing inline normalization in both CreateEndpointWithAgentBlueprintAs and DeleteEndpointWithAgentBlueprintAsync. This ensures consistent formatting and easier future updates. [1] [2]
  • Updated the DeleteEndpointWithAgentBlueprintAsync method to use the normalized location value in both the request body and logging, aligning it with the creation workflow and preventing potential mismatches.

@joratz joratz requested a review from a team as a code owner January 8, 2026 01:07
Copilot AI review requested due to automatic review settings January 8, 2026 01:07
@joratz joratz requested a review from a team as a code owner January 8, 2026 01:07
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 pull request refactors the location normalization logic in the BotConfigurator service by extracting it into a dedicated helper method. The change improves code maintainability by eliminating duplicate normalization code and ensures consistent location formatting across both endpoint creation and deletion operations.

Key changes:

  • Extracted inline location normalization logic into a reusable NormalizeLocation helper method
  • Applied normalized location to the deletion endpoint request body and logging
  • Fixed variable naming inconsistency in the delete method (renamed createEndpointBody to deleteEndpointBody)

@joratz joratz enabled auto-merge (squash) January 8, 2026 01:14
@joratz joratz merged commit 4c5eb33 into main Jan 8, 2026
11 of 12 checks passed
@joratz joratz deleted the users/joratz/normalizedelete branch January 8, 2026 01:18
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.

4 participants