Skip to content

feat(jest): enable profiling tests #40183

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 36 commits into from
Nov 7, 2022
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9472383
feat(jest): enable profiling tests
JonasBa Oct 13, 2022
3477cc6
deps(profiling): install the pkg
JonasBa Oct 18, 2022
2e79062
ci(profiling): test eager install
JonasBa Oct 19, 2022
3cccf77
test
JonasBa Oct 19, 2022
39106cc
test
JonasBa Oct 21, 2022
9969210
Merge branch 'master' into jb/profiling/jest-env
JonasBa Oct 25, 2022
bb2264a
Merge branch 'master' into jb/profiling/jest-env
JonasBa Oct 28, 2022
df7e3cd
Merge branch 'master' into jb/profiling/jest-env
JonasBa Oct 31, 2022
01a93d8
Merge branch 'master' into jb/profiling/jest-env
JonasBa Oct 31, 2022
bf53727
deps: bump profiling-node
JonasBa Oct 31, 2022
ed5d4b8
Merge branch 'master' into jb/profiling/jest-env
JonasBa Oct 31, 2022
253f5ee
deps: bump profiling-node
JonasBa Oct 31, 2022
075a338
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 1, 2022
c322abb
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 1, 2022
c3993f5
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 1, 2022
2014043
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 1, 2022
93d86e3
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 2, 2022
b0149a3
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 2, 2022
36fc183
deps: bump profiling-node
JonasBa Oct 31, 2022
f4033c1
deps(profiling): bump 0.0.5
JonasBa Nov 2, 2022
675c93c
deps(profiling): bump 0.0.6
JonasBa Nov 2, 2022
a137486
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 2, 2022
ccd4213
deps(profiling): test lazy logging
JonasBa Nov 2, 2022
5c75e14
Revert "deps(profiling): test lazy logging"
JonasBa Nov 2, 2022
082b8ed
deps(profiling): bump
JonasBa Nov 2, 2022
aeafeb2
deps(profiling): bump
JonasBa Nov 2, 2022
41a4fe9
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 3, 2022
446fa1e
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 3, 2022
47d0258
deps(profiling): bump
JonasBa Nov 3, 2022
133ea95
deps(profiling): bump
JonasBa Nov 3, 2022
ce9b245
style(lint): Auto commit lint changes
getsantry[bot] Nov 3, 2022
07fd760
bump profilin
JonasBa Nov 7, 2022
9108583
bump
JonasBa Nov 7, 2022
5894f04
Merge branch 'master' into jb/profiling/jest-env
JonasBa Nov 7, 2022
e571bb1
bump
JonasBa Nov 7, 2022
de67330
style(lint): Auto commit lint changes
getsantry[bot] Nov 7, 2022
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
8 changes: 4 additions & 4 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ jobs:
# https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
fetch-depth: '2'

- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0

- name: Install dependencies
run: yarn install --frozen-lockfile
@@ -87,7 +87,7 @@ jobs:
CI_NODE_TOTAL: 4
CI_NODE_INDEX: ${{ matrix.instance }}
run: |
JEST_TESTS=$(yarn -s jest --listTests --json) yarn test-ci --forceExit
SENTRY_PROFILER_LOGGING_MODE=eager JEST_TESTS=$(yarn -s jest --listTests --json) yarn test-ci --forceExit
- name: Save HTML artifacts
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
@@ -97,7 +97,7 @@ jobs:
path: .artifacts/visual-snapshots/jest

- name: Create Images from HTML
uses: getsentry/action-html-to-image@dc153dae538e6e1138f77156d8e62e3b2b897f41 # main
uses: getsentry/action-html-to-image@dc153dae538e6e1138f77156d8e62e3b2b897f41 # main
with:
base-path: .artifacts/visual-snapshots/jest
css-path: src/sentry/static/sentry/dist/entrypoints/sentry.css
@@ -138,7 +138,7 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
name: Checkout sentry

- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0

- name: Step configurations
id: config
6 changes: 3 additions & 3 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ jobs:
app_id: ${{ secrets.SENTRY_INTERNAL_APP_ID }}
private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }}

- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0

- name: Install dependencies
id: dependencies
@@ -110,7 +110,7 @@ jobs:
# If working tree is dirty, commit and update if we have a token
- name: Commit any eslint fixed files
if: steps.token.outcome == 'success' && github.ref != 'refs/heads/master'
uses: getsentry/action-github-commit@1761f891f036c3efc813b2ba963b121120c1587a # main
uses: getsentry/action-github-commit@1761f891f036c3efc813b2ba963b121120c1587a # main
with:
github-token: ${{ steps.token.outputs.token }}

@@ -143,7 +143,7 @@ jobs:
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0
- uses: getsentry/action-setup-volta@54775a59c41065f54ecc76d1dd5f2cdc7a1550cb # v1.1.0

- name: Install dependencies
run: yarn install --frozen-lockfile
3 changes: 2 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -264,7 +264,8 @@ const config: Config.InitialOptions = {
// jest project under Sentry organization (dev productivity team)
dsn: 'https://[email protected]/4857230',
environment: CI ? 'ci' : 'local',
tracesSampleRate: 1.0,
tracesSampleRate: 1,
profilesSampleRate: 0.1,
},
transactionOptions: {
tags: {
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -37,12 +37,13 @@
"@react-types/menu": "^3.3.0",
"@react-types/shared": "^3.8.0",
"@sentry-internal/global-search": "^0.3.0",
"@sentry/integrations": "7.15.0",
"@sentry/node": "7.15.0",
"@sentry/react": "7.15.0",
"@sentry/integrations": "7.17.4",
"@sentry/node": "7.17.4",
"@sentry/profiling-node": "^0.0.9",
"@sentry/react": "7.17.4",
"@sentry/release-parser": "^1.3.1",
"@sentry/tracing": "7.15.0",
"@sentry/utils": "7.15.0",
"@sentry/tracing": "7.17.4",
"@sentry/utils": "7.17.4",
"@tanstack/react-query": "^4.2.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.2",
@@ -165,6 +166,7 @@
"devDependencies": {
"@babel/plugin-transform-react-jsx-source": "^7.19.6",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
"@sentry/jest-environment": "^4.0.0-alpha.1",
"@size-limit/preset-small-lib": "^5.0.5",
"@storybook/addon-a11y": "6.5.12",
"@storybook/addon-actions": "6.5.12",
2 changes: 1 addition & 1 deletion tests/js/instrumentedEnv/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-env node */
const createEnvironment = require('jest-sentry-environment/createEnvironment');
const createEnvironment = require('@sentry/jest-environment/createEnvironment');

module.exports = createEnvironment({
baseEnvironment: require('@visual-snapshot/jest-environment'),
516 changes: 455 additions & 61 deletions yarn.lock

Large diffs are not rendered by default.