Skip to content

Commit ef57767

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feat/offline
2 parents 3ba2356 + e7b9e64 commit ef57767

File tree

267 files changed

+5652
-1661
lines changed

Some content is hidden

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

267 files changed

+5652
-1661
lines changed

.git-blame-ignore-revs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Since version 2.23 (released in August 2019), git-blame has a feature
2+
# to ignore or bypass certain commits.
3+
#
4+
# This file contains a list of commits that are not likely what you
5+
# are looking for in a blame, such as mass reformatting or renaming.
6+
7+
# build: Add `@typescript-eslint/consistent-type-imports` rule (#6662)
8+
2aa4e94b036675245290596884959e06dcced044

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🐞 Bug Report
22
description: Tell us about something that's not working the way we (probably) intend.
3-
labels: ["Type: Bug"]
3+
labels: ['Type: Bug']
44
body:
55
- type: checkboxes
66
attributes:
@@ -27,19 +27,19 @@ body:
2727
attributes:
2828
label: Which package are you using?
2929
options:
30-
- "@sentry/angular"
31-
- "@sentry/browser"
32-
- "@sentry/ember"
33-
- "@sentry/gatsby"
34-
- "@sentry/nextjs"
35-
- "@sentry/node"
36-
- "@sentry/opentelemetry-node"
37-
- "@sentry/react"
38-
- "@sentry/remix"
39-
- "@sentry/serverless"
40-
- "@sentry/svelte"
41-
- "@sentry/vue"
42-
- "@sentry/wasm"
30+
- '@sentry/angular'
31+
- '@sentry/browser'
32+
- '@sentry/ember'
33+
- '@sentry/gatsby'
34+
- '@sentry/nextjs'
35+
- '@sentry/node'
36+
- '@sentry/opentelemetry-node'
37+
- '@sentry/react'
38+
- '@sentry/remix'
39+
- '@sentry/serverless'
40+
- '@sentry/svelte'
41+
- '@sentry/vue'
42+
- '@sentry/wasm'
4343
validations:
4444
required: true
4545
- type: input
@@ -54,14 +54,32 @@ body:
5454
id: framework-version
5555
attributes:
5656
label: Framework Version
57-
description: If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the _framework_ (not SDK) are you using?
57+
description:
58+
If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the
59+
_framework_ (not SDK) are you using?
5860
placeholder: ex. React 17.0.0
5961
- type: input
6062
id: link-to-sentry
6163
attributes:
6264
label: Link to Sentry event
63-
description: If applicable, provide a link to the affected event from your Sentry account. The event will only be viewable by Sentry staff.
65+
description:
66+
If applicable, provide a link to the affected event from your Sentry account. The event will only be viewable by
67+
Sentry staff.
6468
placeholder: https://sentry.io/organizations/<org-slug>/issues/<issue-id>/events/<event-id>/?project=<project-id>
69+
- type: textarea
70+
id: sdk-setup
71+
attributes:
72+
label: SDK Setup
73+
description: How do you set up your Sentry SDK? Please show us your `Sentry.init` options.
74+
placeholder: |-
75+
```javascript
76+
Sentry.init({
77+
dsn: __YOUR_DSN__
78+
...
79+
});
80+
```
81+
validations:
82+
required: false
6583
- type: textarea
6684
id: repro
6785
attributes:

.github/ISSUE_TEMPLATE/flaky.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ❅ Flaky Test
2+
description: Report a flaky test in CI
3+
title: '[Flaky CI]: '
4+
labels: ['Type: Tests']
5+
body:
6+
- type: dropdown
7+
id: type
8+
attributes:
9+
label: Flakiness Type
10+
description: What are you observing
11+
options:
12+
- Timeout
13+
- Assertion failure
14+
- Other / Unknown
15+
validations:
16+
required: true
17+
- type: input
18+
id: job-name
19+
attributes:
20+
label: Name of Job
21+
placeholder: Build & Test / Nextjs (Node 10) Tests
22+
description: name of job as reported in the status report
23+
validations:
24+
required: true
25+
- type: input
26+
id: test-name
27+
attributes:
28+
label: Name of Test
29+
placeholder: suites/replay/captureReplay/test.ts
30+
description: file name or function name of failing test
31+
validations:
32+
required: false
33+
- type: input
34+
id: test-run-link
35+
attributes:
36+
label: Link to Test Run
37+
placeholder: https://github.com/getsentry/sentry/runs/5582673807
38+
description: paste the URL to a test run showing the issue
39+
validations:
40+
required: true
41+
- type: textarea
42+
id: details
43+
attributes:
44+
label: Details
45+
description: If you know anything else, please add it here

.github/workflows/build.yml

Lines changed: 72 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ jobs:
191191
- name: Check build cache
192192
uses: actions/cache@v3
193193
id: cache_built_packages
194-
if: needs.job_get_metadata.outputs.force_skip_cache == 'false'
195194
with:
196195
path: ${{ env.CACHED_BUILD_PATHS }}
197196
key: ${{ env.BUILD_CACHE_KEY }}
@@ -486,57 +485,35 @@ jobs:
486485
with:
487486
path: ${{ env.CACHED_BUILD_PATHS }}
488487
key: ${{ env.BUILD_CACHE_KEY }}
488+
- name: Get npm cache directory
489+
id: npm-cache-dir
490+
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
491+
- name: Get Playwright version
492+
id: playwright-version
493+
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
494+
- uses: actions/cache@v3
495+
name: Check if Playwright browser is cached
496+
id: playwright-cache
497+
with:
498+
path: ${{ steps.npm-cache-dir.outputs.dir }}
499+
key: ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
500+
- name: Install Playwright browser if not cached
501+
if: steps.playwright-cache.outputs.cache-hit != 'true'
502+
continue-on-error: true # playwright needs node >= 14
503+
run: npx playwright install --with-deps
504+
env:
505+
PLAYWRIGHT_BROWSERS_PATH: ${{steps.npm-cache-dir.outputs.dir}}
506+
- name: Install OS dependencies of Playwright if cache hit
507+
if: steps.playwright-cache.outputs.cache-hit == 'true'
508+
continue-on-error: true # playwright needs node >= 14
509+
run: npx playwright install-deps
489510
- name: Run tests
490511
env:
491512
NODE_VERSION: ${{ matrix.node }}
492513
run: |
493514
cd packages/nextjs
494515
yarn test:integration
495516
496-
# Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
497-
# separate job allows them to run in parallel with the other tests.
498-
job_ember_tests:
499-
name: Ember (${{ matrix.scenario }}) Tests
500-
needs: [job_get_metadata, job_build]
501-
if: needs.job_get_metadata.outputs.changed_ember == 'true' || github.event_name != 'pull_request'
502-
timeout-minutes: 10
503-
runs-on: ubuntu-20.04
504-
strategy:
505-
fail-fast: false
506-
matrix:
507-
scenario: [ember-release, embroider-optimized, ember-4.0]
508-
steps:
509-
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
510-
uses: actions/checkout@v3
511-
with:
512-
ref: ${{ env.HEAD_COMMIT }}
513-
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
514-
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
515-
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
516-
# well, we can pull it out.
517-
fetch-depth: 0
518-
- name: Set up Node
519-
uses: actions/setup-node@v3
520-
with:
521-
# We support node 14+. If that works, we can safely assume that newer versions will also work.
522-
node-version: '14'
523-
- name: Check dependency cache
524-
uses: actions/cache@v3
525-
with:
526-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
527-
key: ${{ needs.job_build.outputs.dependency_cache_key }}
528-
- name: Check build cache
529-
uses: actions/cache@v3
530-
with:
531-
path: ${{ env.CACHED_BUILD_PATHS }}
532-
key: ${{ env.BUILD_CACHE_KEY }}
533-
- name: Run Ember tests
534-
run: |
535-
cd packages/ember
536-
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
537-
- name: Compute test coverage
538-
uses: codecov/codecov-action@v3
539-
540517
job_browser_playwright_tests:
541518
name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests
542519
needs: [job_get_metadata, job_build]
@@ -581,12 +558,10 @@ jobs:
581558
key: ${{ env.BUILD_CACHE_KEY }}
582559
- name: Get npm cache directory
583560
id: npm-cache-dir
584-
run: |
585-
echo "::set-output name=dir::$(npm config get cache)"
561+
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
586562
- name: Get Playwright version
587563
id: playwright-version
588-
run: |
589-
echo "::set-output name=version::$(node -p "require('@playwright/test/package.json').version")"
564+
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
590565
- uses: actions/cache@v3
591566
name: Check if Playwright browser is cached
592567
id: playwright-cache
@@ -805,7 +780,6 @@ jobs:
805780
job_browser_playwright_tests,
806781
job_browser_integration_tests,
807782
job_remix_integration_tests,
808-
job_ember_tests,
809783
]
810784
# Always run this, even if a dependent job failed
811785
if: always()
@@ -815,3 +789,51 @@ jobs:
815789
if: contains(needs.*.result, 'failure')
816790
run: |
817791
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
792+
793+
replay_metrics:
794+
name: Replay Metrics
795+
needs: [job_get_metadata, job_build]
796+
runs-on: ubuntu-20.04
797+
timeout-minutes: 30
798+
if: contains(github.event.pull_request.labels.*.name, 'ci-overhead-measurements')
799+
steps:
800+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
801+
uses: actions/checkout@v3
802+
with:
803+
ref: ${{ env.HEAD_COMMIT }}
804+
- name: Set up Node
805+
uses: volta-cli/action@v4
806+
- name: Check dependency cache
807+
uses: actions/cache@v3
808+
with:
809+
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
810+
key: ${{ needs.job_build.outputs.dependency_cache_key }}
811+
- name: Check build cache
812+
uses: actions/cache@v3
813+
with:
814+
path: ${{ env.CACHED_BUILD_PATHS }}
815+
key: ${{ env.BUILD_CACHE_KEY }}
816+
817+
- name: Setup
818+
run: yarn install
819+
working-directory: packages/replay/metrics
820+
821+
- name: Collect
822+
run: yarn ci:collect
823+
working-directory: packages/replay/metrics
824+
825+
- name: Process
826+
id: process
827+
run: yarn ci:process
828+
working-directory: packages/replay/metrics
829+
# Don't run on forks - the PR comment cannot be added.
830+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
831+
env:
832+
GITHUB_TOKEN: ${{ github.token }}
833+
834+
- name: Upload results
835+
uses: actions/upload-artifact@v3
836+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
837+
with:
838+
name: ${{ steps.process.outputs.artifactName }}
839+
path: ${{ steps.process.outputs.artifactPath }}

.github/workflows/canary.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818

1919
jobs:
2020
job_canary_test:
21-
name: Run Canary Tests
21+
name: Canary Tests
2222
runs-on: ubuntu-20.04
2323
timeout-minutes: 30
2424
steps:
@@ -55,3 +55,41 @@ jobs:
5555
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
5656
with:
5757
filename: .github/CANARY_FAILURE_TEMPLATE.md
58+
59+
job_ember_canary_test:
60+
name: Ember Canary Tests
61+
runs-on: ubuntu-20.04
62+
timeout-minutes: 30
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
scenario: [ember-release, embroider-optimized, ember-4.0]
67+
steps:
68+
- name: 'Check out current commit'
69+
uses: actions/checkout@v3
70+
with:
71+
ref: ${{ env.HEAD_COMMIT }}
72+
- name: Set up Node
73+
uses: volta-cli/action@v4
74+
75+
- name: Install dependencies
76+
run: yarn install --ignore-engines --frozen-lockfile
77+
78+
- name: Build dependencies
79+
run: |
80+
yarn lerna run build:types --scope=@sentry/ember --include-dependencies
81+
yarn lerna run build:transpile --scope=@sentry/ember --include-dependencies
82+
83+
- name: Run Ember tests
84+
run: |
85+
cd packages/ember
86+
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
87+
88+
- name: Create Issue
89+
if: failure()
90+
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
94+
with:
95+
filename: .github/CANARY_FAILURE_TEMPLATE.md

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ tmp.js
4747

4848
# eslint
4949
.eslintcache
50-
eslintcache/*
50+
**/eslintcache/*

.size-limit.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,10 @@ module.exports = [
7878
limit: '48 KB',
7979
ignore: ['@sentry/browser', '@sentry/utils', '@sentry/core', '@sentry/types'],
8080
},
81+
{
82+
name: '@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)',
83+
path: 'packages/tracing/build/bundles/bundle.tracing.replay.min.js',
84+
gzip: true,
85+
limit: '80 KB',
86+
},
8187
];

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@
3737
"internalConsoleOptions": "openOnSessionStart",
3838
"outputCapture": "std"
3939
},
40+
{
41+
"type": "node",
42+
"name": "Debug replay metrics collection script",
43+
"request": "launch",
44+
"cwd": "${workspaceFolder}/packages/replay/metrics/",
45+
"program": "${workspaceFolder}/packages/replay/metrics/configs/dev/collect.ts",
46+
"preLaunchTask": "Build Replay metrics script",
47+
},
48+
{
49+
"type": "node",
50+
"name": "Debug replay metrics processing script",
51+
"request": "launch",
52+
"cwd": "${workspaceFolder}/packages/replay/metrics/",
53+
"program": "${workspaceFolder}/packages/replay/metrics/configs/dev/process.ts",
54+
"preLaunchTask": "Build Replay metrics script",
55+
},
4056
// Run rollup using the config file which is in the currently active tab.
4157
{
4258
"name": "Debug rollup (config from open file)",

.vscode/tasks.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
"type": "npm",
88
"script": "predebug",
99
"path": "packages/nextjs/test/integration/",
10-
"detail": "Link the SDK (if not already linked) and build test app"
10+
"detail": "Link the SDK (if not already linked) and build test app",
11+
},
12+
{
13+
"label": "Build Replay metrics script",
14+
"type": "npm",
15+
"script": "build",
16+
"path": "packages/replay/metrics",
1117
}
1218
]
1319
}

0 commit comments

Comments
 (0)