azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmVirtualNetwork gives a warning with no additional details

Open doctordns opened this issue 9 years ago • 11 comments

Cmdlet(s)

PowerShell Version

Instructions: to get PowerShell version, type $PSVersionTable and look for the value associated with PSVersion 5.1

Module Version

3.8.0

OS Version

Instructions: to get OS version, type $PSversionTable and look for value associated with BuildVersion Server 2016.

Description

when you call this cmdlet, it isuses a warning: "WARNING: The output object type of this cmdlet will be modified in a future release."

That provides the user wit no useful or actionable information. If we have warnings like this, shouldn't the warning include something to the effect "for more information see http://..."?

Additionally, shouldn't the cmdlet documentation note the issue with this cmdlet.

Debug Output

Instructions: to get Debug Output, set $DebugPreference="Continue" and then execute the cmdlet or script causing the issue

Script/Steps for Reproduction

Create a new AzureRMVirtual network.

doctordns avatar May 30 '17 19:05 doctordns

@doctordns that warning means, the output type will change in the future, because it is being deprecated in a future release. Could you let us know what would you like it to show.

shahabhijeet avatar Jun 02 '17 18:06 shahabhijeet

I know what the warning means... :-)

However, the warning message is not actionable. When is it going to change? What is the impact? What should I do now to avoid issues? I have had a look and can't find any documentation on the impending changes. I would like to suggest a more actionable warning message.

Ideally, the cmdlet documentation should be updated to explain what/when, and possibly the error message extended with "... (See https://... for more information)" This could be done by simply extending the warning message, or by issuing a second warning with the pointer to more details.

doctordns avatar Jun 03 '17 16:06 doctordns

@DeepakRajendranMsft Hey Deepak, would you mind taking a look at this issue? This seems like a reasonable ask (if the warnings are still applicable)

cormacpayne avatar Jun 06 '17 16:06 cormacpayne

Perhaps a message that said "New-AzureRmVirtualNetwork currently returns type PSVirtualNetwork, but will return PSSuperCoolNewVirtualNetwork in the next release" or if the definition of the return type is changing "New-AzureRmVirtualNetwork returns type PSVirtualNetwork which is has deprecated properties. See http://xxxx for details on the property changes".

The same warning (without suitable context) is occurring for New-AzureRmNetworkSecurityRuleConfig

RexWheeler avatar Jun 27 '17 00:06 RexWheeler

For me, just Warning that the output type changes and the user should see XXX.html for details. Explaining that the output type is changing is good - but what does it mean. I think the warning and a URL is all the warning messages should be.

doctordns avatar Jun 27 '17 08:06 doctordns

Not just that, I see such messages with couple of more queries. Warning message with link to explain its impact is important.

itorian avatar Nov 21 '17 05:11 itorian

I reported a similar issue last year, https://github.com/Azure/azure-powershell/issues/2206. To answer that, some guidance for handling breaking changes was created, but the link to that guidance is now broken.

ckarras avatar Nov 21 '17 18:11 ckarras

Any news on this? Would be awesome to get a more specific warning here. Settings are pretty much the same as @doctordns ´s. We are facing this issues for the following commands:

  • New-AzureRmLoadBalancerBackendAddressPoolConfig
  • New-AzureRmNetworkInterface
  • New-AzureRmNetworkSecurityGroup

The message is always the same:

The output object type of this cmdlet will be modified in a future release.

Like mentioned, the other settings are the same as above.

StefanKert avatar Mar 05 '18 10:03 StefanKert

Also New-AzureRmDNSZone. I've taken to adding -WarningAction SilentlyContinue when calling this, which at least means I don't end up with the warnings in the logs (this is part of a VSTS release pipeline).

marknettle avatar Apr 27 '18 01:04 marknettle

@chandrasekarsrinivasan Can you take a look at this issue?

maddieclayton avatar Jul 21 '18 00:07 maddieclayton

These warnings do absolutely nothing for us developers. Every API has this implicit warning. All you're doing is cluttering up the output. What's important for developers, right here, right now, is to make sure that every warning and error that can be handled (has an action associated with it), is cleared so that whey you look at the output of a large script, you have instant feedback whether it completed successfully or not.

ghost avatar Feb 03 '21 15:02 ghost