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

Feature: Write build caches to S3 #461

Closed
2 tasks done
ewilkins-csi opened this issue Nov 8, 2024 · 2 comments · Fixed by #462
Closed
2 tasks done

Feature: Write build caches to S3 #461

ewilkins-csi opened this issue Nov 8, 2024 · 2 comments · Fixed by #462
Assignees
Labels
enhancement New feature or request slacktask Small ticket done in down time
Milestone

Comments

@ewilkins-csi
Copy link
Contributor

ewilkins-csi commented Nov 8, 2024

Description

In #429 we started saving the Docker build cache during the build workflow. We discussed that the size of the Docker cache may end up causing issues and it has. Because it's ~9GB, the docker cache will often cause all other caches to be purged and, at least once, has failed to save seemingly due to its size. In addition, it takes about 9.75 mins to save the cache to GH caches. We should go ahead and implement the Runs-On S3 fast cache action to get around these issues.

DOD

  • The build workflow authenticates with AWS and writes caches to S3
  • The S3 bucket is configured to delete objects a day after their creation
    • We could instead use the AWS authentication to delete the caches during the build itself, but that requires more permissions on S3 and is less straight-forward to implement

Test Strategy/Script

  1. View the latest build and verify the cache actions are from the runs-on/cache action
  2. Confirm the caches saved to AWS are < 1 day old
@ewilkins-csi ewilkins-csi added the enhancement New feature or request label Nov 8, 2024
@ewilkins-csi ewilkins-csi self-assigned this Nov 8, 2024
@ewilkins-csi ewilkins-csi added the slacktask Small ticket done in down time label Nov 8, 2024
@ewilkins-csi ewilkins-csi added this to the 1.10.0 milestone Nov 8, 2024
@ewilkins-csi
Copy link
Contributor Author

DoD/OTS with @csun-cpointe and @carter-cundiff

ewilkins-csi added a commit that referenced this issue Nov 8, 2024
Also sets our docker container builder to use the fully-qualified name
for the moby/build-kit image to workaround the Docker authentication
issue noted in #331.

Future improvements:
 - Update our GH ARC runner set to automatically auth with S3 instead of
   using access keys that have to be rotated manually
ewilkins-csi added a commit that referenced this issue Nov 8, 2024
[#461] use runs-on/cache to write GH caches to S3
@csun-cpointe
Copy link
Contributor

Test passed!
Confirm the caches saved to AWS are < 1 day old
Screenshot 2024-11-08 at 11 44 28 AM
Screenshot 2024-11-08 at 11 44 06 AM
Screenshot 2024-11-08 at 11 43 45 AM
Screenshot 2024-11-08 at 11 43 33 AM
Screenshot 2024-11-08 at 11 40 40 AM

View the latest build and verify the cache actions are from the runs-on/cache action
Screenshot 2024-11-08 at 11 38 33 AM
Screenshot 2024-11-08 at 11 37 43 AM
Screenshot 2024-11-08 at 11 37 32 AM
Screenshot 2024-11-08 at 11 37 00 AM
Screenshot 2024-11-08 at 11 36 53 AM

@ewilkins-csi ewilkins-csi linked a pull request Nov 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request slacktask Small ticket done in down time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants