-
-
Notifications
You must be signed in to change notification settings - Fork 877
Switch to github actions #1581
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
Switch to github actions #1581
Conversation
@drdaz can you look at why ParseUI isn't building? My guess is it has something to do with this warning https://github.com/parse-community/Parse-SDK-iOS-OSX/runs/1566382143?check_suite_focus=true#step:5:762 as the previous travis build didn't show it. All of the other builds seem to be fine. Also, ParseUI doesn't give an issue during the "release" build. |
@TomWFox can you remove travis from branch protections and replace them with actions? This build is working the same as it was before with a couple of random failures that were already present. The only different issue is the ParseUI one I mentioned earlier. |
The circleci:ios and circleci:macos can be removed also |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just realized that Parse UI is still failing, but it seems to be something trivial?
⚠️ /Users/runner/work/Parse-SDK-iOS-OSX/Parse-SDK-iOS-OSX/ParseUI/Classes/SignUpViewController/PFSignUpView.m:216:9: Value stored to 'currentY' is never read
currentY = CGRectGetMaxY(frame);
I'll take a longer look at it this afternoon... but I think it's possible the failure relates to the FBSDK update. The script that fails grabs the latest FBSDK binary, rather than a specific version. And since I think #1580 fixes some breaking changes with the naming of the packages, this smells of smoke. As to why the previous travis build didn't fail here... perhaps the last build was long enough ago that it was before the breaking changes? I'll check it out. |
The build script was using a dead URL. Let's see if this helps. |
Is it possible to make the script download the older FBSDK that we know worked? Your previous comment about Travis being built with an older version sounds like a logical explanation to why this one may be failing |
I thought so too 😃. But my idea seems to have been based on an incorrect assumption that the names of the packages were changed. Now that I've downloaded the newest, I can see that isn't the case. It would be nice if the script returned something more useful that 'failed'... but I'm not sure if we can get better granularity in this output? Can you reproduce the issue locally? I'll grab a copy of Xcode 11 and see if I can. |
Previously, I haven’t been able to get tests to run locally for this repo, I was always depending on the CI, but I will try again. |
I believe |
Make sure added features have some minimum amount of tests.
…ingDataFromExtensionsSandbox and testMigratingDataFromMainSandbox
@drdaz I suspect most of the random test failures in iOS/macOS are related to threading issues with |
This one is ready for review. Circle is having some issues reporting, but it passes here: https://app.circleci.com/pipelines/github/parse-community/Parse-SDK-iOS-OSX?branch=githubactions |
I think this looks awesome! Really happy to see the bulk of the build moved to Actions... so much nicer to work with :) Happy New Years and all that jazz 🎉
It would be so cool if they went away. I'm curious as to why you think waitForResult would act funny? Not doubting it, just interested in your reasoning. |
// Innaccessible bundle identifiers should throw | ||
XCTAssertThrows(configuration.applicationGroupIdentifier = @"someBundleIdentifier"); | ||
// This is nil is no path is set | ||
XCTAssertNil(configuration.applicationGroupIdentifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes what's being tested.
Following the call stack, it looks like we should throw here if we can't access the container corresponding to the application group ID. Maybe I'm rusty, but I can't see why the previous test would ever have thrown an exception? The call at the end of the stack NSFileManager containerURLForSecurityApplicationGroupIdentifier:
doesn't seem to throw?
EDIT: Ahh it was rust. PFParameterAssert should fire an exception when [PFFileManager isApplicationGroupContainerReachableForGroupIdentifier:applicationGroupIdentifier]
returns false. I can't see what could cause the old test to fail (even though it did).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess here was something changed in Objective-C between versions of Xcode. I think this because I tested on Xcode 11 and 12 and checked the debugger. I've seen somethings switch to nil
and this was one of them. If you run this test in Xcode 11 it will fail. Thinking forward, I switched to the Xcode 12 way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what could have been changed to nil, but this change leaves the logic in setApplicationGroupIdentifier:
untested:
- (void)setApplicationGroupIdentifier:(NSString *)applicationGroupIdentifier {
PFParameterAssert(applicationGroupIdentifier == nil ||
[PFFileManager isApplicationGroupContainerReachableForGroupIdentifier:applicationGroupIdentifier],
@"ApplicationGroupContainer is unreachable. Please double check your Xcode project settings.");
_applicationGroupIdentifier = [applicationGroupIdentifier copy];
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. The issue is in Xcode 12, it's letting this be set and isn't throwing. The change I added only tests if the default is nil.
We need to find out why it isn't throwing anymore and allowing applicationGroupIdentifier
to be set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was meant to test ParseClientConfiguration.setApplicationGroupIdentifier
and not setting directly. Only this is suppose to use something equivalent to willSet
in Swift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that confused me a little here was actually which Xcode version Actions is using. I see macos-latest in the yml, but the release build passes. And release currently fails in Xcode 12 due to the conflicting architecture situation, unless there's something in this changeset that fixes it that I'm missing?
Personally I don't have an issue with letting that test failing test through, but I think the repo rules won't allow us to merge with that error.
EDIT: Perhaps we can disable the test and create an issue / PR to fix it, so it doesn't disappear completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that confused me a little here was actually which Xcode version Actions is using. I see macos-latest in the yml, but the release build passes. And release currently fails in Xcode 12 due to the conflicting architecture situation, unless there's something in this changeset that fixes it that I'm missing?
Every build is using Xcode 12 latest (default), Release is using 11 because of what you mentioned:
Parse-SDK-iOS-OSX/.github/workflows/ci.yml
Lines 162 to 163 in b9bd19a
env: | |
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }} |
EDIT: Perhaps we can disable the test and create an issue / PR to fix it, so it doesn't disappear completely.
I agree with this process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yes! I missed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shot in the dark, but this might be as simple as a group entitlement issue, https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Especially since the way entitlements are used is something that's always changing
I thought this at the time because switching an async (that didn't need to be an async) to a sync resolved an issue. After more observation, I have an improved guess... The resources allocated by GitHub Actions or any of the other environments vary. The async tests are timed and sometimes our tests are running with lower allocation, hitting the time limits of |
Unrelated to this PR, but this is something that's long bothered me about this repo. We don't officially use Carthage as a dependency manager for development, but our code references dependency code in the Carthage checkout folder. Which happens to also contain our git submodules. It smells funny to me. I've never properly used Carthage for dependencies in a project, so I'm not sure if this is just 'how you do'. |
Looking at waitForResult, I can't see that it has an explicit time limit right now:
Where are you finding the time limit? |
This is what I meant Parse-SDK-iOS-OSX/Parse/Tests/Other/TestCases/TestCase/PFTestCase.m Lines 108 to 110 in 5dad4f2
Twitter and Facebook Utils have their own |
I'm starting to believe even more that when the tests fail it's a timeout/resource issue. If you look at the tests that pass (I'm referring to iOS, but I believe it's the same for the others), they finish ~6 minutes in Actions. The tests that fail are ~10 minutes. We can tell this is not the tests getting stuck and increasing the times by looking at the time difference of "Submodules and Bundle Install" in Actions between passing and failing tests. Failing tests have a significantly larger time before the tests even begin. Leading me to believe that particular run has less resources that may be causing the tests to fail. This would make sense out of the tests not failing on our local machines. I have no proof this is the case... |
Yeah I see what you mean. The last failure in testMigratingDataFromMainSandbox (one of the 'regulars') is a crash though. There's also an ominous comment at the top of the file:
I suspect there could be multiple sources of test jank 😃🎉 |
Uh oh!
There was an error while loading. Please reload this page.