Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploration of .NET build cache reuse bug #9

Merged
merged 3 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dotnet-build-cache-reuse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet-build-cache
31 changes: 31 additions & 0 deletions dotnet-build-cache-reuse/README.md
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"
```
16 changes: 16 additions & 0 deletions dotnet-build-cache-reuse/go.mod
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
)
Loading