Skip to content

Commit

Permalink
Merge branch 'master' of github.com:getsentry/sentry into egou/feat/e…
Browse files Browse the repository at this point in the history
…ap-results-consumer
  • Loading branch information
edwardgou-sentry committed Oct 15, 2024
2 parents 1abaa31 + c419e15 commit 6d5ce72
Show file tree
Hide file tree
Showing 553 changed files with 14,875 additions and 7,088 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test_docker_compose_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-acceptance-required-checks:
# this is a required check so we need this job to always run and report a status.
if: always()
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test_docker_compose_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ jobs:
run: |
yarn add ts-node && make test-api-docs
- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-backend-test:
name: backend test
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -99,6 +105,12 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-backend-migration-tests:
name: backend migration tests
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -132,6 +144,12 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-cli:
name: cli test
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -164,6 +182,12 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-migration:
name: check migration
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -191,6 +215,12 @@ jobs:
run: |
./.github/workflows/scripts/migration-check.sh
- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
docker-compose-monolith-dbs:
name: monolith-dbs test
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -233,6 +263,12 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
commit_sha: ${{ github.event.pull_request.head.sha }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs --tail 1000
# This check runs once all dependent jobs have passed
# It symbolizes that all required Backend checks have succesfully passed (Or skipped)
# This step is the only required backend check
Expand Down
15 changes: 15 additions & 0 deletions devenv/config.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[devenv]
minimum_version = 1.10.2

[venv.sentry]
python = 3.12.6
path = .venv
Expand Down Expand Up @@ -51,6 +54,18 @@ linux_arm64_sha256 = 6ecba675e90d154f22e20200fa5684f20ad1495b73c0462f1bd7da4e9d0
# used for autoupdate
version = v0.6.6

[lima]
darwin_x86_64 = https://github.com/lima-vm/lima/releases/download/v0.19.1/lima-0.19.1-Darwin-x86_64.tar.gz
darwin_x86_64_sha256 = ac8827479f66ef1b288b31f164b22f6433faa14c44ce5bbebe09e6e913582479
darwin_arm64 = https://github.com/lima-vm/lima/releases/download/v0.19.1/lima-0.19.1-Darwin-arm64.tar.gz
darwin_arm64_sha256 = 0dfcf3a39782baf1c2ea43cf026f8df0321c671d914c105fbb78de507aa8bda4
linux_x86_64 = https://github.com/lima-vm/lima/releases/download/v0.19.1/lima-0.19.1-Linux-x86_64.tar.gz
linux_x86_64_sha256 = 7d18b1716aae14bf98d6ea93a703e8877b0c3142f7ba2e87401d47d5d0fe3ff1
linux_arm64 = https://github.com/lima-vm/lima/releases/download/v0.19.1/lima-0.19.1-Linux-aarch64.tar.gz
linux_arm64_sha256 = c55e57ddbefd9988d0f3676bb873bcc6e0f7b3c3d47a1f07599ee151c5198d96
# used for autoupdate
version = 0.19.1

# kept here only for compatibility with older `devenv`
[python]
version = 3.12.6
Expand Down
33 changes: 14 additions & 19 deletions devenv/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main(context: dict[str, str]) -> int:
)
node.install_yarn(repo_config["node"]["yarn_version"], reporoot)
except ImportError:
from devenv.lib import volta
from devenv.lib import volta # type: ignore[attr-defined]

volta.install(reporoot)

Expand All @@ -108,28 +108,23 @@ def main(context: dict[str, str]) -> int:
venv.ensure(venv_dir, python_version, url, sha256)

if constants.DARWIN:
colima.install(
repo_config["colima"]["version"],
repo_config["colima"][constants.SYSTEM_MACHINE],
repo_config["colima"][f"{constants.SYSTEM_MACHINE}_sha256"],
reporoot,
)
try:
colima.install(
repo_config["colima"]["version"],
repo_config["colima"][constants.SYSTEM_MACHINE],
repo_config["colima"][f"{constants.SYSTEM_MACHINE}_sha256"],
reporoot,
)
limactl.install(reporoot) # type: ignore[call-arg]
except TypeError:
# this is needed for devenv <=1.4.0,>1.2.3 to finish syncing and therefore update itself
colima.install(
repo_config["colima"]["version"],
repo_config["colima"][constants.SYSTEM_MACHINE],
repo_config["colima"][f"{constants.SYSTEM_MACHINE}_sha256"],
# again, it'll take 2 syncs to get here
limactl.install(
repo_config["lima"]["version"],
repo_config["lima"][constants.SYSTEM_MACHINE],
repo_config["lima"][f"{constants.SYSTEM_MACHINE}_sha256"],
reporoot,
)

# TODO: move limactl version into per-repo config
try:
limactl.install(reporoot)
except TypeError:
# this is needed for devenv <=1.4.0,>1.2.3 to finish syncing and therefore update itself
limactl.install()

if not run_procs(
repo,
reporoot,
Expand Down
4 changes: 2 additions & 2 deletions fixtures/apidocs_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from openapi_core.validation.response.validators import V30ResponseDataValidator

from sentry.testutils.cases import APITestCase
from sentry.testutils.helpers.datetime import before_now, iso_format
from sentry.testutils.helpers.datetime import before_now
from sentry.testutils.skips import requires_snuba


Expand Down Expand Up @@ -41,7 +41,7 @@ def create_event(self, name, **kwargs):
"event_id": (name * 32)[:32],
"fingerprint": ["1"],
"sdk": {"version": "5.17.0", "name": "sentry.javascript.browser"},
"timestamp": iso_format(before_now(seconds=1)),
"timestamp": before_now(seconds=1).isoformat(),
"user": {"id": self.user.id, "email": self.user.email},
"release": name,
}
Expand Down
22 changes: 22 additions & 0 deletions fixtures/backup/model_dependencies/detailed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,28 @@
]
]
},
"sentry.dashboardpermissions": {
"dangling": false,
"foreign_keys": {
"dashboard": {
"kind": "DefaultOneToOneField",
"model": "sentry.dashboard",
"nullable": false
}
},
"model": "sentry.dashboardpermissions",
"relocation_dependencies": [],
"relocation_scope": "Organization",
"silos": [
"Region"
],
"table_name": "sentry_dashboardpermissions",
"uniques": [
[
"dashboard"
]
]
},
"sentry.dashboardproject": {
"dangling": false,
"foreign_keys": {
Expand Down
3 changes: 3 additions & 0 deletions fixtures/backup/model_dependencies/flat.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@
"sentry.organization",
"sentry.user"
],
"sentry.dashboardpermissions": [
"sentry.dashboard"
],
"sentry.dashboardproject": [
"sentry.dashboard",
"sentry.project"
Expand Down
1 change: 1 addition & 0 deletions fixtures/backup/model_dependencies/sorted.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"sentry.debugidartifactbundle",
"sentry.dashboardwidget",
"sentry.dashboardproject",
"sentry.dashboardpermissions",
"sentry.customdynamicsamplingruleproject",
"sentry.commitfilechange",
"sentry.broadcastseen",
Expand Down
1 change: 1 addition & 0 deletions fixtures/backup/model_dependencies/truncate.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"sentry_debugidartifactbundle",
"sentry_dashboardwidget",
"sentry_dashboardproject",
"sentry_dashboardpermissions",
"sentry_customdynamicsamplingruleproject",
"sentry_commitfilechange",
"sentry_broadcastseen",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 3.1 on 2019-09-22 21:47

from django.db import migrations, models

from sentry.new_migrations.migrations import CheckedMigration


class Migration(CheckedMigration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="TestTable",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("field", models.IntegerField(null=True)),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from django.db import migrations

from sentry.new_migrations.migrations import CheckedMigration


class Migration(CheckedMigration):

dependencies = [
("run_sql_app", "0001_initial"),
]

operations = [
migrations.SeparateDatabaseAndState(
database_operations=[
migrations.RunSQL(
"""ALTER TABLE "run_sql_app_testtable" DROP COLUMN "field";""",
reverse_sql="""ALTER TABLE "run_sql_app_testtable" ADD COLUMN "field" int NULL;""",
hints={"tables": ["run_sql_app_testtable"]},
)
],
state_operations=[migrations.RemoveField("testtable", "field")],
)
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from django.db import migrations, models

from sentry.new_migrations.migrations import CheckedMigration


class Migration(CheckedMigration):

dependencies = [
("run_sql_app", "0002_run_sql"),
]

operations = [
migrations.AddField("testtable", "field", models.IntegerField(null=True)),
]
Empty file.
5 changes: 5 additions & 0 deletions fixtures/safe_migrations_apps/run_sql_app/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.db import models


class TestTable(models.Model):
field = models.IntegerField(default=0)
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hybridcloud: 0016_add_control_cacheversion
nodestore: 0002_nodestore_no_dictfield
remote_subscriptions: 0003_drop_remote_subscription
replays: 0004_index_together
sentry: 0773_make_group_score_nullable
sentry: 0776_drop_group_score_in_database
social_auth: 0002_default_auto_field
uptime: 0017_unique_on_timeout
workflow_engine: 0009_detector_type
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
"@sentry-internal/rrweb": "2.26.0",
"@sentry-internal/rrweb-player": "2.26.0",
"@sentry-internal/rrweb-snapshot": "2.26.0",
"@sentry/core": "^8.31.0-beta.0",
"@sentry/node": "^8.31.0-beta.0",
"@sentry/react": "^8.31.0-beta.0",
"@sentry/core": "^8.35.0-alpha.0",
"@sentry/node": "^8.35.0-alpha.0",
"@sentry/react": "^8.35.0-alpha.0",
"@sentry/release-parser": "^1.3.1",
"@sentry/status-page-list": "^0.3.0",
"@sentry/types": "^8.31.0-beta.0",
"@sentry/utils": "^8.31.0-beta.0",
"@sentry/types": "^8.35.0-alpha.0",
"@sentry/utils": "^8.35.0-alpha.0",
"@sentry/webpack-plugin": "^2.22.4",
"@spotlightjs/spotlight": "^2.0.0-alpha.1",
"@tanstack/react-query": "^5.56.2",
Expand Down Expand Up @@ -156,7 +156,7 @@
"react-lazyload": "^3.2.1",
"react-mentions": "4.4.10",
"react-popper": "^2.3.0",
"react-router-dom": "^6.23.0",
"react-router-dom": "^6.26.2",
"react-select": "4.3.1",
"react-sparklines": "1.7.0",
"react-virtualized": "^9.22.5",
Expand All @@ -167,8 +167,8 @@
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.10",
"ts-node": "^10.9.2",
"tslib": "^2.6.3",
"typescript": "^5.5.2",
"tslib": "^2.7.0",
"typescript": "^5.6.3",
"u2f-api": "1.0.10",
"url-loader": "^4.1.1",
"webpack": "5.94.0",
Expand All @@ -181,7 +181,7 @@
"@codecov/webpack-plugin": "^1.2.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
"@sentry/jest-environment": "6.0.0",
"@sentry/profiling-node": "^8.31.0-beta.0",
"@sentry/profiling-node": "^8.35.0-alpha.0",
"@styled/typescript-styled-plugin": "^1.0.1",
"@testing-library/dom": "10.1.0",
"@testing-library/jest-dom": "6.4.5",
Expand All @@ -191,8 +191,8 @@
"babel-gettext-extractor": "^4.1.3",
"babel-jest": "29.7.0",
"benchmark": "^2.1.4",
"eslint": "8.57.0",
"eslint-config-sentry-app": "2.8.0",
"eslint": "8.57.1",
"eslint-config-sentry-app": "2.9.0",
"html-webpack-plugin": "^5.6.0",
"jest": "29.7.0",
"jest-canvas-mock": "^2.5.2",
Expand Down
Loading

0 comments on commit 6d5ce72

Please sign in to comment.