Conversation
c17d17d to
9a4982e
Compare
JiwaniZakir
left a comment
There was a problem hiding this comment.
identify_volc_env() in both skills_download.py and skills_register.py uses print() instead of return, so the function always returns None. This means VOLC_ENV == "vefaas" and VOLC_ENV == "ecs" will never be True, silently bypassing all credential resolution for both environments — this is a critical logic bug.
Additionally, get_credential_from_ecs_iam() has a potential UnboundLocalError: if requests.get() raises a RequestException, the exception is caught and printed, but data is never assigned, yet execution falls through to data.get("AccessKeyId") on the return statement. The function should either re-raise the exception or return early/None on failure rather than swallowing the error and proceeding.
The IAM role name AgentKit_Runtime_Default_ServiceRole_8xfe4ne is hardcoded in the metadata URL in both files — this should be configurable via an environment variable (similar to how AGENTKIT_SKILL_HOST and AGENTKIT_TOOL_REGION are handled), since different deployments will have different service roles.
Finally, identify_volc_env(), VeECSCredential, and get_credential_from_ecs_iam() are duplicated verbatim across both scripts; these belong in a shared utility module to avoid drift between the two implementations.
No description provided.