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

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Feb 5, 2020

Relates: #50835

This commit updates the synced flush REST API to use the deprecated object to deprecate the whole API. Client generators can pick up the deprecated object to apply language specific deprecation warnings.

Relates: #50835

This commit updates the synced flush REST API to
use the deprecated object to deprecate the whole API.
@russcam
Copy link
Contributor Author

russcam commented Feb 5, 2020

It would be ideal if this were included in 7.6.0, to allow generators to pick up for 7.6.0 clients.

},
"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.

@karmi
Copy link
Contributor

karmi commented Feb 5, 2020

The CI seems to fail with:

ParsingException[indices.flush_synced API: unsupported field [deprecated]]

Perhaps the Java runner doesn't support the field yet?

@jrodewig jrodewig added :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >docs General docs changes labels Feb 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Engine)

@rjernst rjernst added Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team labels May 4, 2020
@colings86
Copy link
Contributor

@russcam are you still wanting to progress this PR or should it be closed?

@russcam
Copy link
Contributor Author

russcam commented May 21, 2020

I'll close this and reopen a new PR with some changes from my fork

@russcam russcam closed this May 21, 2020
@russcam russcam deleted the russcam-patch-20 branch May 21, 2020 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. >docs General docs changes Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. Team:Docs Meta label for docs team v7.6.3 v7.7.1 v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants