-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dev container and documentation for GitHub Codespaces #13806
Comments
Hey thanks for opening the issue, I'm curious to get feedback from our community on whether they would find a .devcontainer config file valuable. Some quick observations/questions from my usage .devcontainers.json1. What's the cost to maintain them?We currently have our Prow CI image and have various reusable actions in knative/actions. How can we consolidate the configuration and setup of all these similar but unique tooling. For example - it looks like there's a unique way to install the aws cli using devcontainer features vs. how you accomplish that in GitHub actions. I just don't want an extra thing to update when we bump go versions etc. 2. devfilehttps://devfile.io/ seems to be the CNCF standard for this kind of stuff - what's your take here? Do you support this format too? CodespacesMy experience with codespaces is a bit mixed since a non-active codespaces consume storage quota and it would run out in a week or so. Unsure if this is because of all the go modules that needed to be in the cache when building with Given that what options do you have for contributors beyond running VSCode locally with Docker. |
If folks find it useful and it's low effort to maintain, then I don't have an objection to it (even though personally I'm not a fan). |
Thanks for your response! β¨
We could use the Dev config is low maintenance, Features/images are pinned to major versions and by default latest versions of toolings can be installed wherever possible (which avoids manual version bumps). I don't expect updates to dev config unless there are project setup changes/updates.
Interesting, I wasn't aware that Unfortunately, Codespaces doesn't support devfiles.
Apologies for having storage issues, I could take a look at the ticket and see what I could find.
Dev container is an open spec which is supported by these supporting tools (eg. GitHub Codespaces, VS Code Dev containers extension etc) |
Additionally, the dev container can be run locally using the dev containers cli https://github.com/devcontainers/cli. The VS Code Dev Containers extension allows you to run, connect to, and manage the containers within VS Code on your local machine. |
Do devcontainers only work with VS Code, or is there integration with other editors / IDEs as well? |
@psschwei dev containers implementors are listed here https://containers.dev/supporting |
I am currently setting up dev container configuration by referring to the DEVELOPMENT.md#install-requirements section. The test/README.md#presubmit-tests are passing with it. For running end to end tests and conformance tests, looks like it needs some manual environment setup (setting up knative serving cluster, docker hub, etc), still taking a look and trying to understand that bit π My question, I'd like to understand how to measure if the dev config is appropriate for this Any pointers would be helpful and appreciated, thank you! |
Following up from the discussion between Productivity <=> GitHub last week. We're going to run this as an experiment utilizing Google Summer of Code contributors as the test cohort. In terms of what would be good to have in the .devcontainer image Our CI uses the following Docker Image - https://gcr.io/knative-tests/test-infra/prow-tests It would be good for the devcontainer to just leverage that image to start - maybe just use the It would be great if kind clusters could be started in the container and being able to install serving. Similar to what we do in our e2e action - https://github.com/knative/serving/blob/main/.github/workflows/kind-e2e.yaml |
Thank you @dprotaso for the context, appreciate it. I have opened a PR #13838 and tested creation of local container registry, kind clusters, and deployment of serving and ingress with this setup script in a codespace. I can add it to the
Thanks, yes using the
Unfortunately, one needs to create a new codespace or rebuild the current one to fetch the latest image. |
Closing as PR is merged, thank you! |
Some feedback rolled in from https://cloud-native.slack.com/archives/C04LMU0AX60/p1680819416766089
I asked that they follow up in this issue |
Looks like the prow-test image is not supported for ARM architecture, hence, testing it on a windows machine.
For a 2 cores codespace, you will get the high CPU usage notification as the setup script needs a powerful machine. However, if you ignore that message, the script continues to run on its own pace. Also, you can reload the codespace if you feel like some step is getting stuck. You can also switch to higher cores to avoid that issue. |
On a windows machine, I tried the dev container with the Dev Containers extension, it built fine for me (no errors). Can I take a look at the creation logs to identify the issue? |
Hi In codespaces , due to high memory usage the kubectl verify commands in the script fails. Re-running the scripts manually will eventually be complete. But not able get it working for example service maybe due to resource constrains. In local devcontainer setup , I run into this kind issue β Preparing nodes π¦ π¦
ERROR: failed to create cluster: could not find a line that matches "Reached target .*Multi-User System.*" I am not sure if its my own setup issue. |
That's strange, I am able to get the
Looks like something is interfering with your local config. |
@samruddhikhandale So the image pull and unpacking is pretty slow when setting up the codespace - how do we take advantage of prebuilds? |
Also looks like the post create script is not working
The post create script & |
https://docs.github.com/en/codespaces/prebuilding-your-codespaces provides information on setting up prebuilds. Let me know if that helps.
Taking a look π |
If I setup pre-builds in |
Unfortunately, no. Pre-builds are helpful for folks who create a codespace with the parent repo with write permissions |
Hmm.. that doesn't really work for our community since most people will be working in forks. |
Related: knative/community#1295 |
Hi π
I am Samruddhi, a Software Engineer for GitHub, working with the GitHub Codespaces team, and a maintainer for the devcontainers org π©βπ»
GitHub Codespaces is a cloud-based development environment that uses your dev container to provide great contributor and maintainer experiences for all users of your project πͺ
π ββοΈ No one would ever have to worry about setting up their local machines, adding tools/runtimes for a specific project (which most frequently contradicts with their current environment) and spend hours before even starting their actual work π ββοΈ
Would you be willing to accept a dev container configuration and documentation to improve the GitHub Codespaces experience? πββοΈ
Thanks,
Samruddhi
// cc @craiglpeters
The text was updated successfully, but these errors were encountered: