From 96f08a03d1b03037bb784ad3eed806ce59bcbe1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=99=93=E6=AD=A6=5Bfinelin=5D?= Date: Thu, 5 Sep 2024 14:38:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=B8=A6=E7=AB=AF=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=9C=B0=E5=9D=80=E8=A7=A3=E6=9E=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#1576?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apiserver/paasng/paasng/settings/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/paasng/paasng/settings/__init__.py b/apiserver/paasng/paasng/settings/__init__.py index 0ac67ba338..5bb5920a29 100644 --- a/apiserver/paasng/paasng/settings/__init__.py +++ b/apiserver/paasng/paasng/settings/__init__.py @@ -1228,9 +1228,9 @@ def _build_file_handler(log_path: Path, filename: str, format: str) -> Dict: # S-Mart 基础镜像信息 _SMART_TAG_SUFFIX = "smart" SMART_IMAGE_NAME = f"{SMART_DOCKER_REGISTRY_NAMESPACE}/slug-pilot" -SMART_IMAGE_TAG = f'{settings.get("APP_IMAGE", "").partition(":")[-1]}-{_SMART_TAG_SUFFIX}' +SMART_IMAGE_TAG = f'{settings.get("APP_IMAGE", "").split(":")[-1]}-{_SMART_TAG_SUFFIX}' SMART_CNB_IMAGE_NAME = f"{SMART_DOCKER_REGISTRY_NAMESPACE}/run-heroku-bionic" -SMART_CNB_IMAGE_TAG = f'{settings.get("HEROKU_RUNNER_IMAGE", "").partition(":")[-1]}-{_SMART_TAG_SUFFIX}' +SMART_CNB_IMAGE_TAG = f'{settings.get("HEROKU_RUNNER_IMAGE", "").split(":")[-1]}-{_SMART_TAG_SUFFIX}' # slugbuilder build 的超时时间, 单位秒 BUILD_PROCESS_TIMEOUT = int(settings.get("BUILD_PROCESS_TIMEOUT", 60 * 15)) From a00641d7d3ca643b0e40fead4741915adf62a363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=99=93=E6=AD=A6=5Bfinelin=5D?= Date: Fri, 6 Sep 2024 15:32:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=B8=A6=E7=AB=AF=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=9C=B0=E5=9D=80=E8=A7=A3=E6=9E=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20#1576?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apiserver/paasng/paasng/settings/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apiserver/paasng/paasng/settings/__init__.py b/apiserver/paasng/paasng/settings/__init__.py index 5bb5920a29..2c7d17cae7 100644 --- a/apiserver/paasng/paasng/settings/__init__.py +++ b/apiserver/paasng/paasng/settings/__init__.py @@ -52,6 +52,7 @@ from django.utils.encoding import force_bytes, force_str from dynaconf import LazySettings, Validator from environ import Env +from moby_distribution.registry.utils import parse_image from .utils import ( get_database_conf, @@ -1228,9 +1229,9 @@ def _build_file_handler(log_path: Path, filename: str, format: str) -> Dict: # S-Mart 基础镜像信息 _SMART_TAG_SUFFIX = "smart" SMART_IMAGE_NAME = f"{SMART_DOCKER_REGISTRY_NAMESPACE}/slug-pilot" -SMART_IMAGE_TAG = f'{settings.get("APP_IMAGE", "").split(":")[-1]}-{_SMART_TAG_SUFFIX}' +SMART_IMAGE_TAG = f'{parse_image(settings.get("APP_IMAGE", "")).tag or "latest"}-{_SMART_TAG_SUFFIX}' SMART_CNB_IMAGE_NAME = f"{SMART_DOCKER_REGISTRY_NAMESPACE}/run-heroku-bionic" -SMART_CNB_IMAGE_TAG = f'{settings.get("HEROKU_RUNNER_IMAGE", "").split(":")[-1]}-{_SMART_TAG_SUFFIX}' +SMART_CNB_IMAGE_TAG = f'{parse_image(settings.get("HEROKU_RUNNER_IMAGE", "")).tag or "latest"}-{_SMART_TAG_SUFFIX}' # slugbuilder build 的超时时间, 单位秒 BUILD_PROCESS_TIMEOUT = int(settings.get("BUILD_PROCESS_TIMEOUT", 60 * 15))