Skip to content

[LogicApp] Add new Integration Account artifact cmdlets #8483

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 5 commits into from
Feb 13, 2019

Conversation

refortie
Copy link
Contributor

@refortie refortie commented Feb 6, 2019

Description

Adding in the cmdlets for Assemblies and Batch Configurations. Completed Design Review: Design Review

Checklist

@maddieclayton
Copy link
Contributor

@refortie Please fix merge conflicts and I'll take a look tomorrow.

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.

Really great looking cmdlets! I left a few comments, mostly cosmetic or future proofing.

case ParameterSet.ByIntegrationAccountAndParameters:
{
var releaseCriteria = new BatchReleaseCriteria();
if (this.MessageCount > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of doing this validation here, please add a [ValidateRange(0, int.MaxValue)] for MessageCount, BatchSize, and ScheduleInterval

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't validation. When the parameter isn't specified the default value is set, I'm checking to see if the optional parameter was specified.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you be checking if the parameter is set rather than is greater than 0? Currently there is nothing preventing the user from providing a value less than zero. You can check if that parameter is set using this.MyInvocation.BoundParameters.ContainsKey("MessageCount")

Copy link
Contributor Author

@refortie refortie Feb 13, 2019

Choose a reason for hiding this comment

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

I'll move over and use that and add the validation in the inputs section.

EDIT: Does using the ValdiateRange supersede the ValidateNotNullOrEmpty? Aka, should I include both or does the ValidateRange also check for nulls

case ParameterSet.ByIntegrationAccountAndParameters:
{
var releaseCriteria = new BatchReleaseCriteria();
if (this.MessageCount > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you be checking if the parameter is set rather than is greater than 0? Currently there is nothing preventing the user from providing a value less than zero. You can check if that parameter is set using this.MyInvocation.BoundParameters.ContainsKey("MessageCount")

/// <param name="resourceGroupName">Resource group name</param>
/// <param name="subscriptionId">Subscription id</param>
/// <returns>App service plan id</returns>
internal static string BuildAppServicePlanId(string planName, string resourceGroupName, string subscriptionId)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just noticed this wasn't used anywhere and removed it

@maddieclayton
Copy link
Contributor

@refortie Nice work! And thanks so much for splitting this up.

@maddieclayton maddieclayton merged commit 4abdb97 into Azure:master Feb 13, 2019
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