Skip to content
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

Update monitor cmdlet warning message #17129

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

lijinpei2008
Copy link
Contributor

Update monitor cmdlet warning message

#17013 (comment)

dingmeng-xue
dingmeng-xue previously approved these changes Feb 16, 2022
@dingmeng-xue
Copy link
Member

Change log is required.

@VeryEarly
Copy link
Contributor

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

WriteWarningWithTimestamp(formattedMessage);
}
else
string supressWarningOrErrorValue = System.Environment.GetEnvironmentVariable(BreakingChangeAttributeHelper.SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME);
Copy link
Contributor

@VeryEarly VeryEarly Feb 17, 2022

Choose a reason for hiding this comment

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

please check line 96 - 101, remove duplicate logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, please check it.

@VeryEarly VeryEarly self-assigned this Feb 21, 2022
{
WriteWarning(formattedMessage);
if (topic == "ExecuteCmdlet")
Copy link
Contributor

@VeryEarly VeryEarly Feb 21, 2022

Choose a reason for hiding this comment

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

Suggested change
if (topic == "ExecuteCmdlet")
string formattedMessage = string.Format(
CultureInfo.InvariantCulture,
"{0}{1}{2}",
string.IsNullOrEmpty(cmdletName)?cmdletName:"["+cmdletName+"] ",
string.IsNullOrEmpty(topic)?topic:topic+": ",
message);
if (withTimeStamp)
{
WriteWarningWithTimestamp(formattedMessage);
}
else
{
WriteWarning(formattedMessage);
}

WriteWarningWithTimestamp("The namespace for all the model classes will change from Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.");
WriteWarningWithTimestamp("The namespace for output classes will be uniform for all classes in future releases to make it independent of modifications in the model classes.");
}
this.WriteIdentifiedWarning(
Copy link
Contributor

Choose a reason for hiding this comment

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

WriteIdentifiedWarning("The namespace for all the model classes will change from Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases.");
WriteIdentifiedWarning("The namespace for output classes will be uniform for all classes in future releases to make it independent of modifications in the model classes.");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

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

please polish code

@lijinpei2008
Copy link
Contributor Author

please polish code

Done

@dingmeng-xue
Copy link
Member

It is good to me.

@VeryEarly
Copy link
Contributor

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@lijinpei2008 lijinpei2008 added this to the Feb 2022 (2022-03-01) milestone Feb 22, 2022
@VeryEarly VeryEarly merged commit bb009af into main Feb 22, 2022
@VeryEarly VeryEarly deleted the feature/monitor-warningmessage-print branch February 22, 2022 07:37
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.

Commands run once only, then throw error sending the request
3 participants