-
Notifications
You must be signed in to change notification settings - Fork 70
refactor: decouple the dependency on ProcessSpec for cnative app #1726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: decouple the dependency on ProcessSpec for cnative app #1726
Conversation
from paasng.platform.engine.models.deployment import ProcessTmpl | ||
|
||
|
||
def _list_proc_specs(env: ModuleEnvironment) -> List[Dict]: | ||
"""Return all processes specs of an app | ||
@define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前是不是讨论过 shim 模块的定位模糊,这些代码是不是不要放在 shim 里面?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已统一调整至 processes.py
procs = self.deployment.get_processes() | ||
proc_mgr = ProcessManager(self.engine_app.env) | ||
proc_mgr.sync_processes_specs(procs) | ||
proc_mgr.sync_processes_probes(procs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不能完全去除,比如 sync_processes_probes 仍然需要(刚好在改这块)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是处理的云原生应用,云原生应用的探针都在 ModuleProcessSpec.probes 定义, 如果有的话,应该想办法统一到 ModuleProcessSpec.probes 中。sync_processes_probes 主要是同步到 paas_wl.bk_app.processes.models.ProcessProbe 中,里面的探针仅用于普通应用
解耦云原生应用对 paas_wl 侧 ProcessSpec 等模型的依赖,改为直接从线上解析 Spec