-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exploration of .NET build cache reuse bug (#9)
* add initial exploration of build cache reuse bug discussed in paketo-buildpacks/dotnet-publish#279 * Add manual steps to dotnet cache reuse * make a fresh copy of the app before rebuilding Co-authored-by: Sophie Wigmore <[email protected]>
- Loading branch information
Frankie G-J
and
Sophie Wigmore
authored
Jul 29, 2022
1 parent
4c2ce23
commit 1dd49b9
Showing
6 changed files
with
3,257 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dotnet-build-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Build cache issue reproduction | ||
|
||
## Testing locally | ||
|
||
Run | ||
``` | ||
APP_SOURCE=<path to console app> go run main.go | ||
``` | ||
|
||
## Testing in a docker container | ||
Use the official .NET SDK docker container for .NET 3.1 on top of ubuntu 18.04: | ||
1. Compile the go program for linux: `GOOS=linux go build .` | ||
3. Run the test in a container: | ||
``` | ||
docker run -it -v $(pwd):/test \ | ||
-v $APP_SOURCE:/source \ | ||
--env APP_SOURCE=/source \ | ||
mcr.microsoft.com/dotnet/sdk:3.1-bionic \ | ||
/test/dotnet-build-cache | ||
``` | ||
|
||
## Testing `dotnet publish` behaviour manually (on Linux) | ||
On Linux, it appears that the issue only occurs when orchestrated through | ||
Golang. When run manually or through a bash script, the failure does not crop | ||
up. | ||
|
||
Running the following appears to have the expected effects, in which the app | ||
serves the updated content: | ||
``` | ||
./manual.sh --dir <path to some temporary directory" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module github.com/fg-j/explorations/dotnet-build-cache | ||
|
||
go 1.18 | ||
|
||
require ( | ||
github.com/paketo-buildpacks/occam v0.8.0 | ||
github.com/paketo-buildpacks/packit/v2 v2.3.0 | ||
) | ||
|
||
require ( | ||
github.com/ForestEckhardt/freezer v0.0.11 // indirect | ||
github.com/gabriel-vasile/mimetype v1.4.0 // indirect | ||
github.com/oklog/ulid v1.3.1 // indirect | ||
github.com/ulikunitz/xz v0.5.10 // indirect | ||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect | ||
) |
Oops, something went wrong.