awslabs / seed-farmer

Seed-Farmer is an orchestration tool that works with AWS CodeSeeder and acts as an orchestration tool modeled after GitOps deployments. It has a CommandLine Interface based in Python, leverages modular code deployments defined by declarative manifests, and includes change detection and deployment optimization.
https://seed-farmer.readthedocs.io/en/latest/
Apache License 2.0
45 stars 16 forks source link

[BUG] Env replacement does not work correctly in module manifest's path #657

Closed ps-spark closed 2 months ago

ps-spark commented 2 months ago

Describe the bug I'm trying to use two env variables in a module's manifest file, in the path value. The first env will be replaced, the second not. I don't know, if the problem is specific to the path value.

To Reproduce Steps to reproduce the behavior:

  1. Define two envs:

    SI_GIT_URL=ssh://git@xxx/scene-intelligence-rosbag.git
    SI_GIT_BRANCH=heads/features/branchname

    The values are also written to the .env file.

  2. Then in the module's manifest file use: path: git::${SI_GIT_URL}//modules/optionals/datalake-buckets/?ref=${SI_GIT_BRANCH}

  3. seedfarmer apply manifests/aws-solutions/deployment.yaml --env-file .env

The log shows that only the first env will be replaced and so the deployment fails at the git pull xxx step. If I replace the second env with the actual value, the deployment runs through.

Expected behavior The path of the Git repository will be correctly resolved.

LeonLuttenberger commented 2 months ago

Thanks for letting us know of this issue. I'm working on a PR to fix it.