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

Automatic merge of main into feature_branch/ump-sdk - Aug 14, 2023 #1425

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e0c330d
iOS: Remove Analytics dependency from GMA integration test (#1386)
jonsimantov Jul 19, 2023
3cd0dca
Add stub workflow for updating feature branches.
jonsimantov Jul 20, 2023
00eeac8
Add script to merge main into all active feature branches on a regula…
jonsimantov Jul 23, 2023
b5e5477
Increase retry. (#1402)
jonsimantov Jul 24, 2023
b9a53cf
Add Firestore test history report (#1403)
jonsimantov Jul 25, 2023
daf92c8
Revert "OR Query Implementation (#1335)" (#1399)
tom-andersen Jul 28, 2023
27a10bc
Wrap the real-time RemoteConfig test in flaky-block to automatically …
AlmostMatt Jul 31, 2023
ed42949
Merge branch 'feature_branch/ump-sdk' into main
jonsimantov Jul 31, 2023
9ac8881
Update the iOS version used by FTL (#1408)
a-maurice Jul 31, 2023
f8b6a36
Kick off nightly packaging an hour earlier (#1409)
a-maurice Aug 2, 2023
18367c0
Fix crash on gma::Initialize without a Firebase App (#1320)
AlmostMatt Aug 2, 2023
505f12e
build: pass along the CMake path (#1410)
compnerd Aug 3, 2023
5df80a2
Add log to gsutil fetch. (#1411)
jonsimantov Aug 3, 2023
3002ff4
Update mobile dependencies - Thu Aug 03 2023 (#1413)
firebase-workflow-trigger[bot] Aug 6, 2023
f198c6f
feat(auth): Add emulator support (#1400)
cynthiajoan Aug 6, 2023
f84253e
Update merge-to-main script (#1420)
jonsimantov Aug 7, 2023
64d5d42
Update release version number for M135, 11.4.0 (#1421)
AlmostMatt Aug 8, 2023
669b0fb
feat(auth): enable emulator support on desktop (#1423)
cynthiajoan Aug 10, 2023
86198bb
Internal Updates. (#1422)
nakirekommula Aug 10, 2023
c050d59
Merge branch 'feature_branch/ump-sdk' into workflow/auto-merge-featur…
jonsimantov Aug 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/update-feature-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ env:
defaultBranchPattern: "feature_branch/*"
defaultMainBranch: "main"
triggerTestsLabel: "tests-requested: quick"
branchPrefix: "workflow/auto-merge-feature-branch-"


jobs:
list_feature_branches:
Expand Down Expand Up @@ -85,6 +87,11 @@ jobs:
python scripts/gha/install_prereqs_desktop.py
python -m pip install requests

- name: Name new branch
run: |
date_str=$(date "+%Y%m%d-%H%M%S")
echo "NEW_BRANCH=${{env.branchPrefix}}${{github.run_number}}-${date_str}" >> $GITHUB_ENV

- name: Create merge PR
id: create-pr
run: |
Expand Down Expand Up @@ -115,7 +122,10 @@ jobs:

> Created on ${date_str} by [${{github.workflow}} workflow]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
"
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}")
git checkout main
git checkout -b "${NEW_BRANCH}"
git push --set-upstream origin "${NEW_BRANCH}"
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}")
echo "created_pr_number=${pr_number}" >> $GITHUB_OUTPUT

- name: Set test trigger label.
Expand Down
1 change: 1 addition & 0 deletions app/rest/request_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class RequestJson : public Request {
explicit RequestJson(const char* schema) : application_data_(new FbsTypeT()) {
flatbuffers::IDLOptions fbs_options;
fbs_options.skip_unexpected_fields_in_json = true;
fbs_options.strict_json = true;
parser_.reset(new flatbuffers::Parser(fbs_options));

bool parse_status = parser_->Parse(schema);
Expand Down
4 changes: 2 additions & 2 deletions app/rest/tests/request_json_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ TEST(RequestJsonTest, UpdatePostFields) {
request.set_token("abc");
EXPECT_EQ(
"{\n"
" token: \"abc\",\n"
" number: 123\n"
" \"token\": \"abc\",\n"
" \"number\": 123\n"
"}\n",
request.options().post_fields);
}
Expand Down
4 changes: 3 additions & 1 deletion auth/src/android/auth_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ void CheckEmulator(AuthData* auth_data) {

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

LogInfo("Using Auth Emulator for testing.");

// Use AUTH_EMULATOR_PORT if it is set to non empty string,
// otherwise use the default port.
uint32_t port = std::stoi(kEmulatorPort);
Expand Down
7 changes: 4 additions & 3 deletions auth/src/desktop/rpcs/auth_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,23 @@ std::string AuthRequest::GetUrl() {
} else {
std::string url(kHttp);
url += emulator_url;
url += "/";
url += kServerURL;
return url;
}
}

void AuthRequest::CheckEmulator() {
if (!emulator_url.empty()) {
LogDebug("Emulator Url already set: %s", emulator_url.c_str());
LogInfo("Emulator Url already set: %s", emulator_url.c_str());
return;
}
// Use emulator as long as this env variable is set, regardless its value.
if (std::getenv("USE_AUTH_EMULATOR") == nullptr) {
LogDebug("Using Auth Prod for testing.");
LogInfo("Using Auth Prod for testing.");
return;
}

LogInfo("Using Auth Emulator.");
emulator_url.append(kEmulatorLocalHost);
emulator_url.append(":");
// Use AUTH_EMULATOR_PORT if it is set to non empty string,
Expand Down
3 changes: 2 additions & 1 deletion auth/src/ios/auth_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ void UpdateCurrentUser(AuthData *auth_data) {
void CheckEmulator(AuthData *auth_data) {
// Use emulator as long as this env variable is set, regardless its value.
if (std::getenv("USE_AUTH_EMULATOR") == nullptr) {
LogDebug("Using Auth Prod for testing.");
LogInfo("Using Auth Prod for testing.");
return;
}
LogInfo("Using Auth Emulator.");

// Use AUTH_EMULATOR_PORT if it is set to non empty string,
// otherwise use the default port.
Expand Down
4 changes: 2 additions & 2 deletions auth/tests/desktop/rpcs/create_auth_uri_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ TEST(CreateAuthUriTest, TestCreateAuthUriRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" identifier: \"email\",\n"
" continueUri: \"http://localhost\"\n"
" \"identifier\": \"email\",\n"
" \"continueUri\": \"http://localhost\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
2 changes: 1 addition & 1 deletion auth/tests/desktop/rpcs/delete_account_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TEST(DeleteAccountTest, TestDeleteAccountRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" idToken: \"token\"\n"
" \"idToken\": \"token\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
2 changes: 1 addition & 1 deletion auth/tests/desktop/rpcs/get_account_info_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST(GetAccountInfoTest, TestGetAccountInfoRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" idToken: \"token\"\n"
" \"idToken\": \"token\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
8 changes: 4 additions & 4 deletions auth/tests/desktop/rpcs/get_oob_confirmation_code_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ TEST(GetOobConfirmationCodeTest, SendVerifyEmailRequest) {
request->options().url);
EXPECT_EQ(
"{\n"
" idToken: \"token\",\n"
" requestType: \"VERIFY_EMAIL\"\n"
" \"idToken\": \"token\",\n"
" \"requestType\": \"VERIFY_EMAIL\"\n"
"}\n",
request->options().post_fields);
}
Expand All @@ -56,8 +56,8 @@ TEST(GetOobConfirmationCodeTest, SendPasswordResetEmailRequest) {
request->options().url);
EXPECT_EQ(
"{\n"
" email: \"email\",\n"
" requestType: \"PASSWORD_RESET\"\n"
" \"email\": \"email\",\n"
" \"requestType\": \"PASSWORD_RESET\"\n"
"}\n",
request->options().post_fields);
}
Expand Down
4 changes: 2 additions & 2 deletions auth/tests/desktop/rpcs/reset_password_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ TEST(ResetPasswordTest, TestResetPasswordRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" oobCode: \"oob\",\n"
" newPassword: \"password\"\n"
" \"oobCode\": \"oob\",\n"
" \"newPassword\": \"password\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
4 changes: 2 additions & 2 deletions auth/tests/desktop/rpcs/secure_token_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ TEST(SecureTokenTest, TestSetRefreshRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" grantType: \"refresh_token\",\n"
" refreshToken: \"token123\"\n"
" \"grantType\": \"refresh_token\",\n"
" \"refreshToken\": \"token123\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
46 changes: 23 additions & 23 deletions auth/tests/desktop/rpcs/set_account_info_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateEmail) {
request->options().url);
EXPECT_EQ(
"{\n"
" email: \"fakeemail\",\n"
" returnSecureToken: true,\n"
" idToken: \"token\"\n"
" \"email\": \"fakeemail\",\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\"\n"
"}\n",
request->options().post_fields);
}
Expand All @@ -60,9 +60,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdatePassword) {
request->options().url);
EXPECT_EQ(
"{\n"
" password: \"fakepassword\",\n"
" returnSecureToken: true,\n"
" idToken: \"token\"\n"
" \"password\": \"fakepassword\",\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\"\n"
"}\n",
request->options().post_fields);
}
Expand All @@ -79,10 +79,10 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_Full) {
request->options().url);
EXPECT_EQ(
"{\n"
" displayName: \"New Name\",\n"
" returnSecureToken: true,\n"
" idToken: \"token\",\n"
" photoUrl: \"new_url\"\n"
" \"displayName\": \"New Name\",\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\",\n"
" \"photoUrl\": \"new_url\"\n"
"}\n",
request->options().post_fields);
}
Expand All @@ -99,9 +99,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_Partial) {
request->options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true,\n"
" idToken: \"token\",\n"
" photoUrl: \"new_url\"\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\",\n"
" \"photoUrl\": \"new_url\"\n"
"}\n",
request->options().post_fields);
}
Expand All @@ -117,9 +117,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_UpdateProfile_DeleteFields) {
request->options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true,\n"
" idToken: \"token\",\n"
" deleteAttribute: [\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\",\n"
" \"deleteAttribute\": [\n"
" \"DISPLAY_NAME\",\n"
" \"PHOTO_URL\"\n"
" ]\n"
Expand All @@ -140,10 +140,10 @@ TEST(SetAccountInfoTest,
request->options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true,\n"
" idToken: \"token\",\n"
" photoUrl: \"new_url\",\n"
" deleteAttribute: [\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\",\n"
" \"photoUrl\": \"new_url\",\n"
" \"deleteAttribute\": [\n"
" \"DISPLAY_NAME\"\n"
" ]\n"
"}\n",
Expand All @@ -162,9 +162,9 @@ TEST(SetAccountInfoTest, TestSetAccountInfoRequest_Unlink) {
request->options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true,\n"
" idToken: \"token\",\n"
" deleteProvider: [\n"
" \"returnSecureToken\": true,\n"
" \"idToken\": \"token\",\n"
" \"deleteProvider\": [\n"
" \"fakeprovider\"\n"
" ]\n"
"}\n",
Expand Down
10 changes: 5 additions & 5 deletions auth/tests/desktop/rpcs/sign_up_new_user_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TEST(SignUpNewUserTest, TestAnonymousSignInRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true\n"
" \"returnSecureToken\": true\n"
"}\n",
request.options().post_fields);
}
Expand All @@ -50,10 +50,10 @@ TEST(SignUpNewUserTest, TestEmailPasswordSignInRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" email: \"e@mail\",\n"
" password: \"pwd\",\n"
" displayName: \"rabbit\",\n"
" returnSecureToken: true\n"
" \"email\": \"e@mail\",\n"
" \"password\": \"pwd\",\n"
" \"displayName\": \"rabbit\",\n"
" \"returnSecureToken\": true\n"
"}\n",
request.options().post_fields);
}
Expand Down
4 changes: 2 additions & 2 deletions auth/tests/desktop/rpcs/verify_custom_token_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ TEST(VerifyCustomTokenTest, TestVerifyCustomTokenRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" returnSecureToken: true,\n"
" token: \"token123\"\n"
" \"returnSecureToken\": true,\n"
" \"token\": \"token123\"\n"
"}\n",
request.options().post_fields);
}
Expand Down
6 changes: 3 additions & 3 deletions auth/tests/desktop/rpcs/verify_password_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ TEST(VerifyPasswordTest, TestVerifyPasswordRequest) {
request.options().url);
EXPECT_EQ(
"{\n"
" email: \"abc@email\",\n"
" password: \"pwd\",\n"
" returnSecureToken: true\n"
" \"email\": \"abc@email\",\n"
" \"password\": \"pwd\",\n"
" \"returnSecureToken\": true\n"
"}\n",
request.options().post_fields);
}
Expand Down
6 changes: 3 additions & 3 deletions cpp_sdk_version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"released": "11.3.0",
"stable": "11.3.0",
"head": "11.3.0"
"released": "11.4.0",
"stable": "11.4.0",
"head": "11.4.0"
}
9 changes: 9 additions & 0 deletions gma/src/android/native_ad_image_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ NativeAdImage::NativeAdImage(
FIREBASE_ASSERT(j_uri);
internal_->uri = util::JniUriToString(env, j_uri);

// Images requested with an android user agent may return webp images. Trim
// webp parameter from image url to get the original JPG/PNG image.
std::size_t eq_pos = internal_->uri.rfind("=");
std::size_t webp_pos = internal_->uri.rfind("-rw");
if (webp_pos != std::string::npos && eq_pos != std::string::npos &&
webp_pos > eq_pos) {
internal_->uri.replace(webp_pos, 3, "");
}

// NativeAdImage scale.
jdouble j_scale =
env->CallDoubleMethod(internal_->native_ad_image,
Expand Down
6 changes: 6 additions & 0 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@ workflow use only during the development of your app, not for publicly shipping
code.

## Release Notes
### Next Release
- Changes
- Auth: Add Firebase Auth Emulator support. Set the environment variable
USE_AUTH_EMULATOR=yes (and optionally AUTH_EMULATOR_PORT, default 9099)
to connect to the local Firebase Auth Emulator.

### 11.4.0
- Changes
- General (Android): Update to Firebase Android BoM version 32.2.2.
Expand Down