Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve validation to catch use of armID as name #3621

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

super-harsh
Copy link
Collaborator

Closes #3019

What this PR does / why we need it:

This PR adds validation to ResolveReference method to catch if the name provided is an armID and output an error message with suggestion.

If applicable:

  • this PR contains documentation
  • this PR contains tests

@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2023

Codecov Report

Attention: 1398 lines in your changes are missing coverage. Please review.

Comparison is base (f6ab7ee) 53.08% compared to head (a159666) 53.27%.
Report is 12 commits behind head on main.

Files Patch % Lines
...v1api20210601/storage/flexible_server_types_gen.go 56.58% 274 Missing and 174 partials ⚠️
...api20221201/flexible_servers_database_types_gen.go 49.56% 151 Missing and 21 partials ⚠️
...221201/flexible_servers_firewall_rule_types_gen.go 50.43% 149 Missing and 20 partials ⚠️
...221201/flexible_servers_configuration_types_gen.go 58.95% 143 Missing and 22 partials ⚠️
...torage/flexible_servers_configuration_types_gen.go 60.61% 65 Missing and 24 partials ⚠️
...601/storage/flexible_servers_database_types_gen.go 51.63% 65 Missing and 24 partials ⚠️
...torage/flexible_servers_firewall_rule_types_gen.go 51.63% 65 Missing and 24 partials ⚠️
...220120preview/storage/flexible_server_types_gen.go 44.08% 28 Missing and 24 partials ⚠️
...v1api20221201/storage/flexible_server_types_gen.go 49.27% 33 Missing and 2 partials ⚠️
.../v1api20220120preview/flexible_server_types_gen.go 63.82% 9 Missing and 8 partials ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3621      +/-   ##
==========================================
+ Coverage   53.08%   53.27%   +0.18%     
==========================================
  Files        1286     1341      +55     
  Lines      406699   438372   +31673     
==========================================
+ Hits       215894   233530   +17636     
- Misses     159804   170342   +10538     
- Partials    31001    34500    +3499     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

super-harsh and others added 2 commits December 4, 2023 20:22
Co-authored-by: Bevan Arps <bevan.arps@microsoft.com>
@matthchr matthchr added this pull request to the merge queue Dec 5, 2023
Merged via the queue into main with commit b75f812 Dec 5, 2023
@matthchr matthchr deleted the improve/name-validation branch December 5, 2023 18:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Improve validation to catch use of armID as name
4 participants