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
49 stars 15 forks source link

[BUG] Seedfarmer 4.0.4 doesn't actually delete the modules if they were deleted from manifests #719

Closed ktulhax closed 1 month ago

ktulhax commented 2 months ago

Describe the bug

Seedfarmer successfully finish seedfarmer apply in case if the module was deleted from .yaml manifest or/and the folder with this module was also deleted, but it doesn't actually delete resources, i.e.:

To Reproduce Steps to reproduce the behavior:

  1. Have a project with two modules which are referencing to different folders
  2. Create inital deployment with seedfarmer apply
  3. Delete one of the module from manifest and delete the folder with this module as well
  4. Do seedfarmer apply again
  5. See the result described above

Expected behavior It was expected that after seedfarmer apply all relevant resouces will be deleted

Additional context The testing has been done for StepFunction and LogGroup modules

dgraeber commented 2 months ago

@ktulhax Thanks for this issue. The only resources SF creates are the seedkit (for the entire project via CodeSeeder), the module role (with an attached modulestack if defined) and leverages SSM (no resources there). All other resources are created and destroy by the module.

In your case, you successfully deleted the cached bundle and the SSM metadata for the module (indicating that the module reported back that the destroy was successful). The only remaining resource that SF is aware of is the module role.

Can you provide more info regarding the CFN stack that persists? The name will indicate the usage . Also provide any other pertinent info (the module you are using .... a sample manifest with no proprietary info, etc). We will investigate your use case.

dgraeber commented 1 month ago

Closing due to lack of info / inability to reproduce