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

Working drop of Segmentation SDK along with test app and unit tests. #4574

Merged
merged 19 commits into from
Jan 21, 2020

Conversation

dmandar
Copy link
Contributor

@dmandar dmandar commented Jan 2, 2020

No description provided.

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. A few nits and one issue with managing plist files for integration tests.

Please get an approval from at least one of @maksymmalyhin or @ryanwilson

FirebaseSegmentation/Sources/Public/FIRSegmentation.h Outdated Show resolved Hide resolved
FirebaseSegmentation/Sources/SEGSegmentationConstants.h Outdated Show resolved Hide resolved
FirebaseSegmentation/Tests/Sample/Podfile Outdated Show resolved Hide resolved
FirebaseSegmentation/Tests/Sample/Podfile Outdated Show resolved Hide resolved
@dmandar
Copy link
Contributor Author

dmandar commented Jan 13, 2020

Ping. Ok to merge? This does not go into master yet.

@ryanwilson
Copy link
Member

Ping. Ok to merge? This does not go into master yet.

I'll be able to take a look tomorrow at this, sorry for the delay.

@maksymmalyhin
Copy link
Contributor

@dmandar Sorry didn't have chance to do a detailed review. I'm fine with merging it if it is a blocker for you and I can review it later if it is OK for you.

Copy link
Member

@ryanwilson ryanwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments throughout - I haven't reviewed 2-3 files yet (I added a comment at the top for myself to come back to them) but thought I'd share the comments so far. Thanks!

FirebaseSegmentation/Sources/SEGContentManager.h Outdated Show resolved Hide resolved
@@ -70,7 +71,10 @@ - (instancetype)initWithApp:(FIRApp *)app {
self = [super init];
if (self) {
_app = app;
_segmentationInstance = nil;
if (!_segmentationInstance) {
_segmentationInstance = [[FIRSegmentation alloc] initWithAppName:app.name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe a situation where _segmentationInstance would be non-nil when initWithApp: is called? I'm not sure I can think of a case when that's true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not typical. Unless initWithApp is called twice tomorrow from elsewhere.

FirebaseSegmentation/Sources/Public/FIRSegmentation.h Outdated Show resolved Hide resolved
@@ -28,6 +28,17 @@ NS_ASSUME_NONNULL_BEGIN
NS_SWIFT_NAME(Segmentation)
@interface FIRSegmentation : NSObject

/// Firebase Remote Config service fetch error.
typedef NS_ENUM(NSInteger, FIRSegmentationErrorCode) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has not gone through API review - please add it to the API doc or create a new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL in the API review (commented)

@@ -0,0 +1,223 @@
// Copyright 2019 Google
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Haven't reviewed this file yet

FirebaseSegmentation/Sources/SEGNetworkManager.h Outdated Show resolved Hide resolved
@@ -0,0 +1,100 @@
// Copyright 2019 Google
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Haven't reviewed this file yet

@@ -0,0 +1,419 @@
// Copyright 2019 Google
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Haven't reviewed this file yet

Copy link
Contributor

@maksymmalyhin maksymmalyhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a couple suggestions for tests but didn't do a full review deferring it to @ryanwilson

FirebaseSegmentation/Tests/Unit/SEGContentManagerTests.m Outdated Show resolved Hide resolved
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the
// class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to XCTests implementation details it is highly recommended to tear down all mocks and assign to nil all instance variable in this method to avoid memory leaks an interference between the test methods which can lead to flakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

associateCustomInstallationIdentiferNamed:@"my-custom-id"
firebaseApp:@"my-firebase-app-id"
completion:^(BOOL success, NSDictionary *result) {
XCTAssertTrue(success,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the tests will be extended to test result content, ect. in the following PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Added todo.


- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the
// class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as for SEGContentManagerTests - tear down mocks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@ryanwilson ryanwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to unblock merging - will give the rest of the files a full review on a merge into master.

@dmandar dmandar merged commit 08ff0ec into md-floc-master Jan 21, 2020
@firebase firebase locked and limited conversation to collaborators Feb 21, 2020
@paulb777 paulb777 deleted the md-floc-3 branch July 9, 2020 00:00
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

5 participants