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

[SDK-2329] Added apiUrl check in BranchJSONConfig #1183

Merged
merged 11 commits into from
Apr 1, 2024
Merged

Conversation

nsingh-branch
Copy link
Contributor

@nsingh-branch nsingh-branch commented Mar 28, 2024

Reference

SDK-2329 -- Support setting Branch API URL in Branch.json

Description

Added a new field to branch.json for setting the Branch API URL. The config check and setAPIUrl call are done in the getAutoInstance in the same place as the deferInitForPluginRuntime() check.
One quirk is that all of the base URL's are stored with a "/" at the end, so we need to add that to the provided URL when making the setAPIUrl call. We don't want to have a URL ending with a "/" in the branch.json itself though since on iOS, the base URLs are stored without the "/".

Testing Instructions

Add "apiUrl": "https://api.branch.io" to a branch.json file and observe the API URL properly change for each request.

Risk Assessment [LOW]

  • I, the PR creator, have tested — integration, unit, or otherwise — this code.

Reviewer Checklist (To be checked off by the reviewer only)

  • JIRA Ticket is referenced in PR title.
  • Correctness & Style
    • Conforms to AOSP Style Guides
    • Mission critical pieces are documented in code and out of code as needed.
  • Unit Tests reviewed and test issue sufficiently.
  • Functionality was reviewed in QA independently by another engineer on the team.

cc @BranchMetrics/saas-sdk-devs for visibility.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 40.90909% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 38.28%. Comparing base (83cf93a) to head (c56248f).
Report is 2 commits behind head on master.

Files Patch % Lines
...main/java/io/branch/referral/BranchJsonConfig.java 20.00% 7 Missing and 1 partial ⚠️
...h-SDK/src/main/java/io/branch/referral/Branch.java 37.50% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1183      +/-   ##
============================================
+ Coverage     38.24%   38.28%   +0.03%     
- Complexity      687      690       +3     
============================================
  Files            59       59              
  Lines          6309     6327      +18     
  Branches        944      946       +2     
============================================
+ Hits           2413     2422       +9     
- Misses         3448     3455       +7     
- Partials        448      450       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nsingh-branch nsingh-branch merged commit e9bea73 into master Apr 1, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants