Skip to content

Commit 4dc18e3

Browse files
committed
Change default symbol server to a reliost instance.
1 parent 01baf77 commit 4dc18e3

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

src/app-logic/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const PROFILER_SERVER_ORIGIN = 'https://api.profiler.firefox.com';
121121
// [1] https://github.com/mstange/profiler-symbol-server/
122122

123123
// This is the default server.
124-
export const SYMBOL_SERVER_URL = 'https://symbolication.services.mozilla.com';
124+
export const SYMBOL_SERVER_URL = 'https://mozilla.symbols.samplyprofiler.com';
125125

126126
// See the MarkerPhase type for more information.
127127
export const INSTANT: MarkerPhase = 0;

src/selectors/url-state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ function _shouldAllowSymbolServerUrl(symbolServerUrl: string) {
329329
const otherAllowedHostnames = [
330330
'symbols.mozilla.org',
331331
'symbolication.services.mozilla.com',
332+
'mozilla.symbols.samplyprofiler.com',
332333
];
333334
if (!otherAllowedHostnames.includes(url.hostname)) {
334335
console.error(

src/test/__snapshots__/url-handling.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ exports[`symbolServerUrl will allow an allowed https host 1`] = `Array []`;
77
exports[`symbolServerUrl will error when switching to an allowed but non-https host 1`] = `
88
Array [
99
Array [
10-
"HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://symbolication.services.mozilla.com.",
10+
"HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://mozilla.symbols.samplyprofiler.com.",
1111
],
1212
]
1313
`;
1414

1515
exports[`symbolServerUrl will error when switching to an invalid host 1`] = `
1616
Array [
1717
Array [
18-
"The symbol server URL was not valid. Rejecting invalid and defaulting to https://symbolication.services.mozilla.com.",
18+
"The symbol server URL was not valid. Rejecting invalid and defaulting to https://mozilla.symbols.samplyprofiler.com.",
1919
[TypeError: Invalid URL: invalid],
2020
],
2121
]
@@ -24,7 +24,7 @@ Array [
2424
exports[`symbolServerUrl will error when switching to an unknown host 1`] = `
2525
Array [
2626
Array [
27-
"The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://symbolication.services.mozilla.com.",
27+
"The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://mozilla.symbols.samplyprofiler.com.",
2828
],
2929
]
3030
`;

src/test/store/receive-profile.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ import {
7777
simulateOldWebChannelAndFrameScript,
7878
simulateWebChannel,
7979
} from '../fixtures/mocks/web-channel';
80+
import { SYMBOL_SERVER_URL } from 'firefox-profiler/app-logic/constants';
8081

8182
function simulateSymbolStoreHasNoCache() {
8283
// SymbolStoreDB is a mock, but Flow doesn't know this. That's why we use
@@ -815,7 +816,7 @@ describe('actions/receive-profile', function () {
815816

816817
expect(
817818
window.fetchMock.callHistory.lastCall(
818-
'https://symbolication.services.mozilla.com/symbolicate/v5'
819+
`${SYMBOL_SERVER_URL}/symbolicate/v5`
819820
)?.options
820821
).toEqual(
821822
expect.objectContaining({
@@ -833,7 +834,7 @@ describe('actions/receive-profile', function () {
833834

834835
expect(
835836
window.fetchMock.callHistory.lastCall(
836-
'https://symbolication.services.mozilla.com/symbolicate/v5'
837+
`${SYMBOL_SERVER_URL}/symbolicate/v5`
837838
)?.options
838839
).toEqual(
839840
expect.objectContaining({
@@ -913,7 +914,7 @@ describe('actions/receive-profile', function () {
913914
'https://storage.googleapis.com/profile-store/FAKEHASH',
914915
unsymbolicatedProfile
915916
)
916-
.post('https://symbolication.services.mozilla.com/symbolicate/v5', {});
917+
.post(`${SYMBOL_SERVER_URL}/symbolicate/v5`, {});
917918

918919
simulateSymbolStoreHasNoCache();
919920

@@ -925,7 +926,7 @@ describe('actions/receive-profile', function () {
925926

926927
expect(
927928
window.fetchMock.callHistory.lastCall(
928-
'https://symbolication.services.mozilla.com/symbolicate/v5'
929+
`${SYMBOL_SERVER_URL}/symbolicate/v5`
929930
)?.options
930931
).toEqual(
931932
expect.objectContaining({
@@ -1425,7 +1426,7 @@ describe('actions/receive-profile', function () {
14251426

14261427
expect(
14271428
window.fetchMock.callHistory.lastCall(
1428-
'https://symbolication.services.mozilla.com/symbolicate/v5'
1429+
`${SYMBOL_SERVER_URL}/symbolicate/v5`
14291430
)?.options
14301431
).toEqual(
14311432
expect.objectContaining({

src/utils/fetch-assembly.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ export async function fetchAssembly(
7474
// local symbol servers. Check the symbol server URL to avoid hammering the
7575
// official Mozilla symbolication server with requests it can't handle.
7676
// This check can be removed once it adds support for /asm/v1.
77-
function _serverMightSupportAssembly(symbolServerUrl: string): boolean {
78-
return isLocalURL(symbolServerUrl);
77+
function _serverMightSupportAssembly(_symbolServerUrl: string): boolean {
78+
return true;
7979
}
8080

8181
// Convert the response from the JSON format into our own DecodedInstruction

0 commit comments

Comments
 (0)