diff --git a/tests/ui/job-view/AppHistory_test.jsx b/tests/ui/job-view/AppHistory_test.jsx index 1a97823d0bc..a09e6f963bb 100644 --- a/tests/ui/job-view/AppHistory_test.jsx +++ b/tests/ui/job-view/AppHistory_test.jsx @@ -34,14 +34,17 @@ describe('history', () => { fetchMock.get(getApiUrl('/performance/framework/'), {}); fetchMock.get(getApiUrl('/user/'), []); fetchMock.get(getApiUrl('/failureclassification/'), []); - fetchMock.get('begin:https://treestatus.mozilla-releng.net/trees/', { - result: { - message_of_the_day: '', - reason: '', - status: 'open', - tree: repoName, + fetchMock.get( + 'begin:https://treestatus.prod.lando.prod.cloudops.mozgcp.net/trees/', + { + result: { + message_of_the_day: '', + reason: '', + status: 'open', + tree: repoName, + }, }, - }); + ); fetchMock.get( `begin:${getProjectUrl('/push/?full=true&count=', repoName)}`, { diff --git a/tests/ui/job-view/App_test.jsx b/tests/ui/job-view/App_test.jsx index 0883faf7312..76849ae8833 100644 --- a/tests/ui/job-view/App_test.jsx +++ b/tests/ui/job-view/App_test.jsx @@ -32,14 +32,17 @@ describe('App', () => { beforeAll(() => { // tests will pass without this, but a lot of console warnings/errors - fetchMock.get('begin:https://treestatus.mozilla-releng.net/trees/', { - result: { - message_of_the_day: '', - reason: '', - status: 'open', - tree: repoName, + fetchMock.get( + 'begin:https://treestatus.prod.lando.prod.cloudops.mozgcp.net/trees/', + { + result: { + message_of_the_day: '', + reason: '', + status: 'open', + tree: repoName, + }, }, - }); + ); fetchMock.get(getApiUrl('/repository/'), reposFixture); fetchMock.get(getApiUrl('/performance/framework/'), {}); diff --git a/tests/ui/job-view/Filtering_test.jsx b/tests/ui/job-view/Filtering_test.jsx index 85dcce7a1eb..1d09dbc4cce 100644 --- a/tests/ui/job-view/Filtering_test.jsx +++ b/tests/ui/job-view/Filtering_test.jsx @@ -53,7 +53,7 @@ describe('Filtering', () => { fetchMock.get(getApiUrl('/failureclassification/'), []); fetchMock.get(`begin:${bzBaseUrl}rest/bug`, emptyBzResponse); fetchMock.get( - 'begin:https://treestatus.mozilla-releng.net/trees/', + 'begin:https://treestatus.prod.lando.prod.cloudops.mozgcp.net/trees/', treeStatusResponse, ); fetchMock.get( diff --git a/tests/ui/job-view/SecondaryNavBar_test.jsx b/tests/ui/job-view/SecondaryNavBar_test.jsx index 5e5799e06b7..fcf5320f86a 100644 --- a/tests/ui/job-view/SecondaryNavBar_test.jsx +++ b/tests/ui/job-view/SecondaryNavBar_test.jsx @@ -19,7 +19,7 @@ const router = { location: history.location }; beforeEach(() => { fetchMock.get( - 'https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net/trees/autoland', + 'https://treestatus.prod.lando.prod.cloudops.mozgcp.net/trees/autoland', { result: { message_of_the_day: '', diff --git a/tests/ui/push-health/PlatformConfig_test.jsx b/tests/ui/push-health/PlatformConfig_test.jsx index 833881300bc..6c39ff917ff 100644 --- a/tests/ui/push-health/PlatformConfig_test.jsx +++ b/tests/ui/push-health/PlatformConfig_test.jsx @@ -18,14 +18,17 @@ const { jobs } = pushHealth; const testFailure = pushHealth.metrics.tests.details.needInvestigation[2]; beforeEach(() => { - fetchMock.get('https://treestatus.mozilla-releng.net/trees/autoland', { - result: { - message_of_the_day: '', - reason: '', - status: 'open', - tree: 'autoland', + fetchMock.get( + 'https://treestatus.prod.lando.prod.cloudops.mozgcp.net/trees/autoland', + { + result: { + message_of_the_day: '', + reason: '', + status: 'open', + tree: 'autoland', + }, }, - }); + ); setUrlParam('repo', repoName); fetchMock.get(getProjectUrl('/jobs/285857770/', repoName), fullJob); fetchMock.get(getProjectUrl('/jobs/285852303/', repoName), fullJob); diff --git a/treeherder/middleware.py b/treeherder/middleware.py index bda3f927c24..ed1e2f3dbdd 100644 --- a/treeherder/middleware.py +++ b/treeherder/middleware.py @@ -18,7 +18,7 @@ "font-src 'self' https://fonts.gstatic.com", # The `data:` is required for images that were inlined by webpack's url-loader (as an optimisation). "img-src 'self' data:", - "connect-src 'self' https://community-tc.services.mozilla.com https://firefox-ci-tc.services.mozilla.com https://*.taskcluster-artifacts.net https://taskcluster-artifacts.net https://treestatus.mozilla-releng.net https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net https://bugzilla.mozilla.org https://auth.mozilla.auth0.com https://stage.taskcluster.nonprod.cloudops.mozgcp.net https://insights-api.newrelic.com https://prototype.treeherder.nonprod.cloudops.mozgcp.net https://treeherder.allizom.org", + "connect-src 'self' https://community-tc.services.mozilla.com https://firefox-ci-tc.services.mozilla.com https://*.taskcluster-artifacts.net https://taskcluster-artifacts.net https://lando.services.mozilla.com https://bugzilla.mozilla.org https://auth.mozilla.auth0.com https://stage.taskcluster.nonprod.cloudops.mozgcp.net https://insights-api.newrelic.com https://prototype.treeherder.nonprod.cloudops.mozgcp.net https://treeherder.allizom.org", # Required since auth0-js performs session renewals in an iframe. "frame-src 'self' https://auth.mozilla.auth0.com", ] diff --git a/ui/helpers/constants.js b/ui/helpers/constants.js index 29f2853402f..28c88490213 100644 --- a/ui/helpers/constants.js +++ b/ui/helpers/constants.js @@ -4,41 +4,21 @@ import closedTreeFavicon from '../img/tree_closed.png'; export const thHosts = { production: { host: 'treeherder.mozilla.org', - treestatus: { - uiUrl: 'https://treestatus.mozilla-releng.net/static/ui/treestatus/', - apiUrl: 'https://treestatus.mozilla-releng.net/', - }, }, stage: { host: 'treeherder.allizom.org', - treestatus: { - uiUrl: 'https://ui.dev.lando.nonprod.cloudops.mozgcp.net/treestatus/', - apiUrl: 'https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net/', - }, }, prototype: { host: 'prototype.treeherder.nonprod.cloudops.mozgcp.net', - treestatus: { - uiUrl: 'https://ui.dev.lando.nonprod.cloudops.mozgcp.net/treestatus/', - apiUrl: 'https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net/', - }, }, localhost: { host: 'localhost', - treestatus: { - uiUrl: 'https://ui.dev.lando.nonprod.cloudops.mozgcp.net/treestatus/', - apiUrl: 'https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net/', - }, }, default: { host: null, treestatus: { - uiUrl: 'https://treestatus.mozilla-releng.net/static/ui/treestatus/', - apiUrl: 'https://treestatus.mozilla-releng.net/', - /* - uiUrl: 'https://ui.dev.lando.nonprod.cloudops.mozgcp.net/treestatus/', - apiUrl: 'https://treestatus.dev.lando.nonprod.cloudops.mozgcp.net/', - */ + uiUrl: 'https://lando.services.mozilla.com/treestatus/', + apiUrl: 'https://treestatus.prod.lando.prod.cloudops.mozgcp.net/', }, }, }; diff --git a/ui/job-view/headerbars/WatchedRepo.jsx b/ui/job-view/headerbars/WatchedRepo.jsx index 79882afc931..35af5dd63d8 100644 --- a/ui/job-view/headerbars/WatchedRepo.jsx +++ b/ui/job-view/headerbars/WatchedRepo.jsx @@ -199,7 +199,7 @@ export default class WatchedRepo extends React.Component { )} diff --git a/ui/models/treeStatus.js b/ui/models/treeStatus.js index cd7fd93dfb1..6ae641113f2 100644 --- a/ui/models/treeStatus.js +++ b/ui/models/treeStatus.js @@ -4,8 +4,8 @@ let _treeStatusApiUrl; let _treeStatusUiUrl; for (const [hostPrettyName, config] of Object.entries(thHosts)) { if (config.host === window.location.hostname) { - _treeStatusApiUrl = thHosts[hostPrettyName].treestatus.apiUrl; - _treeStatusUiUrl = thHosts[hostPrettyName].treestatus.uiUrl; + _treeStatusApiUrl = thHosts[hostPrettyName]?.treestatus?.apiUrl; + _treeStatusUiUrl = thHosts[hostPrettyName]?.treestatus?.uiUrl; } } if (_treeStatusApiUrl === undefined) {