Skip to content

Yaml Integration tests use deprecated paths #45636

@brusic

Description

@brusic

This issue revolves around the actual code against the master branch and not using Elasticsearch in general.

While working on a PR, I kept on experiencing errors during integration tests with tests involving action paths that were deprecated as part of the PR.

Here is an example of a deprecated path

{
  "get_script":{
    "url":{
      "paths":[
        {
          "path":"/_script/{id}",
          ...
        },
        {
          "path":"/_scripts/{id}",
          ...
          "deprecated":{
            "version":"8.0.0",
            "description":"The path is now singular"
          }
        }
      ]
    }
  }
}

Using LangPainlessClientYamlTestSuiteIT/painless/16_update2 as example. The test returns:

Failure at [painless/16_update2:12]: got unexpected warning header [
  299 Elasticsearch-8.0.0-SNAPSHOT-7610ef3242c5e63f8bd7545be5e2addb0feac688 "[GET /_scripts/{name}] is deprecated! Use [GET /_script/{id}] instead."
]

Removing the deprecated path in the json definition will fix the issue. Took me a while to figure out the issue. :) The deprecation definitions are useful and I would like to submit complete PRs with those definitions. Might be something I could fix, but Elastic PRs are never quick and I would like to finish the original PR first.

The JSON schema was updated today, but this issue occurred even before the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Delivery/BuildBuild or test infrastructureTeam:DeliveryMeta label for Delivery team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions