Skip to content

Conversation

@wedamija
Copy link
Member

We vendored and slightly modified this code in #79052.

We've removed the code that actually uses this change in #90455. I copied the code from our migration framework back over this, and there are no other customizations, so we can safely remove.

@wedamija wedamija requested review from a team and evanpurkhiser April 25, 2025 23:26
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 25, 2025
@codecov
Copy link

codecov bot commented Apr 25, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
25294 1 25293 306
View the top 2 failed test(s) by shortest run time
tests.sentry.migrations.test_0870_delete_non_member_views.DeleteNonMemberViewsTest::test_deletes_non_member_views
Stack Traces | 0.006s run time
#x1B[1m#x1B[31m.venv/lib/python3.13....../site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13....../site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/pytest_django/fixtures.py#x1B[0m:144: in django_db_setup
    db_cfg = setup_databases(
#x1B[1m#x1B[31m.venv/lib/python3.13.../django/test/utils.py#x1B[0m:206: in setup_databases
    connection.creation.create_test_db(
#x1B[1m#x1B[31m.venv/lib/python3.13.../backends/base/creation.py#x1B[0m:78: in create_test_db
    call_command(
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/__init__.py#x1B[0m:194: in call_command
    return command.execute(*args, **defaults)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:459: in execute
    output = self.handle(*args, **options)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:107: in wrapper
    res = handle_func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../management/commands/migrate.py#x1B[0m:118: in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/executor.py#x1B[0m:18: in __init__
    self.loader = MigrationLoader(self.connection)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:58: in __init__
    self.build_graph()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:229: in build_graph
    self.load_disk()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:120: in load_disk
    migration_module = import_module(migration_path)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/importlib/__init__.py#x1B[0m:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:44: in <module>
    class Migration(CheckedMigration):
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:6046: in Migration
    SafeRunSQL(
#x1B[1m#x1B[.../new_migrations/monkey/special.py#x1B[0m:7: in __init__
    super().__init__(*args, **kwargs)
#x1B[1m#x1B[31mE   TypeError: RunSQL.__init__() got an unexpected keyword argument 'use_statements'#x1B[0m
tests.sentry.notifications.test_notificationmessage_table_constraints.TestUpdateNotificationMessageConstraintsForActionGroupOpenPeriod::test_constraint_allows_different_action_group_combinations
Stack Traces | 0.006s run time
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/pytest_django/fixtures.py#x1B[0m:144: in django_db_setup
    db_cfg = setup_databases(
#x1B[1m#x1B[31m.venv/lib/python3.13.../django/test/utils.py#x1B[0m:206: in setup_databases
    connection.creation.create_test_db(
#x1B[1m#x1B[31m.venv/lib/python3.13.../backends/base/creation.py#x1B[0m:78: in create_test_db
    call_command(
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/__init__.py#x1B[0m:194: in call_command
    return command.execute(*args, **defaults)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:459: in execute
    output = self.handle(*args, **options)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:107: in wrapper
    res = handle_func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../management/commands/migrate.py#x1B[0m:118: in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/executor.py#x1B[0m:18: in __init__
    self.loader = MigrationLoader(self.connection)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:58: in __init__
    self.build_graph()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:229: in build_graph
    self.load_disk()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:120: in load_disk
    migration_module = import_module(migration_path)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/importlib/__init__.py#x1B[0m:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:44: in <module>
    class Migration(CheckedMigration):
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:6046: in Migration
    SafeRunSQL(
#x1B[1m#x1B[.../new_migrations/monkey/special.py#x1B[0m:7: in __init__
    super().__init__(*args, **kwargs)
#x1B[1m#x1B[31mE   TypeError: RunSQL.__init__() got an unexpected keyword argument 'use_statements'#x1B[0m
View the full list of 1 ❄️ flaky tests
tests.sentry.workflow_engine.migrations.test_0047_migrate_issue_alerts.TestMigrateIssueAlerts::test_2

Flake rate in main: 7.25% (Passed 64 times, Failed 5 times)

Stack Traces | 0.006s run time
#x1B[1m#x1B[31m.venv/lib/python3.13........./site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13........./site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13........./site-packages/pytest_django/plugin.py#x1B[0m:565: in _django_setup_unittest
    request.getfixturevalue("django_db_setup")
#x1B[1m#x1B[31m.venv/lib/python3.13.../site-packages/pytest_django/fixtures.py#x1B[0m:144: in django_db_setup
    db_cfg = setup_databases(
#x1B[1m#x1B[31m.venv/lib/python3.13.../django/test/utils.py#x1B[0m:206: in setup_databases
    connection.creation.create_test_db(
#x1B[1m#x1B[31m.venv/lib/python3.13.../backends/base/creation.py#x1B[0m:78: in create_test_db
    call_command(
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/__init__.py#x1B[0m:194: in call_command
    return command.execute(*args, **defaults)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:459: in execute
    output = self.handle(*args, **options)
#x1B[1m#x1B[31m.venv/lib/python3.13.../core/management/base.py#x1B[0m:107: in wrapper
    res = handle_func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../management/commands/migrate.py#x1B[0m:118: in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/executor.py#x1B[0m:18: in __init__
    self.loader = MigrationLoader(self.connection)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:58: in __init__
    self.build_graph()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:229: in build_graph
    self.load_disk()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/migrations/loader.py#x1B[0m:120: in load_disk
    migration_module = import_module(migration_path)
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/importlib/__init__.py#x1B[0m:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:44: in <module>
    class Migration(CheckedMigration):
#x1B[1m#x1B[.../sentry/migrations/0001_squashed_0484_break_org_member_user_fk.py#x1B[0m:6046: in Migration
    SafeRunSQL(
#x1B[1m#x1B[.../new_migrations/monkey/special.py#x1B[0m:7: in __init__
    super().__init__(*args, **kwargs)
#x1B[1m#x1B[31mE   TypeError: RunSQL.__init__() got an unexpected keyword argument 'use_statements'#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@wedamija wedamija force-pushed the danf/migrations-remove-allow-run-sql branch from 26307b7 to e497c69 Compare April 28, 2025 16:55
Base automatically changed from danf/migrations-remove-allow-run-sql to master April 28, 2025 18:13
…hemaEditor`.

We vendored and slightly modified this code in #79052.

We've removed the code that actually uses this change in #90455. I copied the code from our migration framework back over this, and there are no other customizations, so we can safely remove.
@wedamija wedamija force-pushed the danf/migrations-remove-vendored-code branch from 4431c12 to b4669e8 Compare April 28, 2025 18:15
@wedamija wedamija merged commit 7d60d5e into master Apr 28, 2025
63 checks passed
@wedamija wedamija deleted the danf/migrations-remove-vendored-code branch April 28, 2025 20:02
andrewshie-sentry pushed a commit that referenced this pull request May 12, 2025
…hemaEditor`. (#90457)

We vendored and slightly modified this code in
#79052.

We've removed the code that actually uses this change in
#90455. I copied the code from
our migration framework back over this, and there are no other
customizations, so we can safely remove.
@github-actions github-actions bot locked and limited conversation to collaborators May 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants