-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2023-01-09] [Tracking] Add performance CI tests #11711
Comments
cc @hannojg Can you please comment on this so I can assign it to you |
Yes 👋 |
@AndrewGable, @hannojg Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
PR in review |
PR was merged, however, we had a lot of testing to confirm a few questions:
|
After testing via this PR:
|
Problem: We are trying to configure cloud machines to run an emulator very quickly to run performance tests. However:
Solution: Skip running the tests on emulators on CI machines and run the tests on physical devices via AWS Device Farm. I'm still validating this idea is possible, but I've confirmed we can at least start the tests via AWS Device Farm. I think the real question will be if they are fast enough to get reliable results. Once we prove the POC, we can hook it up to |
Discussing in Slack with @hannojg - But I was unable to get the custom node http server working on the aws device farm machines. I think looking to see if Appium can support our tests might be the best next move since they are supported out of the box by AWS device farm. |
I've reached out to AWS Device Farm support via a support case, I have chatted with their support on the phone and provided code details. They are circling back internally and I will let you know when I hear back from them. |
My guess after trying hard yesterday to make our simple HTTP server impl working is that it would work with a "private device" for which we can setup a VPC https://docs.aws.amazon.com/devicefarm/latest/developerguide/amazon-vpc-endpoints.html. However, that might not be feasible as setup, I am currently migrating to appium. |
@hannojg and I are getting on a call with AWS device farm team today |
Update from our call with AWS Device farm:
|
We had our first successful run via AWS device farm for Android e2e tests 🎉 Now we just need to improve and tweak things.
|
Here is our working list:
I've done 1 & 2 on this branch/fork: https://github.com/AndrewGable/App/pull/1 I think the last part of this will be figuring out how to configure AWS to report back the results. I believe this can be done using the "artifacts" as mentioned here: https://github.com/realm/aws-devicefarm#download-artifacts |
Here is an example of a passing test run: https://github.com/AndrewGable/App/actions/runs/3382629912/jobs/5617747052 It took 45 minutes. I think we can definitely figure out how to get this working more efficiently, but we can focus on that after step 3 & 4 are done. |
@rafecolton enabled the large runners again for us, seeing how fast the tests are now 🚀 |
Large runner results:
Total time ~30 minutes vs ~45 minutes |
Nice improvement! |
I still worry this is too long to roll out in it's current iteration, our current tests run in under 5 minutes. I don't think we can expect to run these tests in that time, but I think we need to get them under a certain amount of time or increase their value. |
Totally. So what do you think that number is out of curiosity? 10? 15? Something else? |
If we are going to run it on every commit, I think ~10 minutes would be OK. I don't know if it's realistic we will ever be able to speed these tests up that much so I think we might have to do something "out of the box". One idea is we could run these tests on merge, then report the results back to the PR. If they introduce a performance regression then we could revert the PR, or something similar. Otherwise we could run these via a label, or only on large PRs, etc. I don't have an exact proposed solution yet, but curious for thoughts from @Expensify/mobile-deployers @marcaaron ? |
I would love to have the most coverage possible, so this is an ideal place to start. Given that time between merge and QA is most cases, the 10 min "delay" also feels OK. In any case, not the real decision maker in this department. 😄 |
Maybe a more refined proposal would be:
|
Sounds good @AndrewGable, but can we please make sure that, unlike these post-merge test and lint jobs we already have, the long-running tests do not block the deploy until they finish? i.e: assume that PRs do not introduce a performance regression, deploy them to staging, and then only if they do not pass post a comment and mark them as a deploy blocker |
End of week update: We have a workable solution here, but still talking with AWS to juice up the device farm side of things. |
I am attempting to split the e2e tests up from the rest of the source code to reduce the size of the ZIP we send to the Android phone via AWS. However, I have been blocked today by a broken Android build. |
I was able to squeeze some more performance improvements out of the test, total time is now ~23 minutes:
I will work on the final piece which is running this in the "Process new code merged to main" workflow. |
Chiming in late, but this seems reasonable to me. Another option could be to require the test in CI but manually trigger it with a comment like "I am ready for my performance test now". Maybe that is too manual 😂 |
Running into an issue with linting as described here: SchemaStore/schemastore#2579 |
Trying to finish this right now, next steps are:
|
PR finally in review 😮💨 |
Woo! P.S. I didn't cover this in the regular open source update today but was going to profile it in the margelo room tomorrow. |
Nice, confirmed these are now running on merge into |
These are running, there are some further separate improvements to make (e.g. adding more tests and mocking API responses), but I am going to consider this one done for now. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.46-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-01-09. 🎊 After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Open a pull request in NewDot.
Expected Result:
A suite of performance tests should run, so that we know before a PR is merged, if it creates a statistically significant performance regression.
Actual Result:
We don't have performance CI tests
Workaround:
Just don't break stuff™
Platform:
n/a
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: