Skip to content

Commit 2c253aa

Browse files
firebase-workflow-trigger[bot]jonsimantovtom-andersenAlmostMatta-maurice
authored
Automatic merge of main into feature_branch/ump-sdk - Aug 14, 2023 (#1425)
* iOS: Remove Analytics dependency from GMA integration test (#1386) * Try using CoreOnly instead of Analytics cocoapod for tests. * Update readme. * Add stub workflow for updating feature branches. * Add script to merge main into all active feature branches on a regular schedule. (#1394) * Add workflow for automatically updating feature branches weekly. * Corrected filename, and added inputs. * Remove trailing spaces. * Fix workflow. * Fix workflow name. * Fix syntax. * Fix syntax. * List remote branches instead. * Clean up script. * Untab. * Add branch list for debugging. * Untab. * Specify remote branches. * Skip second stage if no first. * Typo * Error. * List all branches. * Fix logic. * Fix spacing. * Fix output * Fix parameters. * Fix merge to use origin. * Remove debug echos. * Add git config. * Fix PR creation. * Fix PR creation. * Fix automatic push. * Increase retry. (#1402) * Add Firestore test history report (#1403) * Add --firestore flag to report Firestore history. * Add Firestore report to nightly cron job. * Remove multiline commands. * Revert "Remove multiline commands." This reverts commit 6393ae9. * Fix tabbing. * Fix packaging test detection for Firestore. * Revert "OR Query Implementation (#1335)" (#1399) This reverts commit 11332d4. * Wrap the real-time RemoteConfig test in flaky-block to automatically retry. (#1406) * Only use flaky_test on android * Update the iOS version used by FTL (#1408) * Kick off nightly packaging an hour earlier (#1409) * Fix crash on gma::Initialize without a Firebase App (#1320) Initialize Util before using Util::FIndClass. Also add an integration test for initializing gma without a firebase app. * build: pass along the CMake path (#1410) When building the subproject, we would invoke `cmake` directly, relying on the path lookup of the tool, which may or may not match the currently executing CMake. Use `CMAKE_COMMAND` which gives us the path to the current CMake executable ensuring that we use the same CMake for building the dependencies. * Add log to gsutil fetch. (#1411) * Update mobile dependencies - Thu Aug 03 2023 (#1413) * Update mobile dependencies - Thu Aug 03 2023 ### Android - com.google.firebase.firebase_bom → 32.2.2 ### iOS - Firebase/Analytics → 10.13.0 - Firebase/AppCheck → 10.13.0 - Firebase/Auth → 10.13.0 - Firebase/Core → 10.13.0 - Firebase/CoreOnly → 10.13.0 - Firebase/Crashlytics → 10.13.0 - Firebase/Database → 10.13.0 - Firebase/DynamicLinks → 10.13.0 - Firebase/Firestore → 10.13.0 - Firebase/Functions → 10.13.0 - Firebase/Installations → 10.13.0 - Firebase/Messaging → 10.13.0 - Firebase/RemoteConfig → 10.13.0 - Firebase/Storage → 10.13.0 - Google-Mobile-Ads-SDK → 10.9.0 > Created by [Update Android and iOS dependencies workflow](https://github.com/firebase/firebase-cpp-sdk/actions/runs/5755777170). * Ensure using a Swift bridging header that supports both arm64 and x86_64. * Add release note about i386 no longer being supported. * Remove armv7 as well. --------- Co-authored-by: firebase-workflow-trigger-bot <[email protected]> Co-authored-by: Jon Simantov <[email protected]> Co-authored-by: [email protected] <[email protected]> * feat(auth): Add emulator support (#1400) * add auth emulator support * fix ios number parse * update the documentation part * reduce lint warning * more lint warnings * code format * use environment to decide using emulator or not * fix a typo * add readme entry for FirebaseApp.GetApps() * update for review comment * add missing ` --------- Co-authored-by: Cynthia Jiang <[email protected]> * Update merge-to-main script (#1420) * Before creating the merge-main PR, branch it off main, so merge conflicts can be addressed in the branch rather than by committing to main. * Format. * Update release version number for M135, 11.4.0 (#1421) * feat(auth): enable emulator support on desktop (#1423) * add auth emulator support * fix ios number parse * update the documentation part * reduce lint warning * more lint warnings * code format * use environment to decide using emulator or not * fix a typo * add readme entry for FirebaseApp.GetApps() * update for review comment * add missing ` * make json request always do restrict json * add readme info * prepare for review * some minor tweak * code format * update review comments * update the unit test after request json change --------- Co-authored-by: Cynthia Jiang <[email protected]> * Internal Updates. (#1422) * Add logic to trim webp parameter from native image urls --------- Co-authored-by: Jon Simantov <[email protected]> Co-authored-by: Tom Andersen <[email protected]> Co-authored-by: Matthew Hyndman <[email protected]> Co-authored-by: a-maurice <[email protected]> Co-authored-by: Saleem Abdulrasool <[email protected]> Co-authored-by: firebase-workflow-trigger[bot] <80733318+firebase-workflow-trigger[bot]@users.noreply.github.com> Co-authored-by: firebase-workflow-trigger-bot <[email protected]> Co-authored-by: Cynthia J <[email protected]> Co-authored-by: Cynthia Jiang <[email protected]> Co-authored-by: nakirekommula <[email protected]>
1 parent 64369f4 commit 2c253aa

19 files changed

+86
-56
lines changed

.github/workflows/update-feature-branches.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ env:
1717
defaultBranchPattern: "feature_branch/*"
1818
defaultMainBranch: "main"
1919
triggerTestsLabel: "tests-requested: quick"
20+
branchPrefix: "workflow/auto-merge-feature-branch-"
21+
2022

2123
jobs:
2224
list_feature_branches:
@@ -85,6 +87,11 @@ jobs:
8587
python scripts/gha/install_prereqs_desktop.py
8688
python -m pip install requests
8789
90+
- name: Name new branch
91+
run: |
92+
date_str=$(date "+%Y%m%d-%H%M%S")
93+
echo "NEW_BRANCH=${{env.branchPrefix}}${{github.run_number}}-${date_str}" >> $GITHUB_ENV
94+
8895
- name: Create merge PR
8996
id: create-pr
9097
run: |
@@ -115,7 +122,10 @@ jobs:
115122
116123
> Created on ${date_str} by [${{github.workflow}} workflow]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
117124
"
118-
pr_number=$(python scripts/gha/create_pull_request.py --token ${{ steps.generate-token.outputs.token }} --base "${{ matrix.branch_name }}" --head "${main_branch}" --title "${pr_title}" --body "${pr_body}")
125+
git checkout main
126+
git checkout -b "${NEW_BRANCH}"
127+
git push --set-upstream origin "${NEW_BRANCH}"
128+
pr_number=$(python scripts/gha/create_pull_request.py --token ${{ steps.generate-token.outputs.token }} --base "${{ matrix.branch_name }}" --head "${NEW_BRANCH}" --title "${pr_title}" --body "${pr_body}")
119129
echo "created_pr_number=${pr_number}" >> $GITHUB_OUTPUT
120130
121131
- name: Set test trigger label.

app/rest/request_json.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class RequestJson : public Request {
4141
explicit RequestJson(const char* schema) : application_data_(new FbsTypeT()) {
4242
flatbuffers::IDLOptions fbs_options;
4343
fbs_options.skip_unexpected_fields_in_json = true;
44+
fbs_options.strict_json = true;
4445
parser_.reset(new flatbuffers::Parser(fbs_options));
4546

4647
bool parse_status = parser_->Parse(schema);

app/rest/tests/request_json_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ TEST(RequestJsonTest, UpdatePostFields) {
6464
request.set_token("abc");
6565
EXPECT_EQ(
6666
"{\n"
67-
" token: \"abc\",\n"
68-
" number: 123\n"
67+
" \"token\": \"abc\",\n"
68+
" \"number\": 123\n"
6969
"}\n",
7070
request.options().post_fields);
7171
}

auth/src/android/auth_android.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,12 @@ void CheckEmulator(AuthData* auth_data) {
195195

196196
// Use emulator as long as this env variable is set, regardless its value.
197197
if (std::getenv("USE_AUTH_EMULATOR") == nullptr) {
198-
LogDebug("Using Auth Prod for testing.");
198+
LogInfo("Using Auth Prod for testing.");
199199
return;
200200
}
201201

202+
LogInfo("Using Auth Emulator for testing.");
203+
202204
// Use AUTH_EMULATOR_PORT if it is set to non empty string,
203205
// otherwise use the default port.
204206
uint32_t port = std::stoi(kEmulatorPort);

auth/src/desktop/rpcs/auth_request.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,23 @@ std::string AuthRequest::GetUrl() {
8888
} else {
8989
std::string url(kHttp);
9090
url += emulator_url;
91+
url += "/";
9192
url += kServerURL;
9293
return url;
9394
}
9495
}
9596

9697
void AuthRequest::CheckEmulator() {
9798
if (!emulator_url.empty()) {
98-
LogDebug("Emulator Url already set: %s", emulator_url.c_str());
99+
LogInfo("Emulator Url already set: %s", emulator_url.c_str());
99100
return;
100101
}
101102
// Use emulator as long as this env variable is set, regardless its value.
102103
if (std::getenv("USE_AUTH_EMULATOR") == nullptr) {
103-
LogDebug("Using Auth Prod for testing.");
104+
LogInfo("Using Auth Prod for testing.");
104105
return;
105106
}
106-
107+
LogInfo("Using Auth Emulator.");
107108
emulator_url.append(kEmulatorLocalHost);
108109
emulator_url.append(":");
109110
// Use AUTH_EMULATOR_PORT if it is set to non empty string,

auth/src/ios/auth_ios.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ void UpdateCurrentUser(AuthData *auth_data) {
160160
void CheckEmulator(AuthData *auth_data) {
161161
// Use emulator as long as this env variable is set, regardless its value.
162162
if (std::getenv("USE_AUTH_EMULATOR") == nullptr) {
163-
LogDebug("Using Auth Prod for testing.");
163+
LogInfo("Using Auth Prod for testing.");
164164
return;
165165
}
166+
LogInfo("Using Auth Emulator.");
166167

167168
// Use AUTH_EMULATOR_PORT if it is set to non empty string,
168169
// otherwise use the default port.

auth/tests/desktop/rpcs/create_auth_uri_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ TEST(CreateAuthUriTest, TestCreateAuthUriRequest) {
3636
request.options().url);
3737
EXPECT_EQ(
3838
"{\n"
39-
" identifier: \"email\",\n"
40-
" continueUri: \"http://localhost\"\n"
39+
" \"identifier\": \"email\",\n"
40+
" \"continueUri\": \"http://localhost\"\n"
4141
"}\n",
4242
request.options().post_fields);
4343
}

auth/tests/desktop/rpcs/delete_account_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TEST(DeleteAccountTest, TestDeleteAccountRequest) {
3737
request.options().url);
3838
EXPECT_EQ(
3939
"{\n"
40-
" idToken: \"token\"\n"
40+
" \"idToken\": \"token\"\n"
4141
"}\n",
4242
request.options().post_fields);
4343
}

auth/tests/desktop/rpcs/get_account_info_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ TEST(GetAccountInfoTest, TestGetAccountInfoRequest) {
3636
request.options().url);
3737
EXPECT_EQ(
3838
"{\n"
39-
" idToken: \"token\"\n"
39+
" \"idToken\": \"token\"\n"
4040
"}\n",
4141
request.options().post_fields);
4242
}

auth/tests/desktop/rpcs/get_oob_confirmation_code_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ TEST(GetOobConfirmationCodeTest, SendVerifyEmailRequest) {
4040
request->options().url);
4141
EXPECT_EQ(
4242
"{\n"
43-
" idToken: \"token\",\n"
44-
" requestType: \"VERIFY_EMAIL\"\n"
43+
" \"idToken\": \"token\",\n"
44+
" \"requestType\": \"VERIFY_EMAIL\"\n"
4545
"}\n",
4646
request->options().post_fields);
4747
}
@@ -56,8 +56,8 @@ TEST(GetOobConfirmationCodeTest, SendPasswordResetEmailRequest) {
5656
request->options().url);
5757
EXPECT_EQ(
5858
"{\n"
59-
" email: \"email\",\n"
60-
" requestType: \"PASSWORD_RESET\"\n"
59+
" \"email\": \"email\",\n"
60+
" \"requestType\": \"PASSWORD_RESET\"\n"
6161
"}\n",
6262
request->options().post_fields);
6363
}

auth/tests/desktop/rpcs/reset_password_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ TEST(ResetPasswordTest, TestResetPasswordRequest) {
3535
request.options().url);
3636
EXPECT_EQ(
3737
"{\n"
38-
" oobCode: \"oob\",\n"
39-
" newPassword: \"password\"\n"
38+
" \"oobCode\": \"oob\",\n"
39+
" \"newPassword\": \"password\"\n"
4040
"}\n",
4141
request.options().post_fields);
4242
}

auth/tests/desktop/rpcs/secure_token_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ TEST(SecureTokenTest, TestSetRefreshRequest) {
3434
request.options().url);
3535
EXPECT_EQ(
3636
"{\n"
37-
" grantType: \"refresh_token\",\n"
38-
" refreshToken: \"token123\"\n"
37+
" \"grantType\": \"refresh_token\",\n"
38+
" \"refreshToken\": \"token123\"\n"
3939
"}\n",
4040
request.options().post_fields);
4141
}

auth/tests/desktop/rpcs/set_account_info_test.cc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateEmail) {
4141
request->options().url);
4242
EXPECT_EQ(
4343
"{\n"
44-
" email: \"fakeemail\",\n"
45-
" returnSecureToken: true,\n"
46-
" idToken: \"token\"\n"
44+
" \"email\": \"fakeemail\",\n"
45+
" \"returnSecureToken\": true,\n"
46+
" \"idToken\": \"token\"\n"
4747
"}\n",
4848
request->options().post_fields);
4949
}
@@ -60,9 +60,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdatePassword) {
6060
request->options().url);
6161
EXPECT_EQ(
6262
"{\n"
63-
" password: \"fakepassword\",\n"
64-
" returnSecureToken: true,\n"
65-
" idToken: \"token\"\n"
63+
" \"password\": \"fakepassword\",\n"
64+
" \"returnSecureToken\": true,\n"
65+
" \"idToken\": \"token\"\n"
6666
"}\n",
6767
request->options().post_fields);
6868
}
@@ -79,10 +79,10 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_Full) {
7979
request->options().url);
8080
EXPECT_EQ(
8181
"{\n"
82-
" displayName: \"New Name\",\n"
83-
" returnSecureToken: true,\n"
84-
" idToken: \"token\",\n"
85-
" photoUrl: \"new_url\"\n"
82+
" \"displayName\": \"New Name\",\n"
83+
" \"returnSecureToken\": true,\n"
84+
" \"idToken\": \"token\",\n"
85+
" \"photoUrl\": \"new_url\"\n"
8686
"}\n",
8787
request->options().post_fields);
8888
}
@@ -99,9 +99,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_Partial) {
9999
request->options().url);
100100
EXPECT_EQ(
101101
"{\n"
102-
" returnSecureToken: true,\n"
103-
" idToken: \"token\",\n"
104-
" photoUrl: \"new_url\"\n"
102+
" \"returnSecureToken\": true,\n"
103+
" \"idToken\": \"token\",\n"
104+
" \"photoUrl\": \"new_url\"\n"
105105
"}\n",
106106
request->options().post_fields);
107107
}
@@ -117,9 +117,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_DeleteFields) {
117117
request->options().url);
118118
EXPECT_EQ(
119119
"{\n"
120-
" returnSecureToken: true,\n"
121-
" idToken: \"token\",\n"
122-
" deleteAttribute: [\n"
120+
" \"returnSecureToken\": true,\n"
121+
" \"idToken\": \"token\",\n"
122+
" \"deleteAttribute\": [\n"
123123
" \"DISPLAY_NAME\",\n"
124124
" \"PHOTO_URL\"\n"
125125
" ]\n"
@@ -140,10 +140,10 @@ TEST(SetAccountInfoTest,
140140
request->options().url);
141141
EXPECT_EQ(
142142
"{\n"
143-
" returnSecureToken: true,\n"
144-
" idToken: \"token\",\n"
145-
" photoUrl: \"new_url\",\n"
146-
" deleteAttribute: [\n"
143+
" \"returnSecureToken\": true,\n"
144+
" \"idToken\": \"token\",\n"
145+
" \"photoUrl\": \"new_url\",\n"
146+
" \"deleteAttribute\": [\n"
147147
" \"DISPLAY_NAME\"\n"
148148
" ]\n"
149149
"}\n",
@@ -162,9 +162,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_Unlink) {
162162
request->options().url);
163163
EXPECT_EQ(
164164
"{\n"
165-
" returnSecureToken: true,\n"
166-
" idToken: \"token\",\n"
167-
" deleteProvider: [\n"
165+
" \"returnSecureToken\": true,\n"
166+
" \"idToken\": \"token\",\n"
167+
" \"deleteProvider\": [\n"
168168
" \"fakeprovider\"\n"
169169
" ]\n"
170170
"}\n",

auth/tests/desktop/rpcs/sign_up_new_user_test.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ TEST(SignUpNewUserTest, TestAnonymousSignInRequest) {
3535
request.options().url);
3636
EXPECT_EQ(
3737
"{\n"
38-
" returnSecureToken: true\n"
38+
" \"returnSecureToken\": true\n"
3939
"}\n",
4040
request.options().post_fields);
4141
}
@@ -50,10 +50,10 @@ TEST(SignUpNewUserTest, TestEmailPasswordSignInRequest) {
5050
request.options().url);
5151
EXPECT_EQ(
5252
"{\n"
53-
" email: \"e@mail\",\n"
54-
" password: \"pwd\",\n"
55-
" displayName: \"rabbit\",\n"
56-
" returnSecureToken: true\n"
53+
" \"email\": \"e@mail\",\n"
54+
" \"password\": \"pwd\",\n"
55+
" \"displayName\": \"rabbit\",\n"
56+
" \"returnSecureToken\": true\n"
5757
"}\n",
5858
request.options().post_fields);
5959
}

auth/tests/desktop/rpcs/verify_custom_token_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ TEST(VerifyCustomTokenTest, TestVerifyCustomTokenRequest) {
3636
request.options().url);
3737
EXPECT_EQ(
3838
"{\n"
39-
" returnSecureToken: true,\n"
40-
" token: \"token123\"\n"
39+
" \"returnSecureToken\": true,\n"
40+
" \"token\": \"token123\"\n"
4141
"}\n",
4242
request.options().post_fields);
4343
}

auth/tests/desktop/rpcs/verify_password_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ TEST(VerifyPasswordTest, TestVerifyPasswordRequest) {
3535
request.options().url);
3636
EXPECT_EQ(
3737
"{\n"
38-
" email: \"abc@email\",\n"
39-
" password: \"pwd\",\n"
40-
" returnSecureToken: true\n"
38+
" \"email\": \"abc@email\",\n"
39+
" \"password\": \"pwd\",\n"
40+
" \"returnSecureToken\": true\n"
4141
"}\n",
4242
request.options().post_fields);
4343
}

cpp_sdk_version.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"released": "11.3.0",
3-
"stable": "11.3.0",
4-
"head": "11.3.0"
2+
"released": "11.4.0",
3+
"stable": "11.4.0",
4+
"head": "11.4.0"
55
}

gma/src/android/native_ad_image_android.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ NativeAdImage::NativeAdImage(
7171
FIREBASE_ASSERT(j_uri);
7272
internal_->uri = util::JniUriToString(env, j_uri);
7373

74+
// Images requested with an android user agent may return webp images. Trim
75+
// webp parameter from image url to get the original JPG/PNG image.
76+
std::size_t eq_pos = internal_->uri.rfind("=");
77+
std::size_t webp_pos = internal_->uri.rfind("-rw");
78+
if (webp_pos != std::string::npos && eq_pos != std::string::npos &&
79+
webp_pos > eq_pos) {
80+
internal_->uri.replace(webp_pos, 3, "");
81+
}
82+
7483
// NativeAdImage scale.
7584
jdouble j_scale =
7685
env->CallDoubleMethod(internal_->native_ad_image,

release_build_files/readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ workflow use only during the development of your app, not for publicly shipping
627627
code.
628628

629629
## Release Notes
630+
### Next Release
631+
- Changes
632+
- Auth: Add Firebase Auth Emulator support. Set the environment variable
633+
USE_AUTH_EMULATOR=yes (and optionally AUTH_EMULATOR_PORT, default 9099)
634+
to connect to the local Firebase Auth Emulator.
635+
630636
### 11.4.0
631637
- Changes
632638
- General (Android): Update to Firebase Android BoM version 32.2.2.

0 commit comments

Comments
 (0)