From ec9f62865c822587753b2d62f1fa1fbcfc96c01e Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Fri, 8 Aug 2025 08:05:54 -0700 Subject: [PATCH] Update firebase DB url. (#53166) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53166 Our DB doesn't have that suffix, so I'm removing it. Changelog: [Internal] [Changed] - Reviewed By: cipolleschi Differential Revision: D79883740 fbshipit-source-id: a52ab275129807cbb6e066baefccd71a8ac7398d --- .../workflow-scripts/__tests__/firebaseUtils-test.js | 10 ++++------ .github/workflow-scripts/firebaseUtils.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflow-scripts/__tests__/firebaseUtils-test.js b/.github/workflow-scripts/__tests__/firebaseUtils-test.js index a3104699e29..e12525c1602 100644 --- a/.github/workflow-scripts/__tests__/firebaseUtils-test.js +++ b/.github/workflow-scripts/__tests__/firebaseUtils-test.js @@ -46,9 +46,7 @@ describe('FirebaseClient', () => { expect(client.password).toBe('testpassword'); expect(client.apiKey).toBe('test-api-key'); expect(client.projectId).toBe('test-project'); - expect(client.databaseUrl).toBe( - 'test-project-default-rtdb.firebaseio.com', - ); + expect(client.databaseUrl).toBe('test-project.firebaseio.com'); expect(client.idToken).toBeNull(); }); }); @@ -230,7 +228,7 @@ describe('FirebaseClient', () => { expect(result).toEqual(mockData); expect(global.fetch).toHaveBeenCalledWith( - 'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', + 'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', { method: 'GET', headers: { @@ -275,7 +273,7 @@ describe('FirebaseClient', () => { await client.makeDatabaseRequest('2023-12-01', 'PUT', testData); expect(global.fetch).toHaveBeenCalledWith( - 'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', + 'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', { method: 'PUT', headers: { @@ -301,7 +299,7 @@ describe('FirebaseClient', () => { await client.storeResults('2023-12-01', results); expect(global.fetch).toHaveBeenCalledWith( - 'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', + 'https://test-project.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token', { method: 'PUT', headers: { diff --git a/.github/workflow-scripts/firebaseUtils.js b/.github/workflow-scripts/firebaseUtils.js index 2e72dff7b75..f19d68ea82e 100644 --- a/.github/workflow-scripts/firebaseUtils.js +++ b/.github/workflow-scripts/firebaseUtils.js @@ -15,7 +15,7 @@ class FirebaseClient { this.password = process.env.FIREBASE_APP_PASS; this.apiKey = process.env.FIREBASE_APP_APIKEY; this.projectId = process.env.FIREBASE_APP_PROJECTNAME; - this.databaseUrl = `${this.projectId}-default-rtdb.firebaseio.com`; + this.databaseUrl = `${this.projectId}.firebaseio.com`; this.idToken = null; }