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

Use GitHub buildcache #8052 #9055

Merged
merged 30 commits into from Dec 15, 2021
Merged

Use GitHub buildcache #8052 #9055

merged 30 commits into from Dec 15, 2021

Conversation

a-25
Copy link
Contributor

@a-25 a-25 commented Dec 6, 2021

Used github buildcache plugin, #8052

a-25 added 28 commits Dec 5, 2021
@google-cla google-cla bot added the cla: yes label Dec 6, 2021
@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 6, 2021

@a-25 Thanks for the tackling this potential CI improvement. A good next step would be to demonstrate the performance improvement of using the buildcache plugin. That might be easier to do in your forked repo and then provide links that show the advantage of the cache.

@a-25
Copy link
Contributor Author

@a-25 a-25 commented Dec 7, 2021

@paulb777: Hello. I made some measurements, they are below. Used only core.yml file for instance.

We are interested in "iOS Unit Tests" and "Post Run mikehardy/buildcache-action@v1" sections.

As I see, the cache at least doesn't slow the process down. And building with cache gives about 40% increase.
I think the more accurate statistics should be collected later, after using. But as I see most files will remain unchanged (because one PR is usually devoted to only one project while others stay the same).
Also I tried to use separate caches for different OS to reduce cache rebuilding.

@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 7, 2021

Thanks @a-25 . The 40% improvement is great!

For security concerns, we're not comfortable depending on a third-party action specified with a tag. Would you update to a commit hash? See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions and https://michaelheap.com/improve-your-github-actions-security/

@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 10, 2021

@a-25 Let me know if you want to continue this. Otherwise I can pick it up in the next week or two.

@paulb777 paulb777 self-assigned this Dec 10, 2021
@a-25
Copy link
Contributor Author

@a-25 a-25 commented Dec 11, 2021

@paulb777: Hello. Yes, I'm going to finish this one soon. Was busy lately.

@a-25
Copy link
Contributor Author

@a-25 a-25 commented Dec 11, 2021

@paulb777: updated the hash, waiting for the checks to prove everything is working.

@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 13, 2021

@a-25 Thanks. Sorry for the delay in unblocking the CI. It looks like something about the change is causing the jobs to be cancelled before even starting.

@a-25
Copy link
Contributor Author

@a-25 a-25 commented Dec 14, 2021

@paulb777: hello.
This looks strange, I tested this configuration in my repository, and it's working fine: https://github.com/a-25/firebase-ios-sdk/runs/4520127644?check_suite_focus=true
Reverted buildcache-action to previous stable version - let's see if it helps.
The other option that I see - I can update version to current master commit and test. It is risky because it was not released so far but there would be the newest action version.

@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 14, 2021

Hi @a-25. Thanks for continuing to work through this.

It looks like the build is fixed now. I compared a few times and seeing the jobs in this PR slower than usual. Is that because this is the first run to seed the cache - and the next run will be faster?

@a-25
Copy link
Contributor Author

@a-25 a-25 commented Dec 14, 2021

@paulb777: I think yes.

I compared two jobs:
Without cache - https://github.com/firebase/firebase-ios-sdk/runs/4516567370?check_suite_focus=true
With cache - https://github.com/firebase/firebase-ios-sdk/runs/4521400838?check_suite_focus=true
Slowing is about 15% as I see. And the last job had almost no cache hits.

Maybe you could replay the last job to compare the results for the second time? Or you can merge this PR and see if it helps on the longer prospective. If not - it will be easy to revert it, I guess, because there are just additions, not code changes.

@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 14, 2021

@a-25 Good point about merging and giving it a try for a few days and reverting if we don't see a real improvement. Let's get one more approval and then we can merge.

.github/workflows/abtesting.yml Show resolved Hide resolved
@paulb777
Copy link
Member

@paulb777 paulb777 commented Dec 15, 2021

Thanks for the contribution @a-25! We'll merge this now and keep and eye on our CI times.

@paulb777 paulb777 merged commit ea6bf3a into firebase:master Dec 15, 2021
244 checks passed
granluo added a commit that referenced this issue Dec 29, 2021
@paulb777
Copy link
Member

@paulb777 paulb777 commented Jan 13, 2022

Hey @a-25 I'm working on Google Open Source Peer Bonus nominations and would like to recognize your contributions on this PR and others. I couldn't find a name or email address for you, so if you're interested, please email them to paulbeusterien at google.com and I'll make the nomination.

@firebase firebase locked and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants