Skip to content

ServiceBus: Upcoming Breaking changes - deprecated cmdlets and properties #4815

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

Merged
merged 11 commits into from
Oct 25, 2017

Conversation

v-Ajnava
Copy link

@v-Ajnava v-Ajnava commented Oct 18, 2017

Description

Removed the below cmdlets and properties which were marked as obsolete in previous release:

Get-AzureRmServiceBusTopicAuthorizationRule
Get-AzureRmServiceBusTopicKey
New-AzureRmServiceBusTopicAuthorizationRule
New-AzureRmServiceBusTopicKey
Remove-AzureRmServiceBusTopicAuthorizationRule
Set-AzureRmServiceBusTopicAuthorizationRule
New-AzureRmServiceBusNamespaceKey
Get-AzureRmServiceBusQueueAuthorizationRule
Get-AzureRmServiceBusQueueKey
New-AzureRmServiceBusQueueAuthorizationRule
New-AzureRmServiceBusQueueKey
Remove-AzureRmServiceBusQueueAuthorizationRule
Set-AzureRmServiceBusQueueAuthorizationRule
Get-AzureRmServiceBusNamespaceAuthorizationRule
Get-AzureRmServiceBusNamespaceKey
New-AzureRmServiceBusNamespaceAuthorizationRule
Remove-AzureRmServiceBusNamespaceAuthorizationRule
Set-AzureRmServiceBusNamespaceAuthorizationRule

Properties :
NamespceAttributes -
NamespceAttributes.Status
NamespceAttributes.Enabled

QueueAttirbutes -
QueueAttirbutes.EntityAvailabilityStatus
QueueAttirbutes.EnableBatchedOperations
QueueAttirbutes.IsAnonymousAccessible
QueueAttirbutes.SupportOrdering

TopicAttirbutes -
TopicAttirbutes.Location
TopicAttirbutes.IsExpress
TopicAttirbutes.IsAnonymousAccessible
TopicAttirbutes.FilteringMessagesBeforePublishing
TopicAttirbutes.EnableSubscriptionPartitioning
TopicAttirbutes.EntityAvailabilityStatus

SubscriptionAttributes -
SubscriptionAttributes.EntityAvailabilityStatus
SubscriptionAttributes.DeadLetteringOnFilterEvaluationExceptions
SubscriptionAttributes.Location
SubscriptionAttributes.IsReadOnly


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

…nto NovBrkchngSB

# Conflicts:
#	tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv
@maddieclayton
Copy link
Contributor

@v-Ajnava Did you delete the cs files for each of the cmdlets that you are removing? I don't see the deleted cmdlets in the PR.

Copy link
Contributor

@maddieclayton maddieclayton left a comment

Choose a reason for hiding this comment

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

Some initial comments. Please make sure for every obsoleted property you are removing both the property and every reference to the property (including the parameter inside of cmdlets). Also, please remove the actual cmdlets you are obsoleting.

#pragma warning disable 612, 618
queueAttributes.Location = getNamespaceLoc.Location;

if (EnableBatchedOperations != null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these parameters serve any purpose now that you have removed this code? If not, please remove the parameters.

Copy link
Author

Choose a reason for hiding this comment

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

removed the parameters

if (IsReadOnly != null)
subAttributes.IsReadOnly = IsReadOnly;
if (DeadLetteringOnFilterEvaluationExceptions != null)
subAttributes.DeadLetteringOnFilterEvaluationExceptions = DeadLetteringOnFilterEvaluationExceptions;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you removing the IsReadOnly parameter but not DeadLetteringOnFilterEvaluationExceptions parameter?

Copy link
Author

Choose a reason for hiding this comment

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

removed the parameters

@@ -59,26 +59,14 @@
<Compile Include="Cmdlets\AzureServiceBusCmdletBase.cs" />
<Compile Include="Cmdlets\CheckNameAvailability\TestAzureServiceBusCheckNameAvailability.cs" />
<Compile Include="Cmdlets\Namespace\GetAzureServiceBusNamespace.cs" />
<Compile Include="Cmdlets\Namespace\GetAzureServiceBusNamespaceAuthorizationRules.cs" />
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you just removed the references to the cmdlets and not the cmdlets themselves.

Copy link
Author

Choose a reason for hiding this comment

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

deleted the class files

@@ -182,31 +173,6 @@ public TopicAttributes(SBTopic topicResource)
/// </summary>
[ObsoleteAttribute("'IsExpress' property is mark as obsolete and will be removed in upcoming breaking changes build", false)]
public bool? IsExpress { get; set; }

/// <summary>
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave the Location property?

Copy link
Author

Choose a reason for hiding this comment

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

my bad I missed, removed the properties marked as obsolete.

@maddieclayton
Copy link
Contributor

Also @v-Ajnava, please update the change log to reflect the changes you are making (see Cormac's comment in the EventHub PR).

@v-Ajnava
Copy link
Author

@maddieclayton , updated the changelog.md and resolved the review comments.

Ajit Maruti Navasare (MINDTREE LIMITED) added 2 commits October 24, 2017 17:18
…nto NovBrkchngSB

# Conflicts:
#	tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv
@cormacpayne
Copy link
Member

Copy link
Contributor

@maddieclayton maddieclayton left a comment

Choose a reason for hiding this comment

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

A few small issues.

- Status
- Enabled

```powershell
Copy link
Contributor

Choose a reason for hiding this comment

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

fix formatting (check the preview to make sure the formatting looks correct)

Copy link
Contributor

Choose a reason for hiding this comment

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

I fixed this for you - the markdown file requires special formatting to display correctly. Let me know if you have a problem with these changes.

$namespace.Enabled
# New

# The call remains the same, but the returned values NameSpace object will not have the ResourceGroupName property
Copy link
Contributor

Choose a reason for hiding this comment

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

It will not have the ResourceGroupName property?


# New

# The call remains the same, but the returned values Topic object will not have the EntityAvailabilityStatus, EnableBatchedOperations, IsAnonymousAccessible and SupportOrdering properties
Copy link
Contributor

Choose a reason for hiding this comment

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

The properties that you say are missing here don't match the ones you say existed in the old

@@ -121,11 +121,8 @@ AutoDeleteOnIdle : 10675199.02:48:05.4775807
CountDetails : Microsoft.Azure.Management.ServiceBus.Models.MessageCountDetails
Copy link
Contributor

Choose a reason for hiding this comment

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

Take out Location? I believe that was deprecated.

@@ -101,18 +101,13 @@ Id : /subscriptions/854d368f-1828-428f-8f3c-f2a
Type : Microsoft.ServiceBus/Topic
Copy link
Contributor

Choose a reason for hiding this comment

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

Should Location be deleted? It is in the list of deprecated properties. If so, please apply it to this file and all others with SubscriptionAttributes or TopicAttributes

maddieclayton
maddieclayton previously approved these changes Oct 25, 2017
@maddieclayton
Copy link
Contributor

maddieclayton commented Oct 25, 2017

Ajit Maruti Navasare (MINDTREE LIMITED) added 2 commits October 25, 2017 14:43
@v-Ajnava
Copy link
Author

@maddieclayton, I pushed the formatting changes for changelog.md. By pushing this, it dismissed your review. can you please take look at the changes

@maddieclayton maddieclayton merged commit 576dbf5 into Azure:preview Oct 25, 2017
@v-Ajnava v-Ajnava deleted the NovBrkchngSB branch April 12, 2018 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants