Skip to content
Snippets Groups Projects
Commit e810e626 authored by Mike Greiling's avatar Mike Greiling :speech_balloon:
Browse files

Merge branch 'mrincon-sentry-double-integration' into 'master'

Install two versions of Sentry Client SDK

See merge request !102790



Merged-by: default avatarMike Greiling <mike@pixelcog.com>
Approved-by: default avatarDominic Couture <dcouture@gitlab.com>
Approved-by: Lukas Eipert's avatarLukas 'Eipi' Eipert <leipert@gitlab.com>
Approved-by: default avatarRichard Chong <rchong@gitlab.com>
Approved-by: Jon Jenkins's avatarJon Jenkins <jjenkins@gitlab.com>
Approved-by: default avatarSean McGivern <sean@gitlab.com>
Approved-by: default avatarMike Greiling <mike@pixelcog.com>
Co-authored-by: Miguel Rincon's avatarMiguel Rincon <mrincon@gitlab.com>
parents 35e780c4 654836ec
No related branches found
No related tags found
1 merge request!102790Install two versions of Sentry Client SDK
Pipeline #707088298 passed
......@@ -102,13 +102,49 @@
end
context 'when sentry is configured' do
let(:legacy_dsn) { 'dummy://abc@legacy-sentry.example.com/1' }
let(:dsn) { 'dummy://def@sentry.example.com/2' }
before do
stub_sentry_settings
stub_config_setting(host: 'gitlab.example.com')
end
it 'adds sentry path to CSP without user' do
expect(directives['connect_src']).to eq("'self' ws://gitlab.example.com dummy://example.com")
context 'when legacy sentry is configured' do
before do
allow(Gitlab.config.sentry).to receive(:enabled).and_return(true)
allow(Gitlab.config.sentry).to receive(:clientside_dsn).and_return(legacy_dsn)
allow(Gitlab::CurrentSettings).to receive(:sentry_enabled).and_return(false)
end
it 'adds legacy sentry path to CSP' do
expect(directives['connect_src']).to eq("'self' ws://gitlab.example.com dummy://legacy-sentry.example.com")
end
end
context 'when sentry is configured' do
before do
allow(Gitlab.config.sentry).to receive(:enabled).and_return(false)
allow(Gitlab::CurrentSettings).to receive(:sentry_enabled).and_return(true)
allow(Gitlab::CurrentSettings).to receive(:sentry_clientside_dsn).and_return(dsn)
end
it 'adds new sentry path to CSP' do
expect(directives['connect_src']).to eq("'self' ws://gitlab.example.com dummy://sentry.example.com")
end
end
context 'when legacy sentry and sentry are both configured' do
before do
allow(Gitlab.config.sentry).to receive(:enabled).and_return(true)
allow(Gitlab.config.sentry).to receive(:clientside_dsn).and_return(legacy_dsn)
allow(Gitlab::CurrentSettings).to receive(:sentry_enabled).and_return(true)
allow(Gitlab::CurrentSettings).to receive(:sentry_clientside_dsn).and_return(dsn)
end
it 'adds both sentry paths to CSP' do
expect(directives['connect_src']).to eq("'self' ws://gitlab.example.com dummy://legacy-sentry.example.com dummy://sentry.example.com")
end
end
end
......
......@@ -44,7 +44,7 @@ def current_user
let(:clientside_dsn) { 'https://xxx@sentry.example.com/1' }
let(:environment) { 'staging' }
describe 'sentry integration' do
describe 'legacy sentry integration' do
before do
stub_config(sentry: { enabled: true, clientside_dsn: clientside_dsn, environment: environment })
end
......@@ -57,7 +57,7 @@ def current_user
end
end
describe 'new sentry integration' do
describe 'sentry integration' do
before do
stub_application_setting(sentry_enabled: true)
stub_application_setting(sentry_clientside_dsn: clientside_dsn)
......
......@@ -1639,16 +1639,6 @@
resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-6.1.4-7.tgz#ef0b83ef40f64bc6704e13ae6624236a4a91fa6f"
integrity sha512-842WcLh0BErNgGE8rdqNh31VnqGQcklPQ7RXzQfA0ilQNZcU7AO+t576g1m//18Lk8m7cXZ8fIKA1YB41LKWAQ==
 
"@sentry/browser@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.30.0.tgz#c28f49d551db3172080caef9f18791a7fd39e3b3"
integrity sha512-rOb58ZNVJWh1VuMuBG1mL9r54nZqKeaIlwSlvzJfc89vyfd7n6tQ1UXMN383QBz/MS5H5z44Hy5eE+7pCrYAfw==
dependencies:
"@sentry/core" "5.30.0"
"@sentry/types" "5.30.0"
"@sentry/utils" "5.30.0"
tslib "^1.9.3"
"@sentry/core@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3"
......@@ -1660,6 +1650,15 @@
"@sentry/utils" "5.30.0"
tslib "^1.9.3"
 
"@sentry/core@7.21.1":
version "7.21.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.21.1.tgz#d0423282d90875625802dfe380f9657e9242b72b"
integrity sha512-Og5wEEsy24fNvT/T7IKjcV4EvVK5ryY2kxbJzKY6GU2eX+i+aBl+n/vp7U0Es351C/AlTkS+0NOUsp2TQQFxZA==
dependencies:
"@sentry/types" "7.21.1"
"@sentry/utils" "7.21.1"
tslib "^1.9.3"
"@sentry/hub@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100"
......@@ -1683,6 +1682,11 @@
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402"
integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==
 
"@sentry/types@7.21.1":
version "7.21.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.21.1.tgz#408a7b95a66ddc30c4359979594e03bee8f9fbdc"
integrity sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==
"@sentry/utils@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980"
......@@ -1691,6 +1695,14 @@
"@sentry/types" "5.30.0"
tslib "^1.9.3"
 
"@sentry/utils@7.21.1":
version "7.21.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.21.1.tgz#96582345178015fd32fe9159c25c44ccf2f99d2a"
integrity sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==
dependencies:
"@sentry/types" "7.21.1"
tslib "^1.9.3"
"@sinonjs/commons@^1.7.0":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217"
......@@ -10853,6 +10865,26 @@ send@0.17.2:
range-parser "~1.2.1"
statuses "~1.5.0"
 
"sentrybrowser5@npm:@sentry/browser@5.30.0":
version "5.30.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.30.0.tgz#c28f49d551db3172080caef9f18791a7fd39e3b3"
integrity sha512-rOb58ZNVJWh1VuMuBG1mL9r54nZqKeaIlwSlvzJfc89vyfd7n6tQ1UXMN383QBz/MS5H5z44Hy5eE+7pCrYAfw==
dependencies:
"@sentry/core" "5.30.0"
"@sentry/types" "5.30.0"
"@sentry/utils" "5.30.0"
tslib "^1.9.3"
"sentrybrowser7@npm:@sentry/browser@^7.21.1":
version "7.21.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.21.1.tgz#bffa3ea19050c06400107d2297b9802f9719f98b"
integrity sha512-cS2Jz2+fs9+4pJqLJPtYqGyY97ywJDWAWIR1Yla3hs1QQuH6m0Nz3ojZD1gE2eKH9mHwkGbnNAh+hHcrYrfGzw==
dependencies:
"@sentry/core" "7.21.1"
"@sentry/types" "7.21.1"
"@sentry/utils" "7.21.1"
tslib "^1.9.3"
serialize-javascript@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment