Skip to content

scheduler conf to nacos#481

Open
zhongwen666 wants to merge 33 commits intoalibaba:masterfrom
zhongwen666:dev/scheduler_conf_to_nacos_0206
Open

scheduler conf to nacos#481
zhongwen666 wants to merge 33 commits intoalibaba:masterfrom
zhongwen666:dev/scheduler_conf_to_nacos_0206

Conversation

@zhongwen666
Copy link
Collaborator

refs #480

zhongwen666 and others added 30 commits February 3, 2026 10:34
* add release note 120

* Revert "add release note 120"

This reverts commit 65a11fd.

* add version
* feat: add qwen code agent demo and config examples

* feat: add cursor CLI demo and config examples
…alibaba#277 (alibaba#423)

* delegate sandbox management operations to sandbox operator

* chore: add operator factory

* refine factory

* simplify get status logic
* feat: add http proxy endpoint for sandbox service

* chore: update sandbox proxy service imports and return types

* feat(sandbox): add POST proxy endpoint and service method

* test: update sandbox http proxy test imports

* test: add unit test for sandbox proxy router

* test: add streaming response test case

* test: update sandbox manager test config
* chore: update redis image version in sandbox demo

* refactor: remove redundant validation method in RockAgentConfig

* feat: add OpenClaw demo guide and config files
* add release note 120

* Revert "add release note 120"

This reverts commit 65a11fd.

* add v1.2.1 doc
* add release note 120

* Revert "add release note 120"

This reverts commit 65a11fd.

* fix scheduler task file not found detection
* monitor support user-defined endpoint

* add test cases
… (alibaba#451)

* feat(sdk): implement close_session method in Sandbox client

* fix(test): refine close_session integration test

- Use sandbox_instance fixture instead of admin_remote_server
- Remove unused unit test file
- Revert other changes to align with master

---------

Co-authored-by: lianzhanbiao <lianzhanbiao@lianzhanbiaodeMacBook-Air.local>
* add release note 120

* Revert "add release note 120"

This reverts commit 65a11fd.

* add kata
"""Pause all scheduled jobs by removing them from the scheduler."""
for task_type in list(TaskRegistry.get_all_tasks().keys()):
try:
self._scheduler.pause_job(task_type)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这是什么行为?会把rock worker上的进程干掉?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

scheduler是定时运行一次的,pause就是停止之后的运行,对于运行一次进程一直存在的任务无影响,对于cron任务有影响

Copy link
Collaborator

Choose a reason for hiding this comment

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

image cleanup不是调用一次,起了一个后台进程嘛。能stop掉?

set_env_service(sandbox_manager)

if rock_config.scheduler.enabled and is_primary_pod():
# if rock_config.scheduler.enabled and is_primary_pod():
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里啥意思?所有的admin write节点都要起scheduler进程?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里是我测试的时候注释的,现在取消注释

)

# Override the default update callback with our scheduler-aware callback
self._nacos_provider._update_callback = self._on_nacos_config_changed
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里破坏封装了。不允许这么用,要么你先重构这块

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已经修改,将回调函数作为add_listener方法的参数传入

cache_ttl=self.scheduler_config.worker_cache_ttl,
)

def _init_nacos_provider(self) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

为啥不直接把nacos_provider传进来,还要再构造一遍呢

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nacos client 内部包含 HTTP 连接、线程、回调函数等,这些都无法通过 pickle 序列化传递给子进程

Copy link
Collaborator

Choose a reason for hiding this comment

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

为啥Scheduler是个子进程


import uvicorn
from fastapi import FastAPI, Request
from OpenSource.rock.utils.system import is_primary_pod
Copy link
Collaborator

Choose a reason for hiding this comment

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

怎么还能有from OpenSource呢

callback: Optional callback function to be called when config changes.
If not provided, uses the default _update_callback method.
"""
if callback is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

去掉这个逻辑。都直接传参数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants