-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Functions Interop #2113
Functions Interop #2113
Conversation
Convert Firebase Functions to use the Auth Interop pod
I also removed a doubly-defined `FRAMEWORK_SEARCH_PATHS`
I also cleaned up some more project settings
I now have Travis passing all the tests on this PR. Please have a look. |
Looks like there's a Travis issue: https://travis-ci.org/firebase/firebase-ios-sdk/jobs/460759039#L7046 |
Yeah, seems I removed too much of my previous PR. I'm not 100% which path included the container header, but I'll fiddle with it and look at where CocoaPods puts everything. |
I also attempted moving the FakeApp class to the test targets and further simplified the project file.
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 still not sure why this project would have difficulty finding the headers when the main Example one doesn't.
I also moved the Podfile pods to the app target rather than the top-level
- Remove `FUNFakeApp` from app target + Add `FUNFakeApp` to test targets + Add `$(inherited)` to `HEADER_SEARCH_PATH` as per CocoaPods warning + Add `$(SRCROOT)/../../Firebase/Core/Private` to find `FIRComponentContainerInternal` header ~ Change import from frameworks import to regular import
This should ready to review again. I was able to get everything compiling and passing once I could iterate quickly with |
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.
LGTM, please get Ryan's LGTM also.
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.
LGTM, just two small nits for cleanup!
Hi Bryan, could you have a look at this CL which moves Functions to the new Interop platform. |
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.
Thanks for doing this. Overall, it looks like a good change. But I was confused about what's happening in one of the tests, and I think we can simplify this to make it more obvious what's going on.
FIRFunctions *functions = [[FIRFunctions alloc] | ||
initWithApp:app | ||
region:@"my-region" | ||
auth:[[FIRAuthInteropFake alloc] initWithToken:nil userID:nil error:nil]]; |
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 don't understand why this passes. Shouldn't functions be using the FIRAuthInteropFake
's token instead of the one passed into the FUNFakeApp
?
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 also unsure how this was passing.
It looks like callFunction
would have an empty Authorization header, but maybe the mock server still returns an empty data response with a 200 OK?
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.
Actually, I bet it wasn't passing. Travis doesn't run the integration tests on PRs, just the master branch. I'll run them locally to make sure they're passing now.
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 having difficulty running the integration tests. I get many warnings when running Backend/start.sh
instructions. See this gist of the output I get.
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 changed my system to node 8, and ran through the suggestions it printed out, and it seems as though it's connecting to the emulator, but I'm not sure it's behaving as expected.
For example, the testData
test case gets the error: Function dataTest in location my-region in project functions-integration-test does not exist
in its FIRHTTPSCallableResult
callback.
From the emulator's output, it looks like my-region
isn't what's expected, but rather us-central1
since it outputs http://localhost:5005/functions-integration-test/us-central1/dataTest
as the resource.
Switching the tests to using us-central1
as the region has all the tests but one passing. The testNull
attempts to wait on an expectation twice, which is an API violation that throws an error.
Are the integration tests expected to pass? I'm not sure how they would on master without the region change and the duplicate waitForExpectation:
call.
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.
It appears as though the last green run of master compiled the integration tests, but only ran the unit tests.
It seems as though the integration tests aren't being run on Travis.
I'll open an internal bug to fix and enable theses.
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.
From the emulator's output, it looks like my-region isn't what's expected, but rather us-central1
Yes, the shell script in Backend/ that installs the functions says to install them in us-central1
. Not sure when that broke.
- Delete `FUNFakeApp` + Add `FIRAuthInteropFake` to test targets ~ Update initializer to use projectID instead of app
* Set the region to the expected value * Update node package.json to latest versions
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.
Thanks for taking the time to get the integration tests passing again.
* master: (26 commits) Functions Interop (#2113) Add a travis cron job for CocoaPod symbol collision testing (#2154) Save schema version on downgrade, add test to verify (#2153) Silence Storage Unit Test `nil` warning. (#2150) Update versions for Release 5.14.0 (#2145) gRPC: fix cases where gRPC call could be finished twice (#2146) Fix Swizzler test warnings (#2144) Update Auth CHANGELOG.md (#2128) Make fuzz tests optional until they pass (#2143) Add support of Game Center sign in (#2127) Add test for deprecated FDLURLComponents init API. (#2133) fix a typo in integration test (#2131) Make fuzzing less verbose to avoid exceeding Travis log limit (#2126) Move to `domainURIPrefix` for FIRDynamicLinkComponents (#2119) Carthage instructions for new gRPCCertificates.bundle location (#2132) Fix pod lib lint GoogleUtilities.podspec --use-libraries regression (#2130) Avoid using default FIROptions directly. (#2124) Changelog entry for LRU GC (#2122) Revert "Add Firebase Source to Header Search Path" (#2123) Custom fdl domain (#2121) ...
Convert Firebase Functions to use the Auth Interop pod