You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to approach this in a more nuanced way. We cannot blindly delete "vendored" files, because we don't have a record of the files that were vendored. Or if we did blindly delete files in the target path, that would need to be an opt-in feature.
At a minimum, we should only delete files that were originally vendored. This can be accomplished with a vendor.yaml.lock file. Or we can make a design choice that we delete files in the target path which are not in git. This would be the easiest implementation:
git clean -fd TARGET_PATH
There's a related issue, that highlights some of the challenges:
Describe the Bug
Let's assume there are two versions of the component containing the following files.
Version 1
main.tf
locals.tf
Version 2
main.tf
If you have pulled version 2 into a component that had already pulled version 1 the
locals.tf
would not be removedExpected Behavior
atmos vendor pull --component {name}
before pull should remove all files from component directory exceptcomponent.yaml
orvendor.yaml
.Steps to Reproduce
Let's assume there are two versions of the component containing the following files.
aws-team-roles
incomponents/terraform/aws-team-roles
components/terraform/aws-team-roles/component.yaml
file with the following content point to https://github.com/cloudposse/terraform-aws-components/tree/1.470.0/modules/aws-team-rolesatmos vendor pull --component aws-team-roles
ls -l
components/terraform/aws-team-rolesand check that files
policy-billing.tfand
policy-support.tf` is therecomponents/terraform/aws-team-roles/component.yaml
replaceversion: 1.470.0
withversion: 1.471.0
point to https://github.com/cloudposse/terraform-aws-components/tree/1.471.0/modules/aws-team-roles
atmos vendor pull --component aws-team-roles
Expected
ls -l
components/terraform/aws-team-roles`policy-billing.tf
andpolicy-support.tf
disappeared because they we removed in https://github.com/cloudposse/terraform-aws-components/tree/1.471.0/modules/aws-team-rolesExists
ls -l
components/terraform/aws-team-roles`policy-billing.tf
andpolicy-support.tf
still thereScreenshots
No response
Environment
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: