question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TasksClient.get() requiring an argument on v7.5.1

See original GitHub issue

Elasticsearch version (bin/elasticsearch --version): 7.1.1, 7.5.1

elasticsearch-py version (elasticsearch.__versionstr__): 7.5.1

Please make sure the major version matches the Elasticsearch server you are running.

Description of the problem including expected versus actual behavior:

Elasticsearch().tasks.get() fails using elasticsearch-py 7.5.1, whereas it succeeds using 7.1.1.

>>> import elasticsearch
>>> elasticsearch.__versionstr__
'7.5.1'
>>> elasticsearch.Elasticsearch().tasks.get()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/nfox/myenv-7.5.1/lib/python3.7/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
    return func(*args, params=params, **kwargs)
TypeError: get() missing 1 required positional argument: 'task_id'
>>> import elasticsearch
>>> elasticsearch.__versionstr__
'7.1.0'
>>> elasticsearch.Elasticsearch().tasks.get()
{'nodes': {'GkSSDiZPTBq4Tlv5xV9wtg': {'name': 'e6a01a4d549f', 'transport_address': '172.17.0.3:9300', 'host': '172.17.0.3', 'ip': '172.17.0.3:9300', 'roles': ['ingest', 'master', 'data', 'ml'], 'attributes': {'ml.machine_memory': '4129972224', 'xpack.installed': 'true', 'ml.max_open_jobs': '20'}, 'tasks': {'GkSSDiZPTBq4Tlv5xV9wtg:56': {'node': 'GkSSDiZPTBq4Tlv5xV9wtg', 'id': 56, 'type': 'direct', 'action': 'cluster:monitor/tasks/lists[n]', 'start_time_in_millis': 1582238526445, 'running_time_in_nanos': 8142200, 'cancellable': False, 'parent_task_id': 'GkSSDiZPTBq4Tlv5xV9wtg:55', 'headers': {}}, 'GkSSDiZPTBq4Tlv5xV9wtg:55': {'node': 'GkSSDiZPTBq4Tlv5xV9wtg', 'id': 55, 'type': 'transport', 'action': 'cluster:monitor/tasks/lists', 'start_time_in_millis': 1582238526442, 'running_time_in_nanos': 11192200, 'cancellable': False, 'headers': {}}}}}}

I’ve verified this against running both ES 7.5.1 and ES 7.1.1 (via docker on localhost)

Steps to reproduce: run elasticsearch.Elasticsearch().tasks.get() while using elasticsearch-py 7.5.1

Ultimately, this is breaking curator’s DeleteSnapshot as it checks for tasks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
karmicommented, Mar 11, 2020

@natefox , I’m just driving by, but if you want to get a list of tasks — ie. without an ID —, you should perhaps use the tasks.list API?

1reaction
natefoxcommented, Mar 13, 2020

I think thats a fair approach while removing it for the 8.x.x release (at least moving to v8.0.0 conforms to semver’s concept of breaking changes).

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Documentation — Elasticsearch 7.10.1 documentation
All the API calls map the raw REST api as closely as possible, including the distinction between required and optional arguments to the...
Read more >
Delete_snapshot action fails, get() takes at least 2 ...
But when we run it we get the following error message: ... TasksClient.get() requiring an argument on v7.5.1. opened 10:52PM - 20 Feb...
Read more >
IBM Business Process Manager V7.5 Performance Tuning ...
IBM Business Process Manager V7.5 Performance Tuning and Best Practices. 5.1.1 Three-tiered configuration with Web services and remote DB2 ...
Read more >
general - Pact (Contract Testing)
It looks like Jenkins requires two API calls (one to get a valid CSRF token) ... I used the pact-jvm-consumer-junit_2.12:3.5.16 and it seems...
Read more >
Exemplary implementation of a purchase requisition process ...
In order to illustrate the top-down approach within a Service-Oriented Architecture. (SOA), a prototype was developed in cooperation with IBM Deutschland ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found