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

[MetricsAdvisor] Remove unnecessary ClientOptions type #16436

Merged
merged 4 commits into from
Oct 29, 2020

Conversation

kinelski
Copy link
Member

@kinelski kinelski commented Oct 29, 2020

Fixes #16369.

We currently have:

  • Metrics Advisor Client Options
  • Metrics Advisor Administration Client Options

These were defined separately for both of our clients, but the service does not differentiate between admin/other operations. We can merge them into the same type: MetricsAdvisorClientsOptions.

@kinelski kinelski self-assigned this Oct 29, 2020
@kinelski kinelski added Client This issue points to a problem in the data-plane of the library. Cognitive - Metrics Advisor labels Oct 29, 2020
@@ -8,17 +8,21 @@
- Added a public setter to `DataFeed.Options`.

### Breaking Changes
- In `MetricsAdvisorClient`, updated `CreateDataFeed` and `CreateDataFeedAsync` to take a whole `DataFeed` object as a parameter.
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed it. It should be MetricsAdvisorAdministrationClient.

- Renamed `MetricDimension` to `DataFeedDimension`.
- Renamed `DataAnomaly` to `DataPointAnomaly`.
- Renamed `IncidentStatus` to `AnomalyIncidentStatus`.
- Renamed `AlertingHook`, `EmailHook`, and `WebHook` to `NotificationHook`, `EmailNotificationHook`, and `WebNotificationHook`, respectively.
- Renamed `TimeMode` to `AlertQueryTimeMode`.

### Key Bug Fixes
- Fixed a bug in `GetMetricEnrichedSeriesData` sync and async methods where a `NullReferenceException` was thrown if a returned data point had missing data.
Copy link
Member Author

Choose a reason for hiding this comment

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

Missed this in an older PR. Fixed by:

In MetricEnrichedSeriesData, made elements of ExpectedValues, Periods, IsAnomaly, LowerBoundaries and UpperBoundaries nullables.

Comment on lines +6 to +9
<NoWarn>
$(NoWarn);
AZC0007; <!-- https://github.com/Azure/azure-sdk-for-net/issues/16435 -->
</NoWarn>
Copy link
Member Author

Choose a reason for hiding this comment

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

Blocked by Azure/azure-sdk-tools#127 (comment).

I tried suppressing the warning locally, but it still fails when exporting the API.

@kinelski kinelski marked this pull request as ready for review October 29, 2020 20:33
@kinelski kinelski requested review from christothes and maririos and removed request for tg-msft and KrzysztofCwalina October 29, 2020 20:33
@@ -4,7 +4,7 @@ public partial class MetricsAdvisorClient
{
protected MetricsAdvisorClient() { }
public MetricsAdvisorClient(System.Uri endpoint, Azure.AI.MetricsAdvisor.MetricsAdvisorKeyCredential credential) { }
public MetricsAdvisorClient(System.Uri endpoint, Azure.AI.MetricsAdvisor.MetricsAdvisorKeyCredential credential, Azure.AI.MetricsAdvisor.MetricsAdvisorClientOptions options) { }
public MetricsAdvisorClient(System.Uri endpoint, Azure.AI.MetricsAdvisor.MetricsAdvisorKeyCredential credential, Azure.AI.MetricsAdvisor.MetricsAdvisorClientsOptions options) { }
Copy link
Member

Choose a reason for hiding this comment

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

The plural Clients seems odd to me. Should we just keep the name the same and delete the other one?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see in the linked issue that this is the guideline 😞

Copy link
Member

Choose a reason for hiding this comment

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

omg I did the same. I was like.. ugh that name looks weird.... looked at guidelines.. ohh nooo :(.
Oh well, sad approve

@kinelski kinelski merged commit eb7c0ed into Azure:master Oct 29, 2020
@kinelski kinelski deleted the ma-options branch October 29, 2020 22:36
annelo-msft pushed a commit to annelo-msft/azure-sdk-for-net that referenced this pull request Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Metrics Advisor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MetricsAdvisor] Remove unnecessary ClientOptions type
3 participants