Skip to content

Commit

Permalink
Fix sentry sourcemaps (#20122)
Browse files Browse the repository at this point in the history
* Update sentry/cli to 2.19.4

* Ensure sentry files are loaded and referenced with a valid url

* Temp to eliminate errors in sentry (should be split into other PRs)
  • Loading branch information
danjm authored Jul 21, 2023
1 parent e923110 commit e1722d7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,6 @@ function toMetamaskUrl(origUrl) {
if (!filePath) {
return origUrl;
}
const metamaskUrl = `metamask${filePath}`;
const metamaskUrl = `/metamask${filePath}`;
return metamaskUrl;
}
2 changes: 2 additions & 0 deletions development/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ async function defineAndRunBuildTasks() {
'navigator',
'harden',
'console',
'WeakSet',
'Event',
'Image', // Used by browser to generate notifications
// globals chromedriver needs to function
/cdc_[a-zA-Z0-9]+_[a-zA-Z]+/iu,
Expand Down
2 changes: 1 addition & 1 deletion development/sentry-upload-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function upload_sourcemaps {
local release="${1}"; shift
local dist_directory="${1}"; shift

sentry-cli releases files "${release}" upload-sourcemaps "${dist_directory}"/chrome/*.js "${dist_directory}"/sourcemaps/ --rewrite --url-prefix 'metamask'
sentry-cli releases files "${release}" upload-sourcemaps "${dist_directory}"/chrome/*.js "${dist_directory}"/sourcemaps/ --rewrite --url-prefix '/metamask'
}

function main {
Expand Down
16 changes: 8 additions & 8 deletions lavamoat/build-system/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1129,13 +1129,6 @@
"@metamask/jazzicon>color>color-convert>color-name": true
}
},
"@sentry/cli>mkdirp": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
}
},
"@storybook/addon-knobs>qs": {
"packages": {
"string.prototype.matchall>side-channel": true
Expand Down Expand Up @@ -8158,7 +8151,14 @@
"path.dirname": true
},
"packages": {
"@sentry/cli>mkdirp": true
"stylelint>file-entry-cache>flat-cache>write>mkdirp": true
}
},
"stylelint>file-entry-cache>flat-cache>write>mkdirp": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
}
},
"stylelint>global-modules": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
"@metamask/forwarder": "^1.1.0",
"@metamask/phishing-warning": "^2.1.0",
"@metamask/test-dapp": "^7.0.1",
"@sentry/cli": "^1.58.0",
"@sentry/cli": "^2.19.4",
"@storybook/addon-a11y": "^7.0.11",
"@storybook/addon-actions": "^7.0.11",
"@storybook/addon-essentials": "^7.0.11",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5687,18 +5687,18 @@ __metadata:
languageName: node
linkType: hard

"@sentry/cli@npm:^1.58.0":
version: 1.58.0
resolution: "@sentry/cli@npm:1.58.0"
"@sentry/cli@npm:^2.19.4":
version: 2.19.4
resolution: "@sentry/cli@npm:2.19.4"
dependencies:
https-proxy-agent: ^5.0.0
mkdirp: ^0.5.5
node-fetch: ^2.6.0
node-fetch: ^2.6.7
progress: ^2.0.3
proxy-from-env: ^1.1.0
which: ^2.0.2
bin:
sentry-cli: bin/sentry-cli
checksum: fc781bbffcf5cd970bb023168421ad89bca4184c2ddfbfddde92f4f5333c8b9075e9e16a8a4b192ecc3b197ac97062715e7b350c306ccc538fc01b955b06c3bb
checksum: 1f2442857a5eec2bc6f872a633d88fc2f11ed7f434db36627a034d904390f4cbbb4dccc33c571a8815e423cd36b863c72621298d49a1541b28370c7f7308f0dc
languageName: node
linkType: hard

Expand Down Expand Up @@ -24275,7 +24275,7 @@ __metadata:
"@reduxjs/toolkit": ^1.6.2
"@segment/loosely-validate-event": ^2.0.0
"@sentry/browser": ^7.53.0
"@sentry/cli": ^1.58.0
"@sentry/cli": ^2.19.4
"@sentry/integrations": ^7.53.0
"@sentry/types": ^7.53.0
"@sentry/utils": ^7.53.0
Expand Down Expand Up @@ -25863,7 +25863,7 @@ __metadata:
languageName: node
linkType: hard

"node-fetch@npm:^2, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.11, node-fetch@npm:^2.6.7, node-fetch@npm:~2.6.1":
"node-fetch@npm:^2, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.11, node-fetch@npm:^2.6.7, node-fetch@npm:~2.6.1":
version: 2.6.11
resolution: "node-fetch@npm:2.6.11"
dependencies:
Expand Down

0 comments on commit e1722d7

Please sign in to comment.