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

feat: Introduce @ObsoleteApi #1887

Merged
merged 11 commits into from Aug 3, 2023
Merged

feat: Introduce @ObsoleteApi #1887

merged 11 commits into from Aug 3, 2023

Conversation

blakeli0
Copy link
Collaborator

@blakeli0 blakeli0 commented Jul 27, 2023

This PR introduces @ObsoleteApi. Deprecating any client side feature including adding @Deprecated annotation is considered a breaking change based on the new support policy, hence we need an alternative way to signal us and customers that an API is deprecating. This annotation is not a direct replacement of @Deprecated, it's more like a pre-deprecation annotation, it has two major purposes:

  1. It provides a signal to us regarding what we are going to deprecate in a major version release. We can easily change all @ObsoleteApi methods to @Deprecated before a major version release, and eventually remove it in another major version release.
  2. It provides a signal to customers that methods marked with it will be deprecated in a major version release, so they can start using alternative ways as soon as possible. It is not as obvious as @Deprecated since IDE would strike through deprecated methods, but customers can see it easily through Javadocs while hovering over on it.

@blakeli0 blakeli0 requested a review from a team as a code owner July 27, 2023 15:50
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Jul 27, 2023
@lqiu96
Copy link
Contributor

lqiu96 commented Jul 28, 2023

Maybe we can add a blurb here: https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/README.md#versioning about this new annotation (I believe this annotation is going to be used in Gax?).

@blakeli0
Copy link
Collaborator Author

Maybe we can add a blurb here: https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/README.md#versioning about this new annotation (I believe this annotation is going to be used in Gax?).

Great idea! Added, PTAL.

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@diegomarquezp diegomarquezp left a comment

Choose a reason for hiding this comment

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

LGTM - I'll start adding this to the threeten PR #1872

@blakeli0 blakeli0 merged commit 5df1aa3 into main Aug 3, 2023
22 checks passed
@blakeli0 blakeli0 deleted the add-obsolete-api branch August 3, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants