From 1461f146292223d41a188b0294b09eafee4cf6a6 Mon Sep 17 00:00:00 2001 From: "fangyaozheng@bytedance.com" Date: Tue, 19 Aug 2025 14:33:53 +0800 Subject: [PATCH] avoid upload config.yaml to faas --- veadk/cli/cli_deploy.py | 11 +++++++++++ veadk/integrations/ve_faas/ve_faas.py | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/veadk/cli/cli_deploy.py b/veadk/cli/cli_deploy.py index 87d6e704..5224850c 100644 --- a/veadk/cli/cli_deploy.py +++ b/veadk/cli/cli_deploy.py @@ -131,6 +131,17 @@ def deploy( "No requirements.txt found in the user project, we will use a default one." ) + # avoid upload user's config.yaml + if (user_proj_abs_path / "config.yaml").exists(): + logger.warning( + f"Find a config.yaml in {user_proj_abs_path}/config.yaml, we will not upload it by default." + ) + shutil.move(agent_dir / "config.yaml", Path(TEMP_PATH) / tmp_dir_name) + else: + logger.info( + "No config.yaml found in the user project. Some environment variables may not be set." + ) + # load logger.debug( f"Load deploy module from {Path(TEMP_PATH) / tmp_dir_name / 'deploy.py'}" diff --git a/veadk/integrations/ve_faas/ve_faas.py b/veadk/integrations/ve_faas/ve_faas.py index 71c77a7f..c94fe7fa 100644 --- a/veadk/integrations/ve_faas/ve_faas.py +++ b/veadk/integrations/ve_faas/ve_faas.py @@ -120,7 +120,11 @@ def _create_function(self, function_name: str, path: str): envs=envs, ) ) - logger.debug(f"Function creation response: {res}") + + # avoid print secrets + logger.debug( + f"Function creation in {res.project_name} project with ID {res.id}" + ) function_id = res.id