Skip to content

Commit 30a8061

Browse files
chore: avoid upload config.yaml to faas (#81)
1 parent 993021a commit 30a8061

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

veadk/cli/cli_deploy.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ def deploy(
131131
"No requirements.txt found in the user project, we will use a default one."
132132
)
133133

134+
# avoid upload user's config.yaml
135+
if (user_proj_abs_path / "config.yaml").exists():
136+
logger.warning(
137+
f"Find a config.yaml in {user_proj_abs_path}/config.yaml, we will not upload it by default."
138+
)
139+
shutil.move(agent_dir / "config.yaml", Path(TEMP_PATH) / tmp_dir_name)
140+
else:
141+
logger.info(
142+
"No config.yaml found in the user project. Some environment variables may not be set."
143+
)
144+
134145
# load
135146
logger.debug(
136147
f"Load deploy module from {Path(TEMP_PATH) / tmp_dir_name / 'deploy.py'}"

veadk/integrations/ve_faas/ve_faas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ def _create_function(self, function_name: str, path: str):
120120
envs=envs,
121121
)
122122
)
123-
logger.debug(f"Function creation response: {res}")
123+
124+
# avoid print secrets
125+
logger.debug(
126+
f"Function creation in {res.project_name} project with ID {res.id}"
127+
)
124128

125129
function_id = res.id
126130

0 commit comments

Comments
 (0)