v5.0.3 Release - #212
Merged
Merged
v5.0.3 Release#212
Conversation
- 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 started reviewing on behalf of
Bryan Soltis (BryanSoltis)
September 15, 2026 14:44
View session
Contributor
There was a problem hiding this comment.
🟡 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 asExclude: ResourceType; that token never matches thetypecheckbox 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
99and the next candidate is100, 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).AzureValidationServiceconverts this value directly for its Resource Graph query, so this entry producesmicrosoft.network/dnsforwardingrulesetand 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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
EditModal.razorto useHashSet<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:
SaveAllAsyncinSQLiteConfigurationRepository.csto persist entity deletions before inserts, preventing UNIQUE constraint violations when replacing entities with the same primary keys.Resource Name Validation and Generation:
ResourceNamingRequestService.csto accurately track and adjust the position and length of theResourceInstancecomponent 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:
AzureNamingTool.csproj:5.0.3and updatedMicrosoft.OpenApito3.9.0.SQLitePCLRaw.lib.e_sqlite3dependency.publish/**artifacts from build outputs.Code Cleanup:
System.Text.RegularExpressionsimport fromResourceNamingRequestService.cs.Issues Resolved