diff --git a/.craft.yml b/.craft.yml index b71317f2a62c..bf775c7a276a 100644 --- a/.craft.yml +++ b/.craft.yml @@ -25,28 +25,30 @@ targets: - name: registry sdks: 'npm:@sentry/browser': - onlyIfPresent: /^sentry-browser-.*\.tgz$/ + onlyIfPresent: /^sentry-browser-\d.*\.tgz$/ includeNames: /\.js$/ checksums: - algorithm: sha384 format: base64 'npm:@sentry/node': - onlyIfPresent: /^sentry-node-.*\.tgz$/ + onlyIfPresent: /^sentry-node-\d.*\.tgz$/ 'npm:@sentry/react': - onlyIfPresent: /^sentry-react-.*\.tgz$/ + onlyIfPresent: /^sentry-react-\d.*\.tgz$/ 'npm:@sentry/vue': - onlyIfPresent: /^sentry-vue-.*\.tgz$/ + onlyIfPresent: /^sentry-vue-\d.*\.tgz$/ 'npm:@sentry/gatsby': - onlyIfPresent: /^sentry-gatsby-.*\.tgz$/ + onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/ + 'npm:@sentry/angular-ivy': + onlyIfPresent: /^sentry-angular-ivy-\d.*\.tgz$/ 'npm:@sentry/angular': - onlyIfPresent: /^sentry-angular-.*\.tgz$/ + onlyIfPresent: /^sentry-angular-\d.*\.tgz$/ 'npm:@sentry/wasm': - onlyIfPresent: /^sentry-wasm-.*\.tgz$/ + onlyIfPresent: /^sentry-wasm-\d.*\.tgz$/ 'npm:@sentry/nextjs': - onlyIfPresent: /^sentry-nextjs-.*\.tgz$/ + onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/ 'npm:@sentry/remix': - onlyIfPresent: /^sentry-remix-.*\.tgz$/ + onlyIfPresent: /^sentry-remix-\d.*\.tgz$/ 'npm:@sentry/svelte': - onlyIfPresent: /^sentry-svelte-.*\.tgz$/ + onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/ 'npm:@sentry/opentelemetry-node': - onlyIfPresent: /^sentry-opentelemetry-node-.*\.tgz$/ + onlyIfPresent: /^sentry-opentelemetry-node-\d.*\.tgz$/ diff --git a/.github/actions/restore-cache/action.yml b/.github/actions/restore-cache/action.yml new file mode 100644 index 000000000000..14fe63bcf69c --- /dev/null +++ b/.github/actions/restore-cache/action.yml @@ -0,0 +1,25 @@ +name: "Restore dependency & build cache" +description: "Restore the dependency & build cache." + +runs: + using: "composite" + steps: + - name: Check dependency cache + id: dep-cache + uses: actions/cache/restore@v3 + with: + path: ${{ env.CACHED_DEPENDENCY_PATHS }} + key: ${{ env.DEPENDENCY_CACHE_KEY }} + + - name: Check build cache + uses: actions/cache/restore@v3 + id: build-cache + with: + path: ${{ env.CACHED_BUILD_PATHS }} + key: ${{ env.BUILD_CACHE_KEY }} + + - name: Check if caches are restored + uses: actions/github-script@v6 + if: steps.dep-cache.outputs.cache-hit != 'true' || steps.build-cache.outputs.cache-hit != 'true' + with: + script: core.setFailed('Dependency or build cache could not be restored - please re-run ALL jobs.') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe7ef7ccb174..981133613300 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,11 +192,13 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 + - name: Check dependency cache - uses: actions/cache@v3 + uses: actions/cache/restore@v3 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_install_deps.outputs.dependency_cache_key }} + fail-on-cache-miss: true - name: Check build cache uses: actions/cache@v3 @@ -245,16 +247,11 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} + - name: Get SDK version # `jq` reads JSON files, and `tee` pipes its input to the given location and to stdout. (Adding `-a` is the # equivalent of using >> rather than >.) @@ -289,16 +286,10 @@ jobs: # The size limit action runs `yarn` and `yarn build` when this job is executed on # use Node 14 for now. node-version: '14' - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Check bundle sizes uses: getsentry/size-limit-action@runForBranch with: @@ -323,16 +314,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run linter run: yarn lint @@ -348,16 +333,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run madge run: yarn circularDepCheck @@ -374,16 +353,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Pack run: yarn build:tarball - name: Archive artifacts @@ -411,16 +384,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ env.DEFAULT_NODE_VERSION }} - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run tests env: NODE_VERSION: 16 @@ -446,16 +413,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run tests env: NODE_VERSION: ${{ matrix.node }} @@ -474,7 +435,7 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14, 16, '18.13.0'] + node: [10, 12, 14, 16, 18] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v3 @@ -484,16 +445,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Get npm cache directory id: npm-cache-dir run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT @@ -507,14 +462,12 @@ jobs: path: ${{ steps.npm-cache-dir.outputs.dir }} key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}} - name: Install Playwright browser if not cached - if: steps.playwright-cache.outputs.cache-hit != 'true' - continue-on-error: true # playwright needs node >= 14 + if: steps.playwright-cache.outputs.cache-hit != 'true' && matrix.node >= 14 run: npx playwright install --with-deps env: PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}} - name: Install OS dependencies of Playwright if cache hit - if: steps.playwright-cache.outputs.cache-hit == 'true' - continue-on-error: true # playwright needs node >= 14 + if: steps.playwright-cache.outputs.cache-hit == 'true' && matrix.node >= 14 run: npx playwright install-deps - name: Run tests env: @@ -558,16 +511,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Get npm cache directory id: npm-cache-dir run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT @@ -616,16 +563,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run integration tests env: KARMA_BROWSER: ${{ matrix.browser }} @@ -646,16 +587,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run browser build tests run: | cd packages/browser @@ -684,16 +619,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run integration tests env: NODE_VERSION: ${{ matrix.node }} @@ -720,16 +649,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Run integration tests env: NODE_VERSION: ${{ matrix.node }} @@ -754,16 +677,10 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Get node version id: versions run: | @@ -802,8 +719,8 @@ jobs: run: | echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1 - replay_metrics: - name: Replay Metrics + overhead_metrics: + name: Overhead metrics needs: [job_get_metadata, job_build] runs-on: ubuntu-20.04 timeout-minutes: 30 @@ -817,29 +734,19 @@ jobs: ref: ${{ env.HEAD_COMMIT }} - name: Set up Node uses: volta-cli/action@v4 - - name: Check dependency cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - - name: Check build cache - uses: actions/cache/restore@v3 - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ env.BUILD_CACHE_KEY }} - - - name: Setup - run: yarn install - working-directory: packages/replay/metrics + - name: Restore caches + uses: ./.github/actions/restore-cache + env: + DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Collect run: yarn ci:collect - working-directory: packages/replay/metrics + working-directory: packages/overhead-metrics - name: Process id: process run: yarn ci:process - working-directory: packages/replay/metrics + working-directory: packages/overhead-metrics # Don't run on forks - the PR comment cannot be added. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: diff --git a/.vscode/launch.json b/.vscode/launch.json index 6092a79fb1f6..2fd396c8ddbf 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -37,22 +37,6 @@ "internalConsoleOptions": "openOnSessionStart", "outputCapture": "std" }, - { - "type": "node", - "name": "Debug replay metrics collection script", - "request": "launch", - "cwd": "${workspaceFolder}/packages/replay/metrics/", - "program": "${workspaceFolder}/packages/replay/metrics/configs/dev/collect.ts", - "preLaunchTask": "Build Replay metrics script", - }, - { - "type": "node", - "name": "Debug replay metrics processing script", - "request": "launch", - "cwd": "${workspaceFolder}/packages/replay/metrics/", - "program": "${workspaceFolder}/packages/replay/metrics/configs/dev/process.ts", - "preLaunchTask": "Build Replay metrics script", - }, // Run rollup using the config file which is in the currently active tab. { "name": "Debug rollup (config from open file)", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e68b7996f8e9..636302bff454 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,19 +1,13 @@ { // See https://go.microsoft.com/fwlink/?LinkId=733558 for documentation about `tasks.json` syntax - "version": "2.0.0", - "tasks": [ - { - "label": "Prepare nextjs integration test app for VSCode debugger", - "type": "npm", - "script": "predebug", - "path": "packages/nextjs/test/integration/", - "detail": "Link the SDK (if not already linked) and build test app", - }, - { - "label": "Build Replay metrics script", - "type": "npm", - "script": "build", - "path": "packages/replay/metrics", - } - ] + "version": "2.0.0", + "tasks": [ + { + "label": "Prepare nextjs integration test app for VSCode debugger", + "type": "npm", + "script": "predebug", + "path": "packages/nextjs/test/integration/", + "detail": "Link the SDK (if not already linked) and build test app" + } + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 47e7dc958145..fdf1477a0370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.40.0 + +- feat(nextjs): Automatically resolve source of errors in dev mode (#7294) +- feat(vue): Log errors to the console by default (#7310) +- fix(ember): Disable performance in FastBoot (#7282) +- fix(serverless): Capture custom tags in error events of GCP functions (#7298) +- fix(serverless): Capture custom tags in GCP Background and CloudEvent function error events (#7301) + ## 7.39.0 This release adds a new package, `@sentry/angular-ivy`, which is our Angular SDK with full support for Angular's rendering engine, Ivy. diff --git a/package.json b/package.json index 17fd235608b7..f44c07492703 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "packages/hub", "packages/integration-tests", "packages/integrations", + "packages/overhead-metrics", "packages/nextjs", "packages/node", "packages/node-integration-tests", diff --git a/packages/browser/package.json b/packages/browser/package.json index 69d825d09c55..f7ca4ddee5cf 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -40,7 +40,7 @@ "karma-typescript-es6-transform": "^4.0.0", "karma-webkit-launcher": "^1.0.2", "node-fetch": "^2.6.0", - "playwright": "^1.27.1", + "playwright": "^1.31.1", "sinon": "^7.3.2", "webpack": "^4.30.0" }, diff --git a/packages/core/test/lib/transports/offline.test.ts b/packages/core/test/lib/transports/offline.test.ts index eebe7c8874ed..0779dff6a8d7 100644 --- a/packages/core/test/lib/transports/offline.test.ts +++ b/packages/core/test/lib/transports/offline.test.ts @@ -326,7 +326,7 @@ describe('makeOfflineTransport', () => { expect(getCalls()).toEqual([]); }); - it( + it.skip( 'Follows the Retry-After header', async () => { const { getCalls, store } = createTestStore(ERROR_ENVELOPE); diff --git a/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts b/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts index dabfa9c23619..289976304812 100644 --- a/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts +++ b/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts @@ -24,7 +24,7 @@ const config: PlaywrightTestConfig = { /* Opt out of parallel tests on CI. */ workers: 1, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'dot', + reporter: 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx new file mode 100644 index 000000000000..b1d7f708cfae --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/client-component/page.tsx @@ -0,0 +1,17 @@ +'use client'; + +export default function Page() { + return ( +
Press to throw:
+ +