Bug 1465779 - aspnetcore.all meta package restore slows down s2i build and consumes bandwidth
Summary: aspnetcore.all meta package restore slows down s2i build and consumes bandwidth
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: dotNET
Classification: Red Hat
Component: rh-dotnet20-container
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ga
: 2.0
Assignee: Andrew Slice
QA Contact: Radka Gustavsson
Les Williams
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-28 07:50 UTC by Tom Deseyn
Modified: 2020-01-29 03:16 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-24 15:46:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tom Deseyn 2017-06-28 07:50:11 UTC
ASP.NET Core 2.0 introduces a meta package to reference the major packages that make up the web framework.

The Microsoft dotnet docker sdk image caches these packages from nuget.org in the image.
This has the advantage of both speeding up the build and not wasting the bandwidth of downloading for each build.

With my internet connection/machine this takes about 1-2min and downloads 130MB of packages.

```
$ rm -rf ~/.nuget ~/.local/share/NuGet/; time dotnet new mvc
real	1m47.271s
$ du -ch $(find ~/.nuget/packages -name '*.nupkg') | tail -1
129M	total
```

Since we are not caching these packages, this restore currently happens for every s2i build.

Comment 1 Severin Gehwolf 2017-06-28 10:52:10 UTC
Andrew, how about we do this nuget cache warmup in the 2.0 s2i builder image? This should solve the issue, right?

Comment 2 Tom Deseyn 2017-06-28 11:08:39 UTC
Severin, I had implemented that but this is being removed as part of https://github.com/redhat-developer/s2i-dotnetcore/pull/88/files#diff-6f2669af799dae0df04fa82a92c1d7f9L60. The motivation is we are not building these packages.

Comment 7 Andrew Slice 2020-01-24 15:46:17 UTC
I'm closing this as "Won't Fix", though maybe the correct answer is actually "Can't Fix". As described here, source build issues in 2.x prevent us from shipping with the packages necessary to get rid of this, and any future development is going into the 3.x versions.

In 3.x, the design has been changed to no longer need to grab these packages at runtime, including providing proper source built packages. So the suggestion might be to upgrade to 3.x

For 2.x, there is a workaround that can be done, but it does require using non-source built packages that we can't ship.

We have imagestreams for 2.x packages that pre-cache ASP.NET. This was implemented in this PR upstream: https://github.com/redhat-developer/s2i-dotnetcore/pull/280

In general, information on that can be found upstream: https://github.com/redhat-developer/s2i-dotnetcore


Note You need to log in before you can comment on or make changes to this bug.