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 incorrect GET path in tasks.asciidoc #49494

Merged
merged 1 commit into from
Nov 25, 2019
Merged

Conversation

kellycampbell
Copy link
Contributor

@kellycampbell kellycampbell commented Nov 22, 2019

Using GET /_cat/_tasks returns this error:

{"error":"Incorrect HTTP method for uri [/_cat/_tasks?v] and method [GET], allowed: [POST]","status":405}

Looking at the examples further down on the page, it should be tasks without the underscore.

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

Using GET /_cat/_tasks returns this error:
```
{"error":"Incorrect HTTP method for uri [/_cat/_tasks?v] and method [GET], allowed: [POST]","status":405}
```
Looking at the examples further down on the page, it should be `tasks` without the underscore.
Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

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

Hi @kellycampbell, thanks for rainsing this docs issue.
The second change looks good to me, I tried the first and was suprised it didn't work for me as expected on 7.4.2 (see comment). Maybe I'm missing something, but I'll wait for some feedback of the other to see how to proceed.

@@ -13,9 +13,9 @@ similar to the <<tasks,task management>> API.
[[cat-tasks-api-request]]
==== {api-request-title}

`GET /_cat/_tasks/<task_id>`
`GET /_cat/tasks/<task_id>`
Copy link
Member

Choose a reason for hiding this comment

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

I just tried this on 7.4.2 and get something along the lines of

#! Deprecation: [types removal] Specifying types in document get requests is deprecated, use the /{index}/_doc/{id} endpoint instead.
{
  "error" : {
    "root_cause" : [
      {
        "type" : "index_not_found_exception",
        "reason" : "no such index [_cat]",
        "resource.type" : "index_expression",
        "resource.id" : "_cat",
        "index_uuid" : "_na_",
        "index" : "_cat"
      }
    ],
    "type" : "index_not_found_exception",
    "reason" : "no such index [_cat]",
    "resource.type" : "index_expression",
    "resource.id" : "_cat",
    "index_uuid" : "_na_",
    "index" : "_cat"
  },
  "status" : 404
}

which to me looks like the request is hitting the wrong endpoint (trying to index a document).
If this is the case, this might either be a bug we should file, or if getting tasks by id via the _cat API isn't supposed to be working we should remove this from the docs. Maybe @jrodewig or @imotov have an idea
how to proceed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cbuescher I'm seeing the same error on my end. I'll remove individual task retrieval from the docs. Thanks for raising this!

@cbuescher cbuescher added :Distributed Coordination/Task Management Issues for anything around the Tasks API - both persistent and node level. >docs General docs changes labels Nov 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Task Management)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

LGTM.

As @cbuescher pointed out, we need to remove the docs for individual task retrieval. I've raised #49550 to handle this.

@jrodewig jrodewig merged commit 47be0c0 into elastic:7.4 Nov 25, 2019
jrodewig pushed a commit that referenced this pull request Nov 25, 2019
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
jrodewig pushed a commit that referenced this pull request Nov 25, 2019
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
jrodewig pushed a commit that referenced this pull request Nov 25, 2019
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
jrodewig pushed a commit that referenced this pull request Nov 25, 2019
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Task Management Issues for anything around the Tasks API - both persistent and node level. >docs General docs changes v7.3.3 v7.4.3 v7.5.1 v7.6.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants