Skip to content

[fix](docker compose) Fix Object of type 'Cluster' is not JSON serializable - #42605

Merged
gavinchou merged 1 commit into
apache:masterfrom
deardeng:fix-docker-1
Oct 29, 2024
Merged

[fix](docker compose) Fix Object of type 'Cluster' is not JSON serializable#42605
gavinchou merged 1 commit into
apache:masterfrom
deardeng:fix-docker-1

Conversation

@deardeng

Copy link
Copy Markdown
Contributor

…izable

due to #42266
Fix

python -W ignore /mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/doris-compose.py stop test_clean_tablet_when_rebalance --be-id 1 --outpu
t-json
{
"code": 1,
"err": "Traceback (most recent call last):\n File \"/mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/doris-compose.py\", line 59, in <module>\n print(utils.pretty_json({\"code\": 0, \"data\": data}), flush=True)\n F
ile \"/mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/utils.py\", line 324, in pretty_json\n return json.dumps(json_data, indent=4, sort_keys=True)\n File \"/usr/lib64/python3.6/json/__init__.py\", line 238, in dumps\n
**kw).encode(obj)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 201, in encode\n chunks = list(chunks)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 430, in _iterencode\n yield from _iterencode_dict(o, _curren
t_indent_level)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 404, in _iterencode_dict\n yield from chunks\n File \"/usr/lib64/python3.6/json/encoder.py\", line 325, in _iterencode_list\n yield from chunks\n File \"/usr
/lib64/python3.6/json/encoder.py\", line 437, in _iterencode\n o = _default(o)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 180, in default\n o.__class__.__name__)\nTypeError: Object of type 'Cluster' is not JSON seriali
zable\n"
}

Proposed changes

Issue Number: close #xxx

@doris-robot

Copy link
Copy Markdown

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@deardeng

Copy link
Copy Markdown
ContributorAuthor

run buildall

@yujun777yujun777 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@dataroaringdataroaring left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Oct 29, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@gavinchougavinchou changed the title [fix](docker compose) Fix Object of type 'Cluster' is not JSON serial…[fix](docker compose) Fix Object of type 'Cluster' is not JSON serializableOct 29, 2024
@gavinchou
gavinchou merged commit 6d5201a into apache:masterOct 29, 2024
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…izable (apache#42605)
due to apache#42266
Fix ```
python -W ignore /mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/doris-compose.py stop test_clean_tablet_when_rebalance --be-id 1 --outpu
t-json
{
"code": 1,
"err": "Traceback (most recent call last):\n File \"/mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/doris-compose.py\", line 59, in <module>\n print(utils.pretty_json({\"code\": 0, \"data\": data}), flush=True)\n F
ile \"/mnt/disk2/dengxin/apache_doris/docker/runtime/doris-compose/utils.py\", line 324, in pretty_json\n return json.dumps(json_data, indent=4, sort_keys=True)\n File \"/usr/lib64/python3.6/json/__init__.py\", line 238, in dumps\n
**kw).encode(obj)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 201, in encode\n chunks = list(chunks)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 430, in _iterencode\n yield from _iterencode_dict(o, _curren
t_indent_level)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 404, in _iterencode_dict\n yield from chunks\n File \"/usr/lib64/python3.6/json/encoder.py\", line 325, in _iterencode_list\n yield from chunks\n File \"/usr
/lib64/python3.6/json/encoder.py\", line 437, in _iterencode\n o = _default(o)\n File \"/usr/lib64/python3.6/json/encoder.py\", line 180, in default\n o.__class__.__name__)\nTypeError: Object of type 'Cluster' is not JSON seriali
zable\n"
}
```
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/3.0.3-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@deardeng@doris-robot@yujun777@dataroaring@gavinchou