aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

fix: Use container path for file observer in a container

Open mildaniel opened this issue 1 year ago • 0 comments

Which issue(s) does this change fix?

#6688

Why is this change necessary?

When providing --docker-volume-basedir, the Lambda function is correctly spun up by a mapping the host path to the container path. However, the file watcher keeps trying to use the host path which might not exist in inside the container.

How does it address the issue?

Keeps a reference to the container source code path and uses that path in the file observer instead.

What side effects does this change have?

N/A

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • [x] Add input/output type hints to new functions/methods
  • [ ] Write design document if needed (Do I need to write a design document?)
  • [x] Write/update unit tests
  • [x] Write/update integration tests
  • [ ] Write/update functional tests if needed
  • [x] make pr passes
  • [ ] make update-reproducible-reqs if dependencies were changed
  • [ ] Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

mildaniel avatar Feb 16 '24 00:02 mildaniel