Skip to content

v5.0.3 Release - #212

Merged
Bryan Soltis (BryanSoltis) merged 14 commits into
Azure:mainfrom
BryanSoltis:main
Sep 15, 2026
Merged

Bryan Soltis (BryanSoltis) merged 14 commits into
Azure:mainfrom
BryanSoltis:main

Conversation

@BryanSoltis

@BryanSoltis Bryan Soltis (BryanSoltis) commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and refactors across the project, focusing on more robust handling of resource component selection in the UI, improved transaction safety in the repository layer, and enhanced name validation logic. Additionally, it updates dependencies and project configuration for better maintainability.

UI and Data Handling Improvements:

  • Refactored EditModal.razor to use HashSet<string> for tracking optional and excluded resource components, simplifying checkbox binding and state management, and replaced string parsing with strongly-typed collections and helper methods. [1] [2] [3] [4] [5] [6] [7]

Repository and Transaction Safety:

  • Improved SaveAllAsync in SQLiteConfigurationRepository.cs to persist entity deletions before inserts, preventing UNIQUE constraint violations when replacing entities with the same primary keys.

Resource Name Validation and Generation:

  • Enhanced ResourceNamingRequestService.cs to accurately track and adjust the position and length of the ResourceInstance component in generated names, even after validation and delimiter changes, ensuring correct handling for auto-increment and duplicate checks. [1] [2] [3] [4] [5]

Project Configuration and Dependency Updates:

  • Updated AzureNamingTool.csproj:
    • Incremented project version to 5.0.3 and updated Microsoft.OpenApi to 3.9.0.
    • Added SQLitePCLRaw.lib.e_sqlite3 dependency.
    • Excluded publish/** artifacts from build outputs.
    • Made internals visible to the unit test project. [1] [2] [3] [4]

Code Cleanup:

  • Removed unused System.Text.RegularExpressions import from ResourceNamingRequestService.cs.

Issues Resolved

Bryan Soltis (BryanSoltis) and others added 14 commits July 29, 2026 13:34
- exclude publish artifacts from project items to prevent BLAZOR106

- fix modal footer placement and tag balance in EditModal

- restore duplicate-name auto increment path and trailing instance replacement

- batch resource type component updates into one SaveAllAsync

- update UiTests target framework to net10.0 and refresh subscription metadata defaults
Bug fixes and security updates
fix(sqlite): avoid unique key conflicts in SaveAllAsync
# Conflicts:
#	src/AzureNamingTool.csproj
#	src/Components/Modals/EditModal.razor
Add tenant-level naming validation, persist resource type checkbox changes, safely batch SQLite replacements, and make instance auto-increment position-aware. Document the fixes in the 5.0.3 release alert and add focused regression coverage.

Fixes Azure#201

Fixes Azure#204

Fixes Azure#205

Fixes Azure#208

Fixes Azure#209
Co-authored-by: BryanSoltis <13591910+BryanSoltis@users.noreply.github.com>
Fix naming configuration regressions and expand resource types
feat: update Azure resource location metadata
Copilot AI lite review requested due to automatic review settings September 15, 2026 14:43
@BryanSoltis
Bryan Soltis (BryanSoltis) merged commit 6690154 into Azure:main Sep 15, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved persistence, component normalization, name-tracking, and resource-metadata issues remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Release 5.0.3 improves resource-component handling, SQLite replacement safety, validation metadata, dependencies, and test coverage.

Changes:

  • Refactors component selection and bulk updates.
  • Improves resource-name validation and instance tracking.
  • Updates catalogs, dependencies, project configuration, and tests.
File summaries
File Summary
tests/AzureNamingTool.UnitTests/Services/ResourceTypeServiceTests.cs Tests batched component updates.
tests/AzureNamingTool.UnitTests/Services/ResourceNamingRequestServiceTests.cs Tests resource-instance replacement.
tests/AzureNamingTool.UnitTests/Repositories/SQLiteConfigurationRepositoryTests.cs Tests primary-key reuse and rollback.
tests/AzureNamingTool.UnitTests/Helpers/ValidationHelperTests.cs Tests metadata and naming rules.
tests/AzureNamingTool.UiTests/AzureNamingTool.UiTests.csproj Updates .NET and AngleSharp dependencies.
src/versionalerts.json Adds release alert content.
src/Services/ResourceTypeService.cs Batches component updates.
src/Services/ResourceNamingRequestService.cs Tracks resource-instance positions during validation.
src/repository/resourcetypes.json Updates resource validation metadata.
src/repository/resourcelocations.json Adds Azure regions.
src/Repositories/SQLiteConfigurationRepository.cs Adds transactional replacement behavior.
src/programsettings.json Updates the project version.
src/configurationfileversions.json Updates catalog versions.
src/Components/Modals/EditModal.razor Refactors component checkbox state handling.
src/AzureNamingTool.csproj Updates version, dependencies, and build configuration.
Review details

Suppressed comments (3)

src/Components/Modals/EditModal.razor:1178

  • The persisted component tokens are stored verbatim, but the checkbox keys are normalized with NormalizeName(..., true). The repository already contains values such as Exclude: ResourceType; that token never matches the type checkbox key, so opening and saving a subscription silently drops this exclusion. Normalize each parsed token with the same helper before populating the set.
    private static HashSet<string> ParseComponentSelection(string? value)
    {
        return new HashSet<string>(
            (value ?? String.Empty).Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries),
            StringComparer.OrdinalIgnoreCase);

src/Services/ResourceNamingRequestService.cs:938

  • The tracked span is not updated after an auto-incremented candidate is validated. If the original instance is 99 and the next candidate is 100, the next loop still removes only two characters from the ...100... name, so it replaces the wrong substring; the same problem occurs if validation removes delimiters from an incremented name. Recompute the component's start and length from the validated name after every replacement before the next duplicate check.
                                        string incrementedName = ReplaceResourceInstance(
                                            originalname,
                                            resourceInstanceStartIndex,
                                            resourceInstanceLength,
                                            newinstance);

src/repository/resourcetypes.json:6540

  • The new catalog key is singular, but the ARM resource type is Microsoft.Network/dnsForwardingRulesets (plural). AzureValidationService converts this value directly for its Resource Graph query, so this entry produces microsoft.network/dnsforwardingruleset and will not match DNS forwarding ruleset resources. Rename it to the plural resource type.
    "resource": "Network/dnsForwardingRuleset",
  • Files reviewed: 15/15 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


// Add new entities
// Add replacement entities and persist insert in a second batch.
await _dbSet.AddRangeAsync(entities);
Comment on lines +2993 to +2994
"lengthMin": "3",
"lengthMax": "50",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants