awslabs / aws-codeseeder

The aws-codeseeder project enables builders to easily "seed" python code to AWS CodeBuild for remote execution in their cloud environments.
https://aws-codeseeder.readthedocs.io/en/latest/
Apache License 2.0
38 stars 9 forks source link

[BUG] CodeSeeeder cannot make bundles from code sourced from a path with '@' in the naming convention #266

Open dgraeber opened 2 weeks ago

dgraeber commented 2 weeks ago

When using with SeedFarmer, if the path that houses the manifests is located under a node-compliant naming convention, CS cannot create a bundle due to an @ symbol in the full path.

For example, when using manifests sourced from an npm package, the manifests are located in a relative path like:

~/src/node_modules/@awssolutions/iwblueprints-poc/dummyblueprint/. When SeedFarmer fetches the module code from Git, the module code resides in a path such as: ~/src/node_modules/@awssolutions/iwblueprints-poc/dummyblueprint/seedfarmer.gitmodules/github.com_awslabs_idf-modules_release_1.6.0/modules/dummy/blank... to which CodeSeeder fails to properly create a bundle...

File "/XXXXXXX/aws-seed-group/.venv-latest/lib/python3.9/site-packages/aws_codeseeder/_bundle.py", line 145, in generate_bundle generate_dir(out_dir=bundle_dir, dir=dir, name=name) File "/XXXXXX/aws-seed-group/.venv-latest/lib/python3.9/site-packages/aws_codeseeder/_bundle.py", line 95, in generate_dir raise ValueError(f"{name} ({absolute_dir}) is empty!") ValueError: module (/src/node_modules/@awssolutions/iwblueprints-poc/dummyblueprint/seedfarmer.gitmodules/github.com_awslabs_idf-modules_release_1.6.0/modules/dummy/blank) is empty! (.venv-latest) (base) ✘-1 ~/src/node_modules/@awssolutions/iwblueprints-poc/dummyblueprint [mainline ↓·3|…9⚑ 1]

dgraeber commented 2 weeks ago

Fo reference later on..

Screenshot 2024-10-29 at 10 03 24 AM