saltstack / saltstack/salt

[BUG] binary return data causes tracebacks in many returners

Open
#59,012 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug python3 severity-high
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
Some returners return binary data. The default returner uses msgpack, which can handle binary data.

19/40 returners in salt/returners use salt.utils.json.dumps, which cannot handle binary data.

Maybe binary data should be b64 encoded instead of the return data being dropped?


grep 'json.dumps' salt/returners | awk -F : '{print $1}' | uniq:

cassandra_cql_return.py
couchbase_return.py
couchdb_return.py
elasticsearch_return.py
etcd_return.py
highstate_return.py
influxdb_return.py
kafka_return.py
mattermost_returner.py
memcache_return.py
mysql.py
odbc.py
postgres.py
postgres_local_cache.py
redis_return.py
slack_webhook_return.py
splunk.py
sqlite3_return.py
syslog_return.py

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in salt/returners and inspect the listed returner files found by the json.dumps grep. Reproduce a return containing binary data, compare the affected returners with the default msgpack returner, and clarify a consistent handling policy. Done means the affected returners no longer traceback or silently drop binary return data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.