Skip to content

Use deprecated object to deprecate synced flush API #51906

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"indices.flush_synced":{
"documentation":{
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html",
"description":"Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead"
"description":"Performs a synced flush operation on one or more indices."
},
"deprecated" : {
"version" : "7.6.0",
"description" : "Synced flush is deprecated and will be removed in 8.0. Use flush instead"
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing period for the second sentence? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

@russcam In other places (like the update_transform JSON spec), the deprecated object was added at the paths objects.

Github won't let me comment there, but the url object would look something like this:

    "url":{
      "paths":[
        {
          "path":"/_flush/synced",
          "methods":[
            "POST",
            "GET"
          ],
          "deprecated":{
            "version":"7.6.0",
            "description":"[/_flush/synced] is deprecated and will be removed in 8.0. Use [/_flush] instead."
          }
        },
        {
          "path":"/{index}/_flush/synced",
          "methods":[
            "POST",
            "GET"
          ],
          "parts":{
            "index":{
              "type":"list",
              "description":"A comma-separated list of index names; use `_all` or empty string for all indices"
            },
            "deprecated":{
              "version":"7.6.0",
              "description":"[/{index}/_flush/synced] is deprecated and will be removed in 8.0. Use [/{index}/_flush] instead."
            }
          }
        }
      ]
    },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jrodewig. I think the deprecation should be applied at the top level for this and for transforms, otherwise the deprecation object needs to be repeated for each path, which seems superfluous. Based on #51906 (comment) though, it looks like deprecated isn't implemented at this level currently.

},
"stability":"stable",
"url":{
Expand Down