-
Notifications
You must be signed in to change notification settings - Fork 4.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
Make continuous integration artifacts always have full debuginfo #73240
Make continuous integration artifacts always have full debuginfo #73240
Conversation
Cataclysm Windows build / Build (pull_request) Failing after 29m - I do not think I touched that part of the build infrastructure in this pull request. |
I think binaries with full debug symbols often reach several GB in size. Does github place a limit on the total size of uploaded artifacts? |
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have disabled a test that fails too often to (hopefully) get continuous integration to run every build.
The only binary that matrix.yml uploads is cata_test - it is significantly smaller than the game binary (e.g. 564 MB with full debuginfo). I have created a benchmark to calculate artifact sizes for every build in the matrix - see #73254. Let's wait for the results. |
|
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have: * Enabled continuous integration for draft pull requests * Disabled "fail fast" in the build matrix * Enabled artifact upload even if tests pass
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have: * Enabled continuous integration for draft pull requests * Disabled "fail fast" in the build matrix * Enabled artifact upload even if tests pass
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have: * Enabled continuous integration for draft pull requests * Disabled "fail fast" in the build matrix * Enabled artifact upload even if tests pass * Skip the tests - just upload the artifact - I only want to know its size * Use matrix title as artifact name to prevent collisions
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have: * Enabled continuous integration for draft pull requests * Disabled "fail fast" in the build matrix * Enabled artifact upload even if tests pass * Skip the tests - just upload the artifact - I only want to know its size * Use matrix title as artifact name to prevent collisions
This is a benchmark to determine the size of artifacts produced by continuous integration when enabling full debug info. See CleverRaven#73240 Note: for the purposes of this benchmark I have: * Enabled continuous integration for draft pull requests * Disabled "fail fast" in the build matrix * Enabled artifact upload even if tests pass * Skip the tests - just upload the artifact - I only want to know its size * Use matrix title as artifact name to prevent collisions
Here is some data on the compressed size of the artifacts:
I still can't find any official documentation on what the limit on artifact storage is. There does appear to be a limit (or perhaps there was earlier) |
I remember the unit test binary reaching several GB in size in my local build using MinGW-w64, but I do not have the binary to check at the moment. In any case, 300-700 MB is still large enough that we should probably care about the size limit. The issue actions/upload-artifact#9 you mentioned suggests that there is a way to configure automatical removal of old artifacts, so we can probably try that, but the size increase may still result in fewer artifacts being retained. |
This says that individual files with a size larger than 50MB will receive a warning from github. I get that artifacts are different than hosted code files and this may be outdated information but it was the first thing I found when searching. |
This appears to only refer to files that are checked into a git repo - not build artifacts or releases. |
@Qrox What artifact retention period do you think would be sufficient? Note: default apparently depends on repository settings and I have no way to see that |
If we only care about testing the binary while a PR is still open, a period larger than a few days might be sufficient. However, there are ~100 general matrix builds in the past 24 hours according to the github action log, which if all fail and upload one artifact per build at 500 MB, will require 250 GB of space in a 5-day period. If the suggestion in actions/upload-artifact#9 that the repo size limit applies to artifacts is true, 250 GB is probably still too high. |
Assuming I understand the result of the following API query correctly we are likely currently storing over 600GB of cata_test artifacts. Note: this estimate does assume that the average size of the last 30 with the name "cata_test" is representative of all 7754 such artifacts. # Prints 623725812165.0667
curl --silent \
-L \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/CleverRaven/Cataclysm-DDA/actions/artifacts?name=cata_test \
| jq '.total_count * ( [.artifacts[].size_in_bytes] | add / length )' The default artifact retention period appears to be 90 days: # Prints 89.92314814814814
curl --silent \
-L \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/CleverRaven/Cataclysm-DDA/actions/artifacts?name=cata_test \
| jq '.artifacts[0] | (.expires_at | fromdateiso8601) - (.created_at | fromdateiso8601) | . / 60 / 60 / 24' |
Here is a calculation using more complete data (about 50% of currently stored cata_test artifacts). ~200 megabytes per artifact times 7754 is abut 1550 gigabytes - by the revised estimate we are currently storing 1.5 terabytes of cata_test artifacts.
|
Using REST API with authentication I was able to obtain the exact number of bytes consumed by all our cata_test artifacts not counting any other artifacts ~1.65 terabytes:
|
@Qrox I think github will thank us if we cut the usage down to 250 GB by using shorter expiration times. What do you think? Did I misinterpret something? |
The binaries with debug info is ~10 times larger than normal binaries, so we can keep the total size unchanged by reducing the expiration time to around 9 days. That does not leave much room for further reduction though. Do we currently upload the binaries compressed? I recall that the debug info is uncompressed by default, or it is in my local build at least, so we can probably make the binaries smaller using compression. |
@Qrox The artifacts are already stored as compressed zip archives
|
I have reduced the artifact retention period from 90 days to 9 as suggested |
Summary
None
Purpose of change
Describe the solution
Additional context
Note: this is me coming back to #70701 with a fresh perspective