-
Notifications
You must be signed in to change notification settings - Fork 5k
Add API version 2025-05-01 for dnsresolver #49921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jamesvoongms
wants to merge
27
commits into
Azure:main
Choose a base branch
from
jamesvoongms:dns-resolver-ga-version-2025-05-01
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
978e7ad
Add API version 2025-05-01
jamesvoongms d13c936
Remove recording mode
jamesvoongms 8836066
Add changes for readme.md
jamesvoongms 9af1072
Changes after removing blockresponsecode
jamesvoongms e58eb3a
Fix forwarding ruleset tests
jamesvoongms dcedb69
Run build failure commands
jamesvoongms e82004e
Regenerate after rebase
jamesvoongms ec814f0
Make test changes
jamesvoongms cf3eabd
Remove poorly generated file
jamesvoongms 05d03e1
Add generated logic
jamesvoongms 0ce36e1
Remove partial vnet usage due to bad generation of code
jamesvoongms 8b02314
Re-generate
jamesvoongms 4e4264b
Revert back partial-resources
jamesvoongms daf0053
Add comment and remove previous gen sample
jamesvoongms 94fd9ab
Update sdk version
jamesvoongms efc9559
Fix issues with readme
jamesvoongms fee58d7
Add version change
jamesvoongms 6b00637
Re-do readme
jamesvoongms df1628e
Move vnetresource to customized
jamesvoongms c5f39e4
Add code owners back for dnsresolver
jamesvoongms 8a89880
Update .github/CODEOWNERS
jamesvoongms c0617f1
Move codeowner changes down to proper ordering
jamesvoongms d957a53
Revert to version 1.2 and remove sample generation due to bug
jamesvoongms 44a7cf1
Remove rename-mappings for actions
jamesvoongms 662afb0
Add requested files into customization
jamesvoongms 765c2f4
update to fix the issue
ArcturusZhang 28f2d03
Add new generation after Arthurs fixes
jamesvoongms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
9 changes: 4 additions & 5 deletions
9
sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md
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
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
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
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
2 changes: 1 addition & 1 deletion
2
...nsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj
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
14 changes: 14 additions & 0 deletions
14
sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
#nullable disable | ||
|
||
using System.ComponentModel; | ||
|
||
namespace Azure.ResourceManager.DnsResolver.Models | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public readonly partial struct BlockResponseCode | ||
{ | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.ComponentModel; | ||
using Azure.Core; | ||
|
||
namespace Azure.ResourceManager.DnsResolver.Models | ||
{ | ||
public partial class DnsSecurityRuleAction | ||
{ | ||
/// <summary> | ||
/// The response code for block actions. | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public BlockResponseCode? BlockResponseCode { get; set; } | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
...sresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a breaking change.
In order to find a way to mitigate it, I need to know what happened to this property. Could you share some information about how this property changed in your spec?
We removed it in the latest api-version, I know this for sure.
Would the older existing api-versions still support this property? Or this property is a mistake from its first day.
The answer to these questions could change the way how we mitigate this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the older existing api-versions will support this property.
For more details, this property essentially is ignored on the control plane side, whatever the customer provides in this field is ignored and defaulted to a different value, and so the intention is to remove it.
Even on the old API versions, the value is being ignored on the old api versions but we are allowing customers to provide the parameter on old API versions.
Ideally we would like to remove it on all API versions as it being ignored in all API versions in the control plane standpoint.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the case, we need to introduce this property back to mitigate the breaking change:
Please create a partial class in
src/Customization
orsrc/Custom
directory for this class:The
EditorBrowsable
attribute hides this property from the intellisence so that new users would not see it, and theCodeGenSerialization
attribute lets the generator know about how to serialize/deserialize this property into/from the payload to make sure the generated SDK could work with previous API versions.During this process, the type of this property
BlockResponseCode
may also be deleted in this update, please find the removed file from git history and move it to thesrc/Customization
orsrc/Custom
directory.After you have introduced the above code, please run the
dotnet build /t:GenerateCode
command to regenerate everything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the deleted blockresponsecode.cs back into customization and the dnsSecurityRuleACtion but these seems to cause issues in the generator
PS C:\Git\jamesvoong-azure-sdk-for-net\sdk\dnsresolver\Azure.ResourceManager.DnsResolver> dotnet build /t:GenerateCode
Restore complete (1.1s)
Azure.ResourceManager.DnsResolver failed with 2 error(s) (11.3s)
EXEC : error | error : Plugin csharpgen reported failure.
Q:.tools.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20250512.2\buildMultiTargeting\Microsoft.Azure.AutoRest.CSharp.targets(59,5): error MSB3073: The command "npx autorest@ --max-memory-size=8192 --skip-csproj --skip-upgrade-check --version=3.9.7 C:\Git\jamesvoong-azure-sdk-for-net\sdk\dnsresolver\Azure.ResourceManager.DnsResolver\src/autorest.md --use=Q:.tools.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20250512.2\buildMultiTargeting../tools/net9.0/any/ --clear-output-folder=true --shared-source-folders="C:\Git\jamesvoong-azure-sdk-for-net\eng/../sdk/core/Azure.Core/src/Shared/;Q:.tools.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-beta.20250512.2\buildMultiTargeting../content/Generator.Shared/" --output-folder=C:\Git\jamesvoong-azure-sdk-for-net\sdk\dnsresolver\Azure.ResourceManager.DnsResolver\src/Generated --namespace=Azure.ResourceManager.DnsResolver" exited with code 1.
Build failed with 2 error(s) in 12.7s
Workload updates are available. Run
dotnet workload list
for more information.