Skip to content

Commit

Permalink
Merge branch 'aci/m62-views' into aci/m62-routes
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Jan 9, 2025
2 parents 04d4afe + e665d9c commit 7c9cd5c
Show file tree
Hide file tree
Showing 143 changed files with 3,034 additions and 2,374 deletions.
30 changes: 29 additions & 1 deletion fixtures/backup/model_dependencies/detailed.json
Original file line number Diff line number Diff line change
Expand Up @@ -6352,6 +6352,34 @@
"table_name": "workflow_engine_action",
"uniques": []
},
"workflow_engine.actiongroupstatus": {
"dangling": false,
"foreign_keys": {
"action": {
"kind": "FlexibleForeignKey",
"model": "workflow_engine.action",
"nullable": false
},
"group": {
"kind": "FlexibleForeignKey",
"model": "sentry.group",
"nullable": false
}
},
"model": "workflow_engine.actiongroupstatus",
"relocation_dependencies": [],
"relocation_scope": "Excluded",
"silos": [
"Region"
],
"table_name": "workflow_engine_actiongroupstatus",
"uniques": [
[
"action",
"group"
]
]
},
"workflow_engine.alertruledetector": {
"dangling": true,
"foreign_keys": {
Expand Down Expand Up @@ -6723,4 +6751,4 @@
]
]
}
}
}
6 changes: 5 additions & 1 deletion fixtures/backup/model_dependencies/flat.json
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@
"workflow_engine.action": [
"sentry.integration"
],
"workflow_engine.actiongroupstatus": [
"sentry.group",
"workflow_engine.action"
],
"workflow_engine.alertruledetector": [
"sentry.alertrule",
"sentry.rule",
Expand Down Expand Up @@ -930,4 +934,4 @@
"workflow_engine.dataconditiongroup",
"workflow_engine.workflow"
]
}
}
3 changes: 2 additions & 1 deletion fixtures/backup/model_dependencies/sorted.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"workflow_engine.workflow",
"workflow_engine.detector",
"workflow_engine.datasourcedetector",
"workflow_engine.actiongroupstatus",
"uptime.projectuptimesubscription",
"tempest.tempestcredentials",
"sentry.userreport",
Expand Down Expand Up @@ -247,4 +248,4 @@
"sentry.incidentsnapshot",
"sentry.incidentproject",
"sentry.incidentactivity"
]
]
3 changes: 2 additions & 1 deletion fixtures/backup/model_dependencies/truncate.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"workflow_engine_workflow",
"workflow_engine_detector",
"workflow_engine_datasourcedetector",
"workflow_engine_actiongroupstatus",
"uptime_projectuptimesubscription",
"tempest_tempestcredentials",
"sentry_userreport",
Expand Down Expand Up @@ -247,4 +248,4 @@
"sentry_incidentsnapshot",
"sentry_incidentproject",
"sentry_incidentactivity"
]
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1 on 2019-09-22 21:47

from django.db import migrations
from django.db.migrations import SeparateDatabaseAndState

from sentry.new_migrations.migrations import CheckedMigration


class Migration(CheckedMigration):

initial = True

dependencies = []

allow_run_sql = False

operations = [SeparateDatabaseAndState(database_operations=[migrations.RunSQL("select 1;")])]
Empty file.
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, null=False)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by Django 3.1 on 2019-09-22 21:47

from sentry.new_migrations.migrations import CheckedMigration
from sentry.new_migrations.monkey.special import SafeRunSQL


class Migration(CheckedMigration):

initial = True

dependencies = []

allow_run_sql = False

operations = [SafeRunSQL("select 1;")]
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, null=False)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Migration(CheckedMigration):
dependencies = [
("run_sql_app", "0001_initial"),
]
allow_run_sql = True

operations = [
migrations.SeparateDatabaseAndState(
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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",
),
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from django.db import migrations, models

from sentry.new_migrations.migrations import CheckedMigration
from sentry.new_migrations.monkey.special import SafeRunSQL


class Migration(CheckedMigration):

dependencies = [
("safe_run_sql_app", "0001_initial"),
]
allow_run_sql = True

operations = [
SafeRunSQL(
"""ALTER TABLE "safe_run_sql_app_testtable" DROP COLUMN IF EXISTS "field";""",
reverse_sql="""ALTER TABLE "safe_run_sql_app_testtable" ADD COLUMN "field" int NULL;""",
hints={"tables": ["safe_run_sql_app_testtable"]},
),
migrations.AddField("testtable", "field", models.IntegerField(null=True)),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.db import migrations

from sentry.db.models import BoundedPositiveIntegerField
from sentry.new_migrations.migrations import CheckedMigration


class Migration(CheckedMigration):

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

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

from sentry.db.models import BoundedPositiveIntegerField


class TestTable(models.Model):
field = BoundedPositiveIntegerField(default=0)
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ tempest: 0001_create_tempest_credentials_model

uptime: 0021_drop_region_table_col

workflow_engine: 0020_rm_legacy_notification_type
workflow_engine: 0022_add_action_group_status_model
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ module = [
"sentry.api.endpoints.project_transaction_names",
"sentry.api.endpoints.team_details",
"sentry.api.endpoints.user_subscriptions",
"sentry.api.event_search",
"sentry.api.helpers.group_index.index",
"sentry.api.invite_helper",
"sentry.api.issue_search",
Expand Down Expand Up @@ -308,8 +307,6 @@ module = [
"sentry_plugins.bitbucket.mixins",
"sentry_plugins.github.plugin",
"sentry_plugins.jira.plugin",
"tests.sentry.api.endpoints.notifications.test_notification_actions_details",
"tests.sentry.api.endpoints.notifications.test_notification_actions_index",
"tests.sentry.api.helpers.test_group_index",
"tests.sentry.api.test_base",
"tests.sentry.api.test_event_search",
Expand Down
2 changes: 1 addition & 1 deletion requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rfc3339-validator>=0.1.2
rfc3986-validator>=0.1.1
# [end] jsonschema format validators
sentry-arroyo>=2.19.9
sentry-kafka-schemas>=0.1.126
sentry-kafka-schemas>=0.1.128
sentry-ophio==1.0.0
sentry-protos>=0.1.37
sentry-redis-tools>=0.1.7
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ sentry-devenv==1.14.2
sentry-forked-django-stubs==5.1.1.post1
sentry-forked-djangorestframework-stubs==3.15.2.post1
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.126
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.39
sentry-redis-tools==0.1.7
Expand Down
2 changes: 1 addition & 1 deletion requirements-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ rsa==4.8
s3transfer==0.10.0
sentry-arroyo==2.19.9
sentry-forked-email-reply-parser==0.5.12.post1
sentry-kafka-schemas==0.1.126
sentry-kafka-schemas==0.1.128
sentry-ophio==1.0.0
sentry-protos==0.1.39
sentry-redis-tools==0.1.7
Expand Down
5 changes: 3 additions & 2 deletions src/sentry/api/bases/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,11 @@ def save_discover_saved_query_split_decision(
return decision

def handle_unit_meta(
self, meta: dict[str, str]
self, result_meta: dict[str, str]
) -> tuple[dict[str, str], dict[str, str | None]]:
units: dict[str, str | None] = {}
for key, value in meta.items():
meta: dict[str, str] = result_meta.copy()
for key, value in result_meta.items():
if value in SIZE_UNITS:
units[key] = value
meta[key] = "size"
Expand Down
Loading

0 comments on commit 7c9cd5c

Please sign in to comment.