-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update Codespaces configuration #60900
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: github/codespaces-precache@v1.0.1 | ||
- uses: github/codespaces-precache@v1-stable | ||
with: | ||
regions: WestUs2 | ||
sku_name: standardLinux32gb | ||
regions: WestUs2 EastUs WestEurope | ||
sku_name: premiumLinux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the implications of which regions we select and which sku we use? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Honestly this took the most time to track down. Which GH server your requests go to depends on your physical location. There are 4 available regions - WestUs2 EastUs WestEurope SouthEastAsia. When I (located in the middle of the US) created a new Codespace I wasn't getting a pre-built image. Instead it would create a new container from scratch. There was no indication of why. I needed to contact GH support, and they let me know that my requests were going to EastUs. So I added EastUs to cover the rest of the US, and WestEurope to cover the team members in Europe. We can add SouthEastAsia in the future, if necessary.
See https://github.com/github/codespaces-precache#valid-sku-names. I switched from Originally I did this in order to speed up our build - the I believe when a dev creates their codespace machine, they need to pick the same size as what is listed here in order to get the pre-built. I will test this out today to verify. Looking around - Rails is using 16-core There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eerhardt that makes sense. Do we know how this impacts billing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know who gets the bill. @danmoseley ? It will definitely make the bill go up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know who gets the bill (the dotnet org is part of the DNF enterprise account, so they are being billed). What I don't know is how your changes impact billing. Like, did we just make it 4x as expensive? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eerhardt I tried a few difference sizes and settled on 8-core. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to note what Eric pointed out above -- if a dev picks up a pre-built, and then just iterates on a small part of the tree and running tests, they may not need such a beefy machine. @vcsjones I'm guessing you were building the whole tree. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, but I often end up doing a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @terrajobst the cost is doubled per hour: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I tried this. The developer does in fact need to pick the same size machine as we pick here. I created a new |
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know which countries
WestEurope
include. One of the mono developers lives in Romania. Don't know that counts as WestEurope or EastEurope. What about Czech Republic (Prague)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the
.sh
script that runs during the pre-build process:runtime/.devcontainer/scripts/onCreateCommand.sh
Line 6 in 69270ff
You can edit this script to build whatever we need.
See #60900 (comment) for the available regions.