build: fix GH Codespaces building indefinitely #11981
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11423
Motivation
Make contributing easier for many users and those without too powerful local specs! Lots of folks have wanted to use it in issues and on Slack, so hopefully this should be a big help! 馃檪
onCreateCommand
and never finish (seemingly due tokit
? Runs indefinitely when used as anonCreateCommand
in GH Codespaces聽kitproj/kit#44)Modifications
use
postCreateCommand
instead ofonCreateCommand
postCreateCommand
runs asynchronously after the container is started, unlikeonCreateCommand
pre-build.sh
is running async!add GH Codespaces instructions to the developer docs (not exactly "running locally" though... 馃 I believe you can connect a local VSCode editor to it though)
pre-build.sh
-- can start editing, but may want to hold off running commandsremove old warning about Codespaces not working!
Verification
make docs
passesRan it myself and got a Codespace running successfully! Screenshots:
Editor and Terminal with
![Screenshot 2023-10-10 at 6 02 04 PM](https://private-user-images.githubusercontent.com/4970083/274079203-0d61ff92-84c7-49c8-b284-0dac6e17a1aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNTU5MTQsIm5iZiI6MTcyMDM1NTYxNCwicGF0aCI6Ii80OTcwMDgzLzI3NDA3OTIwMy0wZDYxZmY5Mi04NGM3LTQ5YzgtYjI4NC0wZGFjNmUxN2ExYWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTIzMzM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9M2NiYTA1OWEwZTMyYTNiMGYyMWFkZWRlNjZmMDJjMjViMjljYmVjYmU2NTM4NzI3NzlhMTkxNTQyMTgxNzZkZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.RfAZhDdBlejncaoZbg_OneAmeGMfHyVbrSW17Yhx6r8)
kit
running,pre-build.sh
complete and things are ready ("Finished configuring codespace" message at the bottom right):Ports tab:
![Screenshot 2023-10-10 at 6 01 50 PM](https://private-user-images.githubusercontent.com/4970083/274079201-5e81f022-4d3d-4e10-a9f7-42cc6ab6d357.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNTU5MTQsIm5iZiI6MTcyMDM1NTYxNCwicGF0aCI6Ii80OTcwMDgzLzI3NDA3OTIwMS01ZTgxZjAyMi00ZDNkLTRlMTAtYTlmNy00MmNjNmFiNmQzNTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTIzMzM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGRlYWI2Nzk5ZjRlNmEyOTVkOGFiNmI1YWIxNDYyZjA2NzEwYTlhMTBkOTk1Y2QyYzQ1MjlhYzJmZGNhZDQxOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.uOJjAXsyAm-ON34rqqW2mENY91KnYwxWhLL24olaq8M)
UI open in a new tab connected to the codespace:
![Screenshot 2023-10-10 at 5 58 00 PM -- CODESPACES IS WORKING!!](https://private-user-images.githubusercontent.com/4970083/274079198-0d0d40ab-41e7-48c2-b2f3-6dc12acee5ad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNTU5MTQsIm5iZiI6MTcyMDM1NTYxNCwicGF0aCI6Ii80OTcwMDgzLzI3NDA3OTE5OC0wZDBkNDBhYi00MWU3LTQ4YzItYjJmMy02ZGMxMmFjZWU1YWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDdUMTIzMzM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjEwOGUyNmQzNmMyNDU2MGExNDA4ZDA1YmE0YWNiYTcwYTk4OGE0MWNmN2Y3NjFjOTczZDQxNGY1NDFkMGVjZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ImXH9F3fBmnQFzER4ejj5rx4APdFNqxZp9Hgk6CSET4)