Skip to content

Commit d7e934e

Browse files
authored
Merge pull request #13459 from getsentry/prepare-release/8.27.0
meta: Update Changelog for 8.27.0
2 parents 7ef6da3 + bb2d34f commit d7e934e

File tree

181 files changed

+3295
-920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+3295
-920
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Install yarn dependencies"
2+
description: "Installs yarn dependencies and caches them."
3+
4+
outputs:
5+
cache_key:
6+
description: "The dependency cache key"
7+
value: ${{ steps.compute_lockfile_hash.outputs.hash }}
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
13+
# so no need to reinstall them
14+
- name: Compute dependency cache key
15+
id: compute_lockfile_hash
16+
run: echo "hash=dependencies-${{ hashFiles('yarn.lock', 'packages/*/package.json', 'dev-packages/*/package.json') }}" >> "$GITHUB_OUTPUT"
17+
shell: bash
18+
19+
- name: Check dependency cache
20+
uses: actions/cache@v4
21+
id: cache_dependencies
22+
with:
23+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
24+
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
25+
26+
- name: Install dependencies
27+
if: steps.cache_dependencies.outputs.cache-hit != 'true'
28+
run: yarn install --ignore-engines --frozen-lockfile
29+
shell: bash

.github/actions/install-playwright/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ runs:
1313
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
1414
shell: bash
1515

16-
- name: Cache playwright binaries
17-
uses: actions/cache@v4
16+
- name: Restore cached playwright binaries
17+
uses: actions/cache/restore@v4
1818
id: playwright-cache
1919
with:
2020
path: |
2121
~/.cache/ms-playwright
2222
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
2323

24+
# Only store cache on develop branch
25+
- name: Store cached playwright binaries
26+
uses: actions/cache/save@v4
27+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
28+
with:
29+
path: |
30+
~/.cache/ms-playwright
31+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
32+
2433
# We always install all browsers, if uncached
2534
- name: Install Playwright dependencies (uncached)
2635
run: npx playwright install chromium webkit firefox --with-deps

.github/workflows/build.yml

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,9 @@ jobs:
146146
with:
147147
node-version-file: 'package.json'
148148

149-
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
150-
# so no need to reinstall them
151-
- name: Compute dependency cache key
152-
id: compute_lockfile_hash
153-
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"
154-
155-
- name: Check dependency cache
156-
uses: actions/cache@v4
157-
id: cache_dependencies
158-
with:
159-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
160-
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
161-
162-
- name: Install dependencies
163-
if: steps.cache_dependencies.outputs.cache-hit != 'true'
164-
run: yarn install --ignore-engines --frozen-lockfile
149+
- name: Install Dependencies
150+
uses: ./.github/actions/install-dependencies
151+
id: install_dependencies
165152

166153
- name: Check for Affected Nx Projects
167154
uses: dkhunt27/[email protected]
@@ -200,7 +187,7 @@ jobs:
200187
run: yarn build
201188

202189
outputs:
203-
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
190+
dependency_cache_key: ${{ steps.install_dependencies.outputs.cache_key }}
204191
changed_node_integration: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry-internal/node-integration-tests') }}
205192
changed_remix: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry/remix') }}
206193
changed_node: ${{ needs.job_get_metadata.outputs.changed_ci == 'true' || contains(steps.checkForAffected.outputs.affected, '@sentry/node') }}
@@ -293,22 +280,9 @@ jobs:
293280
with:
294281
node-version-file: 'package.json'
295282

296-
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
297-
# so no need to reinstall them
298-
- name: Compute dependency cache key
299-
id: compute_lockfile_hash
300-
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"
301-
302-
- name: Check dependency cache
303-
uses: actions/cache@v4
304-
id: cache_dependencies
305-
with:
306-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
307-
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
308-
309-
- name: Install dependencies
310-
if: steps.cache_dependencies.outputs.cache-hit != 'true'
311-
run: yarn install --ignore-engines --frozen-lockfile
283+
- name: Install Dependencies
284+
uses: ./.github/actions/install-dependencies
285+
id: install_dependencies
312286

313287
- name: Check file formatting
314288
run: yarn lint:prettier && yarn lint:biome
@@ -480,7 +454,8 @@ jobs:
480454
strategy:
481455
fail-fast: false
482456
matrix:
483-
node: [14, 16, 18, 20, 22]
457+
# TODO(lforst): Unpin Node.js version 22 when https://github.com/protobufjs/protobuf.js/issues/2025 is resolved which broke the nodejs tests
458+
node: [14, 16, 18, 20, '22.6.0']
484459
steps:
485460
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
486461
uses: actions/checkout@v4
@@ -873,6 +848,7 @@ jobs:
873848
[
874849
'angular-17',
875850
'angular-18',
851+
'astro-4',
876852
'aws-lambda-layer-cjs',
877853
'aws-serverless-esm',
878854
'node-express',
@@ -977,6 +953,7 @@ jobs:
977953
with:
978954
path: ${{ github.workspace }}/packages/*/*.tgz
979955
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
956+
fail-on-cache-miss: true
980957

981958
- name: Install Playwright
982959
uses: ./.github/actions/install-playwright
@@ -1076,6 +1053,7 @@ jobs:
10761053
with:
10771054
path: ${{ github.workspace }}/packages/*/*.tgz
10781055
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
1056+
fail-on-cache-miss: true
10791057

10801058
- name: Install Playwright
10811059
uses: ./.github/actions/install-playwright
@@ -1446,6 +1424,7 @@ jobs:
14461424
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
14471425
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14481426
enableCrossOsArchive: true
1427+
fail-on-cache-miss: true
14491428

14501429
- name: Restore build cache
14511430
uses: actions/cache/restore@v4
@@ -1454,6 +1433,7 @@ jobs:
14541433
path: ${{ env.CACHED_BUILD_PATHS }}
14551434
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14561435
enableCrossOsArchive: true
1436+
fail-on-cache-miss: true
14571437

14581438
- name: Configure safe directory
14591439
run: |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Automation: Cleanup PR caches"
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
# `actions:write` permission is required to delete caches
12+
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
13+
actions: write
14+
contents: read
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Cleanup
20+
run: |
21+
gh extension install actions/gh-actions-cache
22+
23+
REPO=${{ github.repository }}
24+
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
25+
26+
echo "Fetching list of cache key"
27+
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
28+
29+
## Setting this to not fail the workflow while deleting cache keys.
30+
set +e
31+
echo "Deleting caches..."
32+
for cacheKey in $cacheKeysForPR
33+
do
34+
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
35+
done
36+
echo "Done"
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
"[typescript]": {
4343
"editor.defaultFormatter": "biomejs.biome"
4444
},
45-
"cSpell.words": ["arrayify"]
45+
"cSpell.words": ["arrayify", "OTEL"]
4646
}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,27 @@
1010

1111
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
1212

13+
## 8.27.0
14+
15+
### Important Changes
16+
17+
- **fix(nestjs): Exception filters in main app module are not being executed (#13278)**
18+
19+
With this release nestjs error monitoring is no longer automatically set up after adding the `SentryModule` to your
20+
application, which led to issues in certain scenarios. You will now have to either add the `SentryGlobalFilter` to
21+
your main module providers or decorate the `catch()` method in your existing global exception filters with the newly
22+
released `@WithSentry()` decorator. See the [docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/) for
23+
more details.
24+
25+
### Other Changes
26+
27+
- feat: Add options for passing nonces to feedback integration (#13347)
28+
- feat: Add support for SENTRY_SPOTLIGHT env var in Node (#13325)
29+
- feat(deps): bump @prisma/instrumentation from 5.17.0 to 5.18.0 (#13327)
30+
- fix(deno): Don't rely on `Deno.permissions.querySync` (#13378)
31+
32+
Work in this release was contributed by @charpeni. Thank you for your contribution!
33+
1334
## 8.26.0
1435

1536
### Important Changes

dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'fs';
2-
import path from 'path';
1+
import * as fs from 'fs';
2+
import * as path from 'path';
33
import { expect } from '@playwright/test';
44

55
import { TEST_HOST, sentryTest } from '../../../../utils/fixtures';
@@ -28,19 +28,22 @@ sentryTest('it does not download the SDK if the SDK was loaded in the meanwhile'
2828
});
2929
});
3030

31+
const tmpDir = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
32+
3133
await page.route(`${TEST_HOST}/*.*`, route => {
3234
const file = route.request().url().split('/').pop();
3335

3436
if (file === 'cdn.bundle.js') {
3537
cdnLoadedCount++;
3638
}
3739

38-
const filePath = path.resolve(__dirname, `./dist/${file}`);
40+
const filePath = path.resolve(tmpDir, `./${file}`);
3941

4042
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
4143
});
4244

43-
const url = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
45+
const url = `${TEST_HOST}/index.html`;
46+
4447
const req = await waitForErrorRequestOnUrl(page, url);
4548

4649
const eventData = envelopeRequestParser(req);

dev-packages/browser-integration-tests/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const config: PlaywrightTestConfig = {
3131
],
3232

3333
globalSetup: require.resolve('./playwright.setup.ts'),
34+
globalTeardown: require.resolve('./playwright.teardown.ts'),
3435
};
3536

3637
export default config;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as childProcess from 'child_process';
2+
3+
export default function globalTeardown(): void {
4+
childProcess.execSync('yarn clean', { stdio: 'inherit', cwd: process.cwd() });
5+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import * as Sentry from '@sentry/browser';
2+
// Import this separately so that generatePlugin can handle it for CDN scenarios
3+
import { feedbackIntegration } from '@sentry/browser';
4+
5+
window.Sentry = Sentry;
6+
7+
Sentry.init({
8+
dsn: 'https://[email protected]/1337',
9+
integrations: [
10+
feedbackIntegration({ tags: { from: 'integration init' }, styleNonce: 'foo1234', scriptNonce: 'foo1234' }),
11+
],
12+
});
13+
14+
document.addEventListener('securitypolicyviolation', () => {
15+
const container = document.querySelector('#csp-violation');
16+
if (container) {
17+
container.innerText = 'CSP Violation';
18+
}
19+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta
6+
http-equiv="Content-Security-Policy"
7+
content="style-src 'nonce-foo1234'; script-src sentry-test.io 'nonce-foo1234';"
8+
/>
9+
</head>
10+
<body>
11+
<div id="csp-violation" />
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)