Skip to content
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

fix: dev sandbox wl_app name must endswith -dev #1783

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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