Skip to content

meta: Update Changelog for 8.27.0 #13459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
20a8d8c
ci: Fail on cache restore where necessary (#13349)
mydea Aug 13, 2024
479668b
ci: Automatically clear caches for closed PRs (#13354)
mydea Aug 13, 2024
55220cf
feat: Add support for SENTRY_SPOTLIGHT env var in Node (#13325)
BYK Aug 13, 2024
51ef02d
fix(nestjs): Exception filters in main app module are not being execu…
nicohrubec Aug 13, 2024
7093d92
feat(deps): bump @prisma/instrumentation from 5.17.0 to 5.18.0 (#13327)
dependabot[bot] Aug 14, 2024
e517526
Merge remote-tracking branch 'origin/develop' into lforst-sync-gitflow
Aug 14, 2024
ecc299d
ci: Streamline some caching (#13355)
mydea Aug 14, 2024
44641f0
Merge pull request #13371 from getsentry/lforst-sync-gitflow
Aug 14, 2024
921e529
ci: Streamline browser & node unit tests (#13307)
mydea Aug 14, 2024
e3d73ca
fix(solidstart): Make back navigation test less flaky (#13374)
andreiborza Aug 14, 2024
140b81d
ci: Only store playwright cache on develop (#13358)
mydea Aug 14, 2024
63c4a90
feat: Add options for passing nonces to feedback integration (#13347)
chargome Aug 14, 2024
0af5b4f
ci: Improve size-limit CI action (#13348)
mydea Aug 14, 2024
23980a0
test: Ensure browser-integration-tests cannot conflict due to build (…
mydea Aug 14, 2024
fc319ea
Revert "build: Bump node to 22.5.1" (#13367)
AbhiPrasad Aug 14, 2024
f790f05
fix(deno): Don't rely on `Deno.permissions.querySync` (#13378)
Aug 14, 2024
7aebf94
test(e2e): Fix flake in default browser e2e test (#13379)
Lms24 Aug 14, 2024
5c08d03
test(e2e): Add Astro 4 E2E test app (#13375)
Lms24 Aug 14, 2024
d73808a
docs: Fix v7 changelog format and link (#13395)
charpeni Aug 16, 2024
a8c0a3b
ci: Fix crypto not being available (#13385)
Aug 16, 2024
615c670
ref: Add external contributor to CHANGELOG.md (#13400)
github-actions[bot] Aug 16, 2024
89eab5b
meta: Update Changelog for 8.27.0
nicohrubec Aug 26, 2024
9d7c483
meta: fix formatting
nicohrubec Aug 26, 2024
bb2d34f
ci: Pin node 22 for Node.js unit tests
Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Install yarn dependencies"
description: "Installs yarn dependencies and caches them."

outputs:
cache_key:
description: "The dependency cache key"
value: ${{ steps.compute_lockfile_hash.outputs.hash }}

runs:
using: "composite"
steps:
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "hash=dependencies-${{ hashFiles('yarn.lock', 'packages/*/package.json', 'dev-packages/*/package.json') }}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Check dependency cache
uses: actions/cache@v4
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_lockfile_hash.outputs.hash }}

- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: yarn install --ignore-engines --frozen-lockfile
shell: bash
13 changes: 11 additions & 2 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ runs:
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
shell: bash

- name: Cache playwright binaries
uses: actions/cache@v4
- name: Restore cached playwright binaries
uses: actions/cache/restore@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# Only store cache on develop branch
- name: Store cached playwright binaries
uses: actions/cache/save@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
with:
path: |
~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}

# We always install all browsers, if uncached
- name: Install Playwright dependencies (uncached)
run: npx playwright install chromium webkit firefox --with-deps
Expand Down
48 changes: 14 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,9 @@ jobs:
with:
node-version-file: 'package.json'

# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"

- name: Check dependency cache
uses: actions/cache@v4
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_lockfile_hash.outputs.hash }}

- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: yarn install --ignore-engines --frozen-lockfile
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
id: install_dependencies

- name: Check for Affected Nx Projects
uses: dkhunt27/[email protected]
Expand Down Expand Up @@ -200,7 +187,7 @@ jobs:
run: yarn build

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

# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "hash=${{ hashFiles('yarn.lock', '**/package.json') }}" >> "$GITHUB_OUTPUT"

- name: Check dependency cache
uses: actions/cache@v4
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_lockfile_hash.outputs.hash }}

- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: yarn install --ignore-engines --frozen-lockfile
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
id: install_dependencies

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

- name: Install Playwright
uses: ./.github/actions/install-playwright
Expand Down Expand Up @@ -1076,6 +1053,7 @@ jobs:
with:
path: ${{ github.workspace }}/packages/*/*.tgz
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
fail-on-cache-miss: true

- name: Install Playwright
uses: ./.github/actions/install-playwright
Expand Down Expand Up @@ -1446,6 +1424,7 @@ jobs:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_build.outputs.dependency_cache_key }}
enableCrossOsArchive: true
fail-on-cache-miss: true

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

- name: Configure safe directory
run: |
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/cleanup-pr-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Automation: Cleanup PR caches"
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
# 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
actions: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache

REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge

echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.words": ["arrayify"]
"cSpell.words": ["arrayify", "OTEL"]
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@

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

## 8.27.0

### Important Changes

- **fix(nestjs): Exception filters in main app module are not being executed (#13278)**

With this release nestjs error monitoring is no longer automatically set up after adding the `SentryModule` to your
application, which led to issues in certain scenarios. You will now have to either add the `SentryGlobalFilter` to
your main module providers or decorate the `catch()` method in your existing global exception filters with the newly
released `@WithSentry()` decorator. See the [docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/) for
more details.

### Other Changes

- feat: Add options for passing nonces to feedback integration (#13347)
- feat: Add support for SENTRY_SPOTLIGHT env var in Node (#13325)
- feat(deps): bump @prisma/instrumentation from 5.17.0 to 5.18.0 (#13327)
- fix(deno): Don't rely on `Deno.permissions.querySync` (#13378)

Work in this release was contributed by @charpeni. Thank you for your contribution!

## 8.26.0

### Important Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs';
import path from 'path';
import * as fs from 'fs';
import * as path from 'path';
import { expect } from '@playwright/test';

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

const tmpDir = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });

await page.route(`${TEST_HOST}/*.*`, route => {
const file = route.request().url().split('/').pop();

if (file === 'cdn.bundle.js') {
cdnLoadedCount++;
}

const filePath = path.resolve(__dirname, `./dist/${file}`);
const filePath = path.resolve(tmpDir, `./${file}`);

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

const url = await getLocalTestUrl({ testDir: __dirname, skipRouteHandler: true });
const url = `${TEST_HOST}/index.html`;

const req = await waitForErrorRequestOnUrl(page, url);

const eventData = envelopeRequestParser(req);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const config: PlaywrightTestConfig = {
],

globalSetup: require.resolve('./playwright.setup.ts'),
globalTeardown: require.resolve('./playwright.teardown.ts'),
};

export default config;
5 changes: 5 additions & 0 deletions dev-packages/browser-integration-tests/playwright.teardown.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as childProcess from 'child_process';

export default function globalTeardown(): void {
childProcess.execSync('yarn clean', { stdio: 'inherit', cwd: process.cwd() });
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as Sentry from '@sentry/browser';
// Import this separately so that generatePlugin can handle it for CDN scenarios
import { feedbackIntegration } from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [
feedbackIntegration({ tags: { from: 'integration init' }, styleNonce: 'foo1234', scriptNonce: 'foo1234' }),
],
});

document.addEventListener('securitypolicyviolation', () => {
const container = document.querySelector('#csp-violation');
if (container) {
container.innerText = 'CSP Violation';
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta
http-equiv="Content-Security-Policy"
content="style-src 'nonce-foo1234'; script-src sentry-test.io 'nonce-foo1234';"
/>
</head>
<body>
<div id="csp-violation" />
</body>
</html>
Loading
Loading