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

fix #35262 define deprecations of API's as a whole and urls #39063

Merged
merged 5 commits into from
Apr 23, 2019

Conversation

Mpdreamz
Copy link
Member

This moves deprecated paths out of paths and into a new property called deprecated_paths.

This allows client generators to either skip or otherwise mark these endpoints as deprecated/obsolete and use language specific mechanisms to warn the users.

This also introduces a deprecated block on the API itself to mark a whole API as deprecated. See indices.exists_type.json

@Mpdreamz Mpdreamz added :Core/Infra/REST API REST infrastructure and utilities v7.0.0 v8.0.0 v7.2.0 labels Feb 18, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@Mpdreamz
Copy link
Member Author

Mpdreamz commented Feb 27, 2019

@bmcconaghy will this affect Console?

as @jasontedor noted need to update PR and I still need to make the version qualified up to the path (major.minor.patch)

@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-deprecations branch from ab35d03 to 477f99d Compare March 5, 2019 09:25
@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-deprecations branch 2 times, most recently from 8f181dd to 10d0836 Compare April 8, 2019 16:00
@Mpdreamz Mpdreamz requested a review from jaymode April 8, 2019 16:02
@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-deprecations branch from 10d0836 to 430108a Compare April 9, 2019 11:50
@Mpdreamz
Copy link
Member Author

Mpdreamz commented Apr 9, 2019

run elasticsearch-ci/1

1 similar comment
@Mpdreamz
Copy link
Member Author

Mpdreamz commented Apr 9, 2019

run elasticsearch-ci/1

Copy link
Member

@jaymode jaymode left a comment

Choose a reason for hiding this comment

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

LGTM. We need to have an answer regarding console prior to merging

@@ -2,6 +2,10 @@
"indices.exists_type": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html",
"methods": ["HEAD"],
"deprecated" : {
"version" : "7.0.0",
"description" : "Types are being removed from elasticsearch and therefor this API is on the way out. Read more here: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"description" : "Types are being removed from elasticsearch and therefor this API is on the way out. Read more here: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html"
"description" : "Types are being removed from elasticsearch and therefore this API is on the way out. Read more here: https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html"

@bmcconaghy
Copy link

Sorry, somehow did not see this ping from before. Console is not directly connected to the ES REST specs, so it will not affect console. The parser that generates the JSON for the console autocomplete will not mind that there are new attributes in these either. Console has no mechanism for warning users that endpoints are deprecated, so it could not (currently) consume them to warn users that things are going away. However, it does display deprecation warnings coming back in ES responses, so if these deprecated paths return warnings the user will be notified.

@Mpdreamz Mpdreamz merged commit 7e06023 into elastic:master Apr 23, 2019
Mpdreamz added a commit that referenced this pull request Apr 23, 2019
* fix #35262 define deprecations of API's as a whole and urls

* document hot threads deprecated paths

* deprecate scroll_id as part of the URL, documented only as part of the body which is a safer behaviour as well

* use version numbers up to patch version

* rest spec parser picks up deprecated paths as paths too

(cherry picked from commit 7e06023)
@Mpdreamz Mpdreamz deleted the feature/rest-spec-deprecations branch April 23, 2019 14:29
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
…lastic#39063)

* fix elastic#35262 define deprecations of API's as a whole and urls

* document hot threads deprecated paths

* deprecate scroll_id as part of the URL, documented only as part of the body which is a safer behaviour as well

* use version numbers up to patch version

* rest spec parser picks up deprecated paths as paths too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants