Skip to content

Commit

Permalink
Merge branch 'master' into mdtro/apitoken-name-fe
Browse files Browse the repository at this point in the history
  • Loading branch information
oioki authored Feb 14, 2024
2 parents c46489e + b103829 commit 285de9e
Show file tree
Hide file tree
Showing 999 changed files with 25,212 additions and 11,287 deletions.
30 changes: 25 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */

const isRelaxed = !!process.env.SENTRY_ESLINT_RELAXED;
const isCi = !!process.env.CI;
Expand Down Expand Up @@ -32,6 +31,18 @@ module.exports = {
{additionalHooks: ADDITIONAL_HOOKS_TO_CHECK_DEPS_FOR},
],
...(!isRelaxed && !isCi ? strictRulesNotCi : {}),

// TODO(@anonrig): Remove this from eslint-sentry-config
'space-infix-ops': 'off',
'object-shorthand': 'off',
'object-curly-spacing': 'off',
'import/no-amd': 'off',
'no-danger-with-children': 'off',
'no-fallthrough': 'off',
'no-obj-calls': 'off',
'array-bracket-spacing': 'off',
'computed-property-spacing': 'off',
'react/no-danger-with-children': 'off',
},
// JSON file formatting is handled by Biome. ESLint should not be linting
// and formatting these files.
Expand All @@ -40,10 +51,19 @@ module.exports = {
{
files: ['tests/js/**/*.{ts,js}'],
extends: ['plugin:testing-library/react', 'sentry-app/strict'],
},
{
files: ['*.ts', '*.tsx'],
rules: {},
rules: {
// TODO(@anonrig): Remove this from eslint-sentry-config
'space-infix-ops': 'off',
'object-shorthand': 'off',
'object-curly-spacing': 'off',
'import/no-amd': 'off',
'no-danger-with-children': 'off',
'no-fallthrough': 'off',
'no-obj-calls': 'off',
'array-bracket-spacing': 'off',
'computed-property-spacing': 'off',
'react/no-danger-with-children': 'off',
},
},
{
// We specify rules explicitly for the sdk-loader here so we do not have
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ updates:

# We ignore everything that hasn't yet been upgrade, this way we will
# only get the _freshest_ of new packages to consider upgrading
- dependency-name: '@types/marked'
- dependency-name: '@types/react-router'
- dependency-name: '@types/react-select'
- dependency-name: '@types/reflux'
- dependency-name: 'babel-jest'
- dependency-name: 'gettext-parser'
- dependency-name: 'jest-junit'
- dependency-name: 'marked'
- dependency-name: 'react-lazyload'
- dependency-name: 'react-refresh'
- dependency-name: 'react-router'
Expand Down
11 changes: 6 additions & 5 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,13 @@ backend_any_type: &backend_any_type
- *api_docs

migrations_added:
- added: 'src/sentry/migrations/*'
- added:
- 'src/sentry/migrations/*'
- 'src/sentry/feedback/migrations/*'
- 'src/sentry/hybridcloud/migrations/*'
- 'src/sentry/replays/migrations/*'

migrations_modified:
- modified: 'src/sentry/migrations/*'

# These files will trigger our wokrflow to check if lockfile
# These files will trigger our workflow to check if lockfile
# updates are needed
migration_lockfile:
- *backend_dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
- name: run tests
run: |
# historic migrations trigger some warnings
PYTEST_ADDOPTS="$PYTEST_ADDOPTS -m migrations --migrations -W ignore" make test-python-ci
PYTEST_ADDOPTS="$PYTEST_ADDOPTS -m migrations --migrations" make test-python-ci
# Upload coverage data even if running the tests step fails since
# it reduces large coverage fluctuations
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
id: file
run: |
echo 'added<<EOF' >> "$GITHUB_OUTPUT"
git diff --diff-filter=A --name-only origin/master HEAD -- 'src/sentry/*/migrations/' 'src/sentry/migrations/' >> "$GITHUB_OUTPUT"
git diff --diff-filter=A --name-only origin/master HEAD -- 'src/sentry/*/migrations/*' 'src/sentry/migrations/*' >> "$GITHUB_OUTPUT"
echo 'EOF' >> "$GITHUB_OUTPUT"
- name: Generate SQL for migration
Expand Down
32 changes: 32 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
24.1.2
------

### Various fixes & improvements

- ref(api): Make processing team endpoints private (#63939) by @loewenheim
- feat(issue-priority): Add priority column to issue stream (#64820) by @malwilley
- Revert "ref: upgrade hiredis (#64789)" (782b0f44) by @getsentry-bot
- feat(issue-details): Show static replay when error is not within the replay (#64827) by @malwilley
- ref(sdk): Remove excessive json.loads spans (#64883) by @k-fish
- fix(integrations): phabricator host validation (#64882) by @oioki
- feat(integrations): Autofill project in selector after project creation modal (#64791) by @roggenkemper
- ref(replay): remove 'new' badge from selector widgets & tab (#64848) by @michellewzhang
- fix(replays): check before attempting to load in onboarding doc (#64842) by @michellewzhang
- fix(ddm): Handle all and my projects (#64877) by @ArthurKnaus
- ref: upgrade hiredis (#64789) by @asottile-sentry
- fix(replays): Move code requiring exception-prone variables into try block (#64658) by @cmanallen
- Sprinkle some tracing around more `save_event` functions (#64869) by @Swatinem
- fix(ddm): Focused series backwards compatibility (#64868) by @ArthurKnaus
- ref: Add option to throttle proguard processing (#64866) by @loewenheim
- ref(similarity-embeddings): Remove unused organization level flag (#64815) by @jangjodi
- ref: upgrade psycopg2-binary (#64809) by @asottile-sentry
- fix(ddm): Global loading state on zoom (#64861) by @ArthurKnaus
- fix(ddm): project param rename (#64860) by @obostjancic
- fix(ddm): Clicking chart hides tooltip (#64859) by @ArthurKnaus
- feat(ddm): Multiple focused series (#64855) by @ArthurKnaus
- feat(ddm): Add new metrics/query endpoint base code (#64785) by @iambriccardo
- feat(stats): metrics stats (#64790) by @obostjancic
- ref(feedback): add analytics for mark as spam buttons (#64850) by @michellewzhang

_Plus 606 more_

24.1.1
------

Expand Down
5 changes: 2 additions & 3 deletions api-docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* global process */
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */
/* eslint import/no-unresolved:0 */
import fs from 'fs';
import path from 'path';
import fs from 'node:fs';
import path from 'node:path';

import yaml from 'js-yaml';
import JsonRefs from 'json-refs';
Expand Down
5 changes: 2 additions & 3 deletions api-docs/openapi-diff.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */
/* eslint import/no-unresolved:0 */

import fs from 'fs';
import https from 'https';
import fs from 'node:fs';
import https from 'node:https';

import yaml from 'js-yaml';
import jsonDiff from 'json-diff';
Expand Down
3 changes: 0 additions & 3 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@
"/api/0/organizations/{organization_slug}/releases/{version}/commitfiles/": {
"$ref": "paths/releases/organization-release-commit-files.json"
},
"/api/0/projects/{organization_slug}/{project_slug}/releases/{version}/resolved/": {
"$ref": "paths/releases/project-issues-resolved-in-release.json"
},
"/api/0/organizations/{organization_slug}/releases/{version}/deploys/": {
"$ref": "paths/releases/deploys.json"
},
Expand Down
52 changes: 0 additions & 52 deletions api-docs/paths/releases/project-issues-resolved-in-release.json

This file was deleted.

8 changes: 4 additions & 4 deletions api-docs/watch.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0, import/no-unresolved:0, no-console:0 */
import {spawn} from 'child_process';
import {join} from 'path';
import {stderr, stdout} from 'process';
/* eslint import/no-unresolved:0, no-console:0 */
import {spawn} from 'node:child_process';
import {join} from 'node:path';
import {stderr, stdout} from 'node:process';

import sane from 'sane';

Expand Down
4 changes: 2 additions & 2 deletions babel.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ const config: TransformOptions = {
},
],
['babel-plugin-add-react-displayname'],
['@fullstory/babel-plugin-annotate-react'],
'@sentry/babel-plugin-component-annotate',
],
},
development: {
plugins: [
'@emotion/babel-plugin',
'@babel/plugin-transform-react-jsx-source',
['@fullstory/babel-plugin-annotate-react'],
'@sentry/babel-plugin-component-annotate',
...(process.env.SENTRY_UI_HOT_RELOAD ? ['react-refresh/babel'] : []),
],
},
Expand Down
75 changes: 73 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,49 @@
"enabled": true,
"rules": {
"recommended": false,
"a11y": {
"noBlankTarget": "error"
},
"correctness": {
"noGlobalObjectCalls": "error",
"noUnreachable": "error",
"useHookAtTopLevel": "error",
"useIsNan": "error"
},
"complexity": {
"useFlatMap": "error",
"useOptionalChain": "error"
},
"nursery": {
"noDuplicateJsonKeys": "error",
"noNodejsModules": "error",
"useExportType": "error",
"useImportType": "error"
"useImportType": "error",
"useShorthandFunctionType": "error"
},
"security": {
"noDangerouslySetInnerHtmlWithChildren": "error"
},
"suspicious": {
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateJsxProps": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noDuplicateCase": "error",
"noFallthroughSwitchClause": "error",
"noRedeclare": "error",
"noSparseArray": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useIsArray": "error"
},
"style": {
"noCommaOperator": "error",
"noShoutyConstants": "error",
"noParameterProperties": "error",
"noVar": "error",
"useConst": "error"
}
}
},
Expand Down Expand Up @@ -60,5 +99,37 @@
"allowComments": true,
"allowTrailingCommas": true
}
}
},
"overrides": [
{
"include": [
"api-docs/*.ts",
"build-utils/*.ts",
"config/webpack.chartcuterie.config.ts",
"scripts",
"tests/js/sentry-test/loadFixtures.ts",
"tests/js/jest-pegjs-transform.js",
"tests/js/setup.ts",
"tests/js/test-balancer/index.js",
"*.config.ts"
],
"linter": {
"rules": {
"nursery": {
"noNodejsModules": "off"
}
}
}
},
{
"include": ["src/sentry/templates/sentry/error-page-embed.js"],
"linter": {
"rules": {
"style": {
"noVar": "off"
}
}
}
}
]
}
5 changes: 2 additions & 3 deletions build-utils/last-built-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */

import fs from 'fs';
import path from 'path';
import fs from 'node:fs';
import path from 'node:path';

import type webpack from 'webpack';

Expand Down
11 changes: 4 additions & 7 deletions build-utils/sentry-instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */

import crypto from 'crypto';
import https from 'https';
import os from 'os';

import type Sentry from '@sentry/node';
import type {Transaction} from '@sentry/types';
import crypto from 'node:crypto';
import https from 'node:https';
import os from 'node:os';
import type webpack from 'webpack';

const {
Expand Down Expand Up @@ -74,7 +71,7 @@ class SentryInstrumentation {
sentry.setTag('arch', os.arch());
sentry.setTag(
'cpu',
cpus && cpus.length ? `${cpus[0].model} (cores: ${cpus.length})}` : 'N/A'
cpus?.length ? `${cpus[0].model} (cores: ${cpus.length})}` : 'N/A'
);

this.Sentry = sentry;
Expand Down
5 changes: 2 additions & 3 deletions config/webpack.chartcuterie.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-env node */
/* eslint import/no-nodejs-modules:0 */

import childProcess from 'child_process';
import path from 'path';
import childProcess from 'node:child_process';
import path from 'node:path';

import webpack from 'webpack';

Expand Down
Loading

0 comments on commit 285de9e

Please sign in to comment.