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

Make first run an explicit operation #16880

Open
richlander opened this issue Apr 13, 2021 · 4 comments
Open

Make first run an explicit operation #16880

richlander opened this issue Apr 13, 2021 · 4 comments
Labels
Milestone

Comments

@richlander
Copy link
Member

For .NET SDK containers, it is critical that we control the first run experience. There are design truths of containers that need to be appreciated:

  • Every run with containers is first run (modulo what happens in docker build; the point of this conversation).
  • Containers are intended to be fully configured, enabling an instant-on experience.

As a result, running actual first run logic is antithetical to containers. We've always run dotnet help as a sort of hack to manage first run. That is unintuitive. We know that lots of people clone our Dockerfiles. Big companies, other OSS projects, and other clouds tell us that they do this. They've also expressed their appreciation for the careful design and thoughtfulness we put into the Dockerfiles so that they can easily consume them. This issue is the biggest remaining challenge we have.

We recently made changes to our Dockerfiles to make our first run handling more explicit/intentional. Unfortunately, this is making our Dockerfiles more verbose.

And, we're still relying on dotnet help.

We'd like a new command -- call it dotnet init -- that takes a set of argument that enable us to describe our intent.

dotnet init --no-logo --generate-aspnet-certificate=0 --nuget-xml-doc-mode=skip

Half of the ENVs we set are used only at startup. That's unfortunate. With the proposed model, we'd get the following benefits:

  • Our Dockerfiles would be shorter and simpler.
  • First run would be explicit.
  • The locality of first run concerns would be vastly improved, to one line.
  • The process state would be improved (fewer ENVs set). This isn't a perf issue, but simplifying our product state and making it easier to understand. I could see the SDK turning these args into ENVs as an implementation detail. That would be OK.
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Apr 13, 2021
@KathleenDollard
Copy link

I'd like an explicit switch for skipping the telemetry message. Otherwise this seems like a good idea.

@richlander
Copy link
Member Author

richlander commented Apr 13, 2021

NOLOGO is that, and we already had a conversation about that exact topic. NOLOGO needs to be the "no extra console output" control. If you want to create a new one that does less than that, that works.

@KathleenDollard
Copy link

That sounds good. Let's stick with that for now so it is consistent within containers and for non-containers.

@marcpopMSFT marcpopMSFT self-assigned this Apr 21, 2021
@marcpopMSFT marcpopMSFT removed the untriaged Request triage from a team member label May 7, 2021
@marcpopMSFT marcpopMSFT added this to the Backlog milestone May 7, 2021
@marcpopMSFT marcpopMSFT removed their assignment May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants