-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
iOS 15: Change Buildkite image to Xcode 13 #17233
iOS 15: Change Buildkite image to Xcode 13 #17233
Conversation
You can trigger an installable build for these changes by visiting CircleCI here. |
@mokagio I thought just changing the image to Could you please help me with this? Also, I'm not sure if any change should be made to CircleCI too. |
@leandroalonso hey there 👋 We are working on the Xcode 13 support on Buildkite, but it's not there yet 😞 |
I pushed a commit to do that. Let's see how it goes 🤞 |
Prior to this change, we were using `2.6.6` but that version is no longer available in the Xcode 13 image. See error message here: https://app.circleci.com/pipelines/github/wordpress-mobile/WordPress-iOS/24560/workflows/74788ee1-f42e-4876-96c6-4e75e74016d4/jobs/57379
@leandroalonso getting CI failures due to this
It's progress, I guess... at least the 13.0 image loaded fine on CircleCI 😄 |
This is a legit issue and I'm not sure how to fix it easily. We're trying to override a non My recommendation for this kind of things is not to subclass a framework type ( |
Nvm, just saw that this is on the tests, shame on me. I'll look into it. |
@Gio2018 I looked at the failing build and it seems that |
I might have more (mock)context 🤣 I'll take a look |
… unit tests, to address build issues on Xcode 13
Looks like the most sustainable thing to do at this moment is to just remove that |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Thank you @Gio2018. The need for CoreData improvements is on @wordpress-mobile/owl-team radar, too. It might be a good occasion to work on it. CI is still red, but now the error is in the tests run. That is, your fix successfully sorted out the build issue. Thanks 🙌 |
@mokagio is this related to fastlane and/or the new image? Shall we tackle this on this PR or open a new one? |
@leandroalonso I am not sure yet. The tests run successfully on my machine via Xcode, which seems to point out the issue has to do with CircleCI. I updated the device and iOS version CI uses to be iPhone 12 and iOS 15.0, which work on my end. The type of failure we're getting seems to point out to the device crashing rather than some test failing:
Notice the "operation never finished bootstrapping". I am now running the tests locally via Fastlane, like CI does. I'll keep you posted. Another thing that would be useful to diagnose this problem is running Xcode 13 on Buildkite. Unfortunately the image is not ready yet. But it should be shortly. |
I did this to see if it solved the issues we are experiencing with Xcode 13 testing, but that didn't help.
Good news: running the Bad news: I'm not sure how to fix it yet 😓 I also tried to update Fastlane, but that didn't help. Here's a stacktraces I got locally:
I seems like the error is:
I don't think the issue is with
cc @jkmassel @AliSoftware for input. |
@mokagio I spent a few hours on that and no success yet. A few things: First, I tried running the commands on Xcode 13.1, same issue. :( Secondly, there is an issue reported on the OCMock library that is similar to what we're seeing (although not equal). In our case, tests on Xcode always succeed (at least on my tests) while they always fail on the command line. |
I managed to fix the execution of the tests! 🥳 This is kinda crazy and it's a mix of Xcode 13 + fastlane + naming + dependencies (phew!). tl;dr:The
These are not tests. It has been there since... always? But this is what was causing issues running unit tests on the command line with the Xcode 13. I submitted a change on the Fastfile to remove those. Long storyI did a bunch of debugging and I was able to see that I was still getting crashes related to ContextManagerMock, HTTPStubsDescriptor, OCMLocation, and TestContextManager even if I just wanted to run a single simple unit test. Then I started to debug the produced
These are not unit tests! However, they've been there for a while (I checked some old build logs on CircleCI). Anyway, I removed them to see what happened and... the tests worked again! I have no idea how this caused the unrecognized selector sent to class that we've been seeing. Perhaps something might have changed for Xcode 13. Researching a little bit more I discovered that To have an elegant solution, we can look at ways to refactor some of those entities to get rid of everything that starts with So far that's all. Let me know if any of you would like any more info or clarification! |
@mokagio I think the PR is good to go. If we decide to go ahead with the change on |
Excellent research work @leandroalonso! You actually made me discover something I didn't know about our configuration: we don't use Fastlane's native Turns out we are not the only folks experiencing this issue: lyndsey-ferguson/fastlane-plugin-test_center#358. The workaround suggested there is quite similar to yours! I think it's okay to ship with your fix and to block out some time soon to work on it soon. |
I started investigating dropping Also, Xcode 13 includes a new native retry mechanisms with the Test Repetition option which we might be able to use directly. |
This PR changes the Buildkit image to use Xcode 13. This should allow the build to stop failing.
Notice that this change is targeting a feature branch, not
develop
.To test:
Regression Notes
Potential unintended areas of impact
n/a
What I did to test those areas of impact (or what existing automated tests I relied on)
n/a
What automated tests I added (or what prevented me from doing so)
n/a
PR submission checklist:
RELEASE-NOTES.txt
if necessary.