Commit Graph
5 Commits
Author SHA1 Message Date
Sébastien StormacqandGitHub 71d49b049e [plugin] support for resources packaging on ubuntu (#467)
When including resources in the package and packaging on Ubuntu,
`FileManager` throws a FilePermission error. The docker daemon runs as
root and files to be copied are owned by `root` while the archiver runs
as the current user (`ubuntu` on EC2 Ubuntu). The `FileManager` manages
to copy the files but throws an error after the copy. We suspect the
`FileManager` to perform some kind of operation after the copy and it
fails because of the `root` permission of the files.

See
https://github.com/swift-server/swift-aws-lambda-runtime/issues/449#issuecomment-2595978246
for a description of the problem.

This PR contains code to reproduce the problem, a very simple
workaround, and an integration test.
The workaround consists of 
- trapping all errors
- verify if the error is the permission error (Code = 513)
- verify if the files have been copied or not 
- if the two above conditions are met, ignore the error, otherwise
re-throw it

I would rather prefer a solution that solves the root cause rather than
just ignoring the error.
We're still investigating the root cause (see [this
thread](https://forums.swift.org/t/filemanager-copyitem-on-linux-fails-after-copying-the-files/77282)
on the Swift Forum and this issue on Swift Foundation
https://github.com/swiftlang/swift-foundation/issues/1125
2025-01-21 08:06:51 +01:00
Sébastien StormacqandGitHub 31a7edaf87 [CI] add test to check libFoundation.so & co are not linked to the bi… (#441)
This adds a test in the `integration_test.yml` workflow to verify that
`libFoundation.so`, `libFoundationInternationalization.so`, and
`lib_FoundationICU.so` and not linked the the function binary.

This is a follow up from the work make by @t089 to ensure that we don't
accidentally link Foundation again in the future.

Remove Foundation :
https://github.com/swift-server/swift-aws-lambda-runtime/pull/436
Add test in CI to ensure we don't link to foundation :
https://github.com/swift-server/swift-aws-lambda-runtime/issues/402
2024-12-25 07:42:54 +01:00
Sébastien StormacqandGitHub 8c1c1b6fc3 revert commit 04b01da9fe 2024-12-24 08:43:45 +01:00
Sébastien StormacqandGitHub 04b01da9fe move integration test to .github (#443)
_[One line description of your change]_

### Motivation:

_[Explain here the context, and why you're making that change. What is
the problem you're trying to solve.]_

### Modifications:

_[Describe the modifications you've done.]_

### Result:

_[After your change, what will change.]_
2024-12-22 15:17:44 +01:00
Sébastien StormacqandGitHub b4d17fdf8d [CI] add CI scripts separate from the workflows (#442)
_[One line description of your change]_

### Motivation:

_[Explain here the context, and why you're making that change. What is
the problem you're trying to solve.]_

### Modifications:

_[Describe the modifications you've done.]_

### Result:

_[After your change, what will change.]_
2024-12-22 14:39:52 +01:00