Skip to content

Conversation

dacozai
Copy link
Contributor

@dacozai dacozai commented Oct 24, 2024

fix #1730

Copy link

google-cla bot commented Oct 24, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.46%. Comparing base (a407be2) to head (99d44ce).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1978   +/-   ##
=======================================
  Coverage   89.46%   89.46%           
=======================================
  Files          16       16           
  Lines        5838     5838           
=======================================
  Hits         5223     5223           
  Misses        615      615           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshlf
Copy link
Member

joshlf commented Oct 24, 2024

Thanks for this! Is this redundant with .github/actions/cache, which is also called from generate_cache? That was added in #835. I'll be honest that I'm not sure whether we need both the generate_cache job and the .github/actions/cache action - I'm a little rusty on the semantics of GitHub Actions in this case.

@dacozai
Copy link
Contributor Author

dacozai commented Oct 24, 2024

Thanks for this! Is this redundant with .github/actions/cache, which is also called from generate_cache? That was added in #835. I'll be honest that I'm not sure whether we need both the generate_cache job and the .github/actions/cache action - I'm a little rusty on the semantics of GitHub Actions in this case.

No, you are RIGHT!!! I should use that composite.
There are two modifications here

  1. Fetch the output from the steps. Accessing the output directly is not straightforward, but I understand the purpose of this extra layer of delegation—it ensures that the output remains consistent in the composite, regardless of the action packages used or the varying output names.
  2. I added restore-key to the composite step. This allows for a broader cache key range. See if this one is helpful?!

@dacozai dacozai marked this pull request as ready for review October 24, 2024 23:01
@joshlf
Copy link
Member

joshlf commented Oct 25, 2024

Okay, that makes sense! And indeed, this seems to have considerably sped up CI:

Screenshot

Compare to this run for #1981:

Screenshot

@joshlf joshlf enabled auto-merge October 25, 2024 19:49
@joshlf joshlf added this pull request to the merge queue Oct 25, 2024
Merged via the queue into google:main with commit 31c90a3 Oct 25, 2024
69 checks passed
google-pr-creation-bot pushed a commit to google-pr-creation-bot/zerocopy that referenced this pull request Feb 25, 2025
* [ci] fix, showing cache hit, re-install dependencies

* [ci] fix ci workflow to check the cache-hit output and add restore-key for wider cache range
github-merge-queue bot pushed a commit that referenced this pull request Feb 25, 2025
* [ci] fix, showing cache hit, re-install dependencies

* [ci] fix ci workflow to check the cache-hit output and add restore-key for wider cache range

Co-authored-by: Eden <eden.chen@bath.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Generate cache" CI step executes even when it has no effect
3 participants