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

Split Codespaces configuration based on development scenarios #74683

Merged
merged 9 commits into from
Sep 20, 2022

Conversation

eerhardt
Copy link
Member

Taking advantage of the new "monorepo" projects feature in https://github.blog/changelog/2022-07-28-prebuilding-codespaces-is-now-supported-for-multi-repository-and-monorepo-projects/.

This allows us to have different Codespaces pre-builds based on what kind of work you are doing. It also minimizes the down-time of pre-builds if one development scenario is broken (for example if the WASM prebuild is broken, libraries developers can still use the libraries pre-build).

The duplication of the Dockerfile is unfortunate. But I'm thinking if we can move these docker images to https://github.com/dotnet/dotnet-buildtools-prereqs-docker, we could:

  1. save time during the pre-build actions because the image doesn't need to be rebuilt every day.
  2. Refactor the Dockerfiles into layers and reuse the common pieces.
    cc @MichaelSimons and @mthalman for thoughts on that.

This will require an admin to update the Codespaces in the Settings tab of the repo. I don't have access to do that.

Codespaces allows for monorepo support now. So we can have different pre-builds for different dev environments.

Creating a "libraries" pre-build and a "wasm" pre-build devcontainer.
@ghost
Copy link

ghost commented Aug 26, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Taking advantage of the new "monorepo" projects feature in https://github.blog/changelog/2022-07-28-prebuilding-codespaces-is-now-supported-for-multi-repository-and-monorepo-projects/.

This allows us to have different Codespaces pre-builds based on what kind of work you are doing. It also minimizes the down-time of pre-builds if one development scenario is broken (for example if the WASM prebuild is broken, libraries developers can still use the libraries pre-build).

The duplication of the Dockerfile is unfortunate. But I'm thinking if we can move these docker images to https://github.com/dotnet/dotnet-buildtools-prereqs-docker, we could:

  1. save time during the pre-build actions because the image doesn't need to be rebuilt every day.
  2. Refactor the Dockerfiles into layers and reuse the common pieces.
    cc @MichaelSimons and @mthalman for thoughts on that.

This will require an admin to update the Codespaces in the Settings tab of the repo. I don't have access to do that.

Author: eerhardt
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

.devcontainer/libraries/Dockerfile Outdated Show resolved Hide resolved
.devcontainer/libraries/Dockerfile Outdated Show resolved Hide resolved
.devcontainer/libraries/devcontainer.json Show resolved Hide resolved
docs/workflow/Codespaces.md Outdated Show resolved Hide resolved
docs/workflow/Codespaces.md Show resolved Hide resolved
@ghost ghost added the needs-author-action An issue or pull request that requires more info or actions from the author. label Aug 29, 2022
@MichaelSimons
Copy link
Member

2. Refactor the Dockerfiles into layers and reuse the common pieces.
cc @MichaelSimons and @mthalman for thoughts on that.

I think that makes sense. You are installing a lot of common prereq packages that aren't going to change at a high frequency.

@ghost ghost added the no-recent-activity label Sep 13, 2022
@ghost
Copy link

ghost commented Sep 13, 2022

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@ghost ghost removed needs-author-action An issue or pull request that requires more info or actions from the author. no-recent-activity labels Sep 14, 2022
@radical radical self-requested a review September 14, 2022 19:58
Copy link
Member

@fanyang-mono fanyang-mono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WASM related change looks good to me! This is a great new feature. Now I could add the build for Mono desktop scenarios.

@eerhardt
Copy link
Member Author

I have addressed all feedback and have manually tested this works in my fork. Once I merge, I'm going to need a repo admin to update the settings in order to get the Codespaces prebuilds working again.

I plan on merging tomorrow unless I get more feedback.

Developing in dotnet/runtime with a 2-core / 4GB ram machine doesn't work very well. Add a minimum of 4-core machine to the devcontainer spec.

Fix dotnet#75680
@eerhardt eerhardt merged commit 55060eb into dotnet:main Sep 20, 2022
@eerhardt eerhardt deleted the Codespaces branch September 20, 2022 16:24
@ghost ghost locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants