nacos-group / nacos-group/nacos-sdk-python

日志写入路径设置有问题?

Open
#301 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
471
Forks
155
PR merge metrics
No merged PRs in 30d

Description

v2.nacos.naming.remote.naming_grpc_client_proxy.NamingGRPCClientProxy.subscribe 中订阅服务,在其下的v2.nacos.naming.cache.service_info_cache.ServiceInfoCache.process_service
84: cache_key = get_service_cache_key(get_group_name(service.name, service.groupName), service.clusters)

def get_service_cache_key(service_name, clusters):
if not clusters:
return service_name
return f"{service_name}{Constants.SERVICE_INFO_SPLITER}{clusters}"

99:await write_to_file(self.logger, os.path.join(self.cache_dir, cache_key), to_json_string(service))
部分服务名称带有:分割,无法创建日志文件

Contributor guide

No contributing guide indexed for this repository

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 v2.nacos.naming.remote.naming_grpc_client_proxy.NamingGRPCClientProxy.subscribe and follow the call into v2.nacos.naming.cache.service_info_cache.ServiceInfoCache.process_service. Reproduce persistence for a service whose name contains a colon, then inspect write_to_file and the cache-key construction. Done means such services can be written to the cache path without file-creation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.