serverless-plugin-typescript icon indicating copy to clipboard operation
serverless-plugin-typescript copied to clipboard

Deployed package contains deleted files

Open tamlyn opened this issue 3 years ago • 0 comments

I've created a repro repo to demonstrate the problem: https://github.com/tamlyn/sls-package-bug

Essentially the problem is this:

  • use the package.patterns SLS config to copy files into the package
  • run a command such as sls invoke local which generates the .build folder
  • delete a file that would be included by the patterns
  • run sls deploy (or sls package)

Then the deleted file is included in the package and deployed, because it was incorrectly cached in the .build folder.

This caused some havoc when a migration from a feature branch was cached like this in .build then accidentally deployed and run on main (thankfully not on production).

tamlyn avatar Jul 13 '22 17:07 tamlyn