Skip to content

Revert squashed "meta: Update CHANGELOG for 7.45.0 (#7588)" #7592

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 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,8 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Lint source files
- name: Run linter
run: yarn lint
- name: Validate ES5 builds
run: yarn validate:es5

job_circular_dep_check:
name: Circular Dependency Check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flaky-test-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ jobs:
working-directory: packages/browser-integration-tests
env:
CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }}
# Run 50 times when detecting changed test(s), else run all tests 5x
TEST_RUN_COUNT: ${{ steps.changed.outputs.browser_integration == 'true' && 50 || 5 }}
# Run 100 times when detecting changed test(s), else run all tests 5x
TEST_RUN_COUNT: ${{ steps.changed.outputs.browser_integration == 'true' && 100 || 5 }}
17 changes: 0 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@

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

## 7.45.0

- build(cdn): Ensure ES5 bundles do not use non-ES5 code (#7550)
- feat(core): Add trace function (#7556)
- feat(hub): Make scope always defined on the hub (#7551)
- feat(replay): Add `replay_id` to transaction DSC (#7571)
- feat(replay): Capture fetch body size for replay events (#7524)
- feat(sveltekit): Add performance monitoring for client load (#7537)
- feat(sveltekit): Add performance monitoring to Sveltekit server handle (#7532)
- feat(sveltekit): Add SvelteKit routing instrumentation (#7565)
- fix(browser): Ensure keepalive flag is correctly set for parallel requests (#7553)
- fix(core): Ensure `ignoreErrors` only applies to error events (#7573)
- fix(node): Consider tracing error handler for process exit (#7558)
- fix(otel): Make sure we use correct hub on finish (#7577)
- fix(react): Handle case where error.cause already defined (#7557)
- fix(tracing): Account for case where startTransaction returns undefined (#7566)

## 7.44.2

- fix(cdn): Fix ES5 CDN bundles (#7544)
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"link:yarn": "lerna exec yarn link",
"lint": "lerna run lint",
"lint:eslint": "lerna run lint:eslint",
"validate:es5": "lerna run validate:es5",
"postpublish": "lerna run --stream --concurrency 1 postpublish",
"test": "lerna run --ignore @sentry-internal/* test",
"test:unit": "lerna run --ignore @sentry-internal/* test:unit",
Expand Down Expand Up @@ -90,7 +89,6 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
"jest-environment-node": "^27.5.1",
Expand Down
76 changes: 28 additions & 48 deletions packages/browser-integration-tests/scripts/detectFlakyTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,72 +6,52 @@ import { promisify } from 'util';
const exec = promisify(childProcess.exec);

async function run(): Promise<void> {
let testPaths: string[] = [];
let testPaths = getTestPaths();
let failed = [];

const changedPaths: string[] = process.env.CHANGED_TEST_PATHS ? JSON.parse(process.env.CHANGED_TEST_PATHS) : [];
try {
const changedPaths: string[] = process.env.CHANGED_TEST_PATHS ? JSON.parse(process.env.CHANGED_TEST_PATHS) : [];

if (changedPaths.length > 0) {
console.log(`Detected changed test paths:
if (changedPaths.length > 0) {
console.log(`Detected changed test paths:
${changedPaths.join('\n')}

`);

testPaths = getTestPaths().filter(p => changedPaths.some(changedPath => changedPath.includes(p)));
if (testPaths.length === 0) {
console.log('Could not find matching tests, aborting...');
process.exit(1);
testPaths = testPaths.filter(p => changedPaths.some(changedPath => changedPath.includes(p)));
}
} catch {
console.log('Could not detect changed test paths, running all tests.');
}

const cwd = path.join(__dirname, '../');
const runCount = parseInt(process.env.TEST_RUN_COUNT || '10');

try {
await new Promise<void>((resolve, reject) => {
const cp = childProcess.spawn(
`yarn playwright test ${
testPaths.length ? testPaths.join(' ') : './suites'
} --browser='all' --reporter='line' --repeat-each ${runCount}`,
{ shell: true, cwd },
);

let error: Error | undefined;

cp.stdout.on('data', data => {
console.log(data ? (data as object).toString() : '');
});

cp.stderr.on('data', data => {
console.log(data ? (data as object).toString() : '');
});

cp.on('error', e => {
console.error(e);
error = e;
});

cp.on('close', status => {
const err = error || (status !== 0 ? new Error(`Process exited with status ${status}`) : undefined);
for (const testPath of testPaths) {
console.log(`Running test: ${testPath}`);
const start = Date.now();

if (err) {
reject(err);
} else {
resolve();
}
try {
await exec(`yarn playwright test ${testPath} --browser='all' --repeat-each ${runCount}`, {
cwd,
});
});
} catch (error) {
console.log('');
console.log('');

console.error(`⚠️ Some tests failed.`);
console.error(error);
process.exit(1);
const end = Date.now();
console.log(` ☑️ Passed ${runCount} times, avg. duration ${Math.ceil((end - start) / runCount)}ms`);
} catch (error) {
logError(error);
failed.push(testPath);
}
}

console.log('');
console.log('');
console.log(`☑️ All tests passed.`);

if (failed.length > 0) {
console.error(`⚠️ ${failed.length} test(s) failed.`);
process.exit(1);
} else {
console.log(`☑️ ${testPaths.length} test(s) passed.`);
}
}

function getTestPaths(): string[] {
Expand Down
23 changes: 0 additions & 23 deletions packages/browser-integration-tests/suites/replay/dsc/init.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/browser-integration-tests/suites/replay/dsc/test.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';

sentryTest('parses response_body_size from Content-Length header if available', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -26,17 +22,7 @@ sentryTest('parses response_body_size from Content-Length header if available',
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -72,20 +58,4 @@ sentryTest('parses response_body_size from Content-Length header if available',
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'GET',
responseBodySize: 789,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';

sentryTest('does not capture response_body_size without Content-Length header', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -26,17 +22,7 @@ sentryTest('does not capture response_body_size without Content-Length header',
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -71,20 +57,4 @@ sentryTest('does not capture response_body_size without Content-Length header',
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'GET',
responseBodySize: 29,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { expect } from '@playwright/test';

import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequest } from '../../../../../utils/helpers';
import {
getCustomRecordingEvents,
shouldSkipReplayTest,
waitForReplayRequest,
} from '../../../../../utils/replayHelpers';
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';

sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestPath, page }) => {
if (shouldSkipReplayTest()) {
Expand All @@ -23,17 +19,7 @@ sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestP
});
});

await page.route('https://dsn.ingest.sentry.io/**/*', route => {
return route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ id: 'test-id' }),
});
});

const requestPromise = waitForErrorRequest(page);
const replayRequestPromise1 = waitForReplayRequest(page, 0);

const url = await getLocalTestPath({ testDir: __dirname });
await page.goto(url);

Expand Down Expand Up @@ -74,21 +60,4 @@ sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestP
url: 'http://localhost:7654/foo',
},
});

const replayReq1 = await replayRequestPromise1;
const { performanceSpans: performanceSpans1 } = getCustomRecordingEvents(replayReq1);
expect(performanceSpans1.filter(span => span.op === 'resource.fetch')).toEqual([
{
data: {
method: 'POST',
requestBodySize: 26,
responseBodySize: 24,
statusCode: 200,
},
description: 'http://localhost:7654/foo',
endTimestamp: expect.any(Number),
op: 'resource.fetch',
startTimestamp: expect.any(Number),
},
]);
});
Loading