Skip to content

Commit

Permalink
fix: dev sandbox wl_app name must endswith -dev (#1783)
Browse files Browse the repository at this point in the history
  • Loading branch information
narasux authored Dec 5, 2024
1 parent 1210d55 commit 6025d0d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apiserver/paasng/paas_wl/bk_app/dev_sandbox/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,12 @@ def create(self) -> WlApp:

def _make_dev_wl_app_name(self) -> str:
"""参考 make_engine_app_name 规则, 生成 dev 环境的 WlApp name"""
if self.module_name == ModuleName.DEFAULT.value:
wl_app_name = f"{DEFAULT_ENGINE_APP_PREFIX}-{self.app.code}-dev"
else:
wl_app_name = f"{DEFAULT_ENGINE_APP_PREFIX}-{self.app.code}-m-{self.module_name}-dev"
suffix = f"{self.dev_sandbox_code}-dev" if self.dev_sandbox_code else "dev"

if self.dev_sandbox_code:
wl_app_name = f"{wl_app_name}-{self.dev_sandbox_code}"
if self.module_name == ModuleName.DEFAULT.value:
return f"{DEFAULT_ENGINE_APP_PREFIX}-{self.app.code}-{suffix}"

return wl_app_name
return f"{DEFAULT_ENGINE_APP_PREFIX}-{self.app.code}-m-{self.module_name}-{suffix}"

def _make_namespace_name(self) -> str:
"""生成 namespace_name"""
Expand Down

0 comments on commit 6025d0d

Please sign in to comment.