Skip to content

get_distributed_objects: skip unsupported cacheService#747

Merged
yuce merged 2 commits into
hazelcast:masterfrom
space88man:fix-cacheService
Oct 20, 2025
Merged

get_distributed_objects: skip unsupported cacheService#747
yuce merged 2 commits into
hazelcast:masterfrom
space88man:fix-cacheService

Conversation

@space88man

@space88man space88man commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

This client does not support cacheService so the iteration in get_distributed_objects will throw an exception if the cluster is also used by Java+JCache clients (e.g. Spring Boot with Hazelcast as cache provider).

This fix just skips hz:impl:cacheService objects.

Addresses #746

@devOpsHazelcast

devOpsHazelcast commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

CLA assistant check
All committers have signed the CLA.

@space88man space88man changed the title get_distributed_object: skip unsupported cacheService get_distributed_objects: skip unsupported cacheService Oct 14, 2025
@yuce yuce changed the title get_distributed_objects: skip unsupported cacheService [Requires Signing the CLA] get_distributed_objects: skip unsupported cacheService Oct 14, 2025
@yuce

yuce commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Hi @space88man,

Thanks for your issue report, and PR.
Could you sign the CLA before we can carry on with the review?

@yuce yuce changed the title [Requires Signing the CLA] get_distributed_objects: skip unsupported cacheService get_distributed_objects: skip unsupported cacheService Oct 16, 2025
@yuce

yuce commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Thanks for signing the CLA.

I think it would be good to prevent get_distributed_objects from failing with any unknown proxy type (including future ones). In order to do that I suggest updating the PR.

It is possible to get the names of the known proxy names using:

from hazelcast.proxy import _proxy_init

Then, in get_distributed_objects I would do something like:

dds_names = set(_proxy_init.keys())
...
for dist_obj_info in response:
    if dist_obj_info.service_name not in dds_names:
        continue
    ...

Would that make sense?

@yuce

yuce commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Thanks!
We'll need to fix the code style in hazelcast/client.py.
Could you pip install -r requirements-dev.txt then run black --config black.toml . in the project root?
That should fix the issue.

- currently hz:impl:cacheService is not supported
@space88man

Copy link
Copy Markdown
Contributor Author

... then run black --config black.toml . in the project root? That should fix the issue.

Done - PTAL

@codecov-commenter

codecov-commenter commented Oct 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.35%. Comparing base (34738b6) to head (c985cce).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
hazelcast/client.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #747      +/-   ##
==========================================
+ Coverage   95.33%   95.35%   +0.01%     
==========================================
  Files         378      378              
  Lines       21989    21992       +3     
==========================================
+ Hits        20964    20970       +6     
+ Misses       1025     1022       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yuce yuce 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.

Looks good, thanks for the PR!

@yuce
yuce merged commit 5c7a4d5 into hazelcast:master Oct 20, 2025
11 checks passed
@yuce yuce added this to the 5.6.0 milestone Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants