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

[App Insights] Sync to swagger, bump to 1.0.0-preview-1, rename package *breaking changes* #4790

Merged
merged 8 commits into from
Oct 2, 2018

Conversation

alexeldeib
Copy link
Contributor

@alexeldeib alexeldeib commented Sep 24, 2018

Description

Azure/azure-rest-api-specs#3771
Azure/azure-rest-api-specs#3084 --> big one
Azure/azure-rest-api-specs#3385
Azure/azure-rest-api-specs#3997

This checklist is used to make sure that common guidelines for a pull request are followed.

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.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
  • The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

@alexeldeib alexeldeib changed the title [App Insights] Sync to swagger, bump to 1.0.0-preview-1 [App Insights] Sync to swagger, bump to 1.0.0-preview-1, rename package *breaking changes* Sep 24, 2018
@alexeldeib
Copy link
Contributor Author

I've been refining the data plane swagger for Application Insights and working towards 1.0.0 release for all of our SDKs. This PR rolls up a few changes I've made:

  • break Metrics, Events, and Queries into separate operation groups
  • minor operation renaming
  • move appId parameter from client to method (quality of life; makes sense to new up one client and query with different parameters)
  • various type fixes: some timespans need to be strings, some enums should be refined/loosened.

Adding on to that, this is an SDK to query data plane information -- metrics, logs and events for Azure resources. Application Insights also has numerous clients for sending telemetry to Azure, e.g. Microsoft.ApplicationInsights.
After discussing this with App Insights folks and Azure SDK PMs, I'd like to propose renaming this package Microsoft.Azure.ApplicationInsights.Query, to clarify any ambiguity between the two. I've already discussed and begun implementing similar changes with Python, Java, and Node SDKs.

I've made the relevant code changes already, but I wanted to ask how to go about this procedurally? Is there a precedent for package rename? Could we e.g., leave a note on the Microsoft.Azure.ApplicationInsights package page with a deprecation notice pointing to the newly named package? Would love to get thoughts on this.

Thanks!

@alexeldeib
Copy link
Contributor Author

alexeldeib commented Sep 24, 2018

Incomplete

  • Update comments for documentation to reflect AppID parameter
  • Changelog

<AssemblyName>Microsoft.Azure.ApplicationInsights</AssemblyName>
<PackageId>Microsoft.Azure.ApplicationInsights</PackageId>
<PackageTags>Management.ApplicationInsights;</PackageTags>
<VersionPrefix>1.0.0.0</VersionPrefix>
Copy link
Contributor

Choose a reason for hiding this comment

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

versioning should be 1.0.0
Please rename VersionPrefix with Version

<PackageReleaseNotes>This is a preview release of the Application Insights Data SDK.</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<RootNamespace>Microsoft.Azure.ApplicationInsights</RootNamespace>
<RootNamespace>Microsoft.Azure.ApplicationInsights.Query</RootNamespace>
<Version>1.0.0-Preview-1</Version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

<PackageId>Microsoft.Azure.ApplicationInsights</PackageId>
<PackageTags>Management.ApplicationInsights;</PackageTags>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>Preview-1</VersionSuffix>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this
Also, is the package stable or preview?
If this is still preview, the version can be bumped to 0.10.0-preview instead

GitHub user: Azure
Branch: master
Commit: d122af3086f0b1693b9c506befc497a1f4a8b8e1
GitHub user: alexeldeib
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the spec merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's an open PR which changes an enum to modelAsString. Rest of the changes are merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can regenerate after it's merged. The same PR contains the namespace change.

@dsgouda
Copy link
Contributor

dsgouda commented Sep 24, 2018

@alexeldeib As such you cannot rename a package, we can hide/deprecate the old package with a message that redirects to a new package and then publish whichever new packages are needed. Please start an email thread if you need further details

@alexeldeib
Copy link
Contributor Author

@dsgouda confirming, for preview version you want 0.10.0-preview not 1.0.0-preview? I made it 0.10.0-preview currently.

@dsgouda
Copy link
Contributor

dsgouda commented Sep 25, 2018

@alexeldeib there should be a strong reason for major version bumps (if the REST spec version is new or if breaking changes are introduced to a stable version)
This looks like a preview version without revisions to the REST spec version itself, so 0.10.0-preview is the right version.
Having said that, let's put a pin in this until we finalize upon a plan for renaming the namespace and package name

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

Looks good apart from the one comment

@@ -14,7 +14,9 @@
</ItemGroup>
<ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace VersionPrefix with Version
Also add <TreatWarningsAsErrors>true</TreatWarningsAsErrors> to the same PropertyGroup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@dsgouda dsgouda left a comment

Choose a reason for hiding this comment

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

LGTM subject to CIs passing

@alexeldeib
Copy link
Contributor Author

@dsgouda Bump since CI is green?

@dsgouda dsgouda merged commit 274e7d0 into Azure:psSdkJson6 Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants