Skip to content

ref: soft delete omt is_active #92164

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

JoshFerge
Copy link
Member

soft delete organizationmemberteam.is_active, as it's no longer used.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 22, 2025
Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0913_soft_delete_omt_is_active.py

for 0913_soft_delete_omt_is_active in sentry

--
-- Moved organizationmemberteam.is_active field to pending deletion state
--
-- (no-op)

Copy link

codecov bot commented May 22, 2025

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:156718 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml

❌ 23 Tests Failed:

Tests completed Failed Passed Skipped
25957 23 25934 207
View the top 3 failed test(s) by shortest run time
tests.sentry.manager.test_project_manager.ProjectManagerTest::test_get_by_users_empty
Stack Traces | 0.096s run time
#x1B[1m#x1B[.../sentry/manager/test_project_manager.py#x1B[0m:51: in test_get_by_users_empty
    assert Project.objects.get_by_users([]) == {}
#x1B[1m#x1B[.../sentry/models/project.py#x1B[0m:173: in get_by_users
    project_rows = self.filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/manager.py#x1B[0m:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1491: in filter
    return self._filter_or_exclude(False, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1509: in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1516: in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1643: in add_q
    clause, _ = self._add_q(q_object, can_reuse)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1675: in _add_q
    child_clause, needed_inner = self.build_filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1585: in build_filter
    condition = self.build_lookup(lookups, col, value)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1406: in build_lookup
    lhs = self.try_transform(lhs, lookup_name)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1455: in try_transform
    raise FieldError(
#x1B[1m#x1B[31mE   django.core.exceptions.FieldError: Unsupported lookup 'is_active' for ManyToOneRel or join on the field not permitted.#x1B[0m
tests.sentry.api.test_issue_search.ConvertActorOrNoneValueTest::test_my_team
Stack Traces | 2.01s run time
#x1B[1m#x1B[.../sentry/api/test_issue_search.py#x1B[0m:357: in test_my_team
    assert convert_actor_or_none_value(
#x1B[1m#x1B[.../sentry/api/issue_search.py#x1B[0m:103: in convert_actor_or_none_value
    actors_or_none.extend(get_teams_for_users(projects, [user]))
#x1B[1m#x1B[.../sentry/search/utils.py#x1B[0m:315: in get_teams_for_users
    id__in=OrganizationMemberTeam.objects.filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/manager.py#x1B[0m:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1491: in filter
    return self._filter_or_exclude(False, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1509: in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1516: in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1643: in add_q
    clause, _ = self._add_q(q_object, can_reuse)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1675: in _add_q
    child_clause, needed_inner = self.build_filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1523: in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg, summarize)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1330: in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1802: in names_to_path
    raise FieldError(
#x1B[1m#x1B[31mE   django.core.exceptions.FieldError: Cannot resolve keyword 'is_active' into field. Choices are: id, organizationmember, organizationmember_id, role, team, team_id#x1B[0m
tests.sentry.api.test_issue_search.ConvertQueryValuesTest::test_valid_assign_my_teams_converter
Stack Traces | 2.16s run time
#x1B[1m#x1B[.../sentry/api/test_issue_search.py#x1B[0m:183: in test_valid_assign_my_teams_converter
    expected = value_converters["assigned_to"]([raw_value], [self.project], self.user, None)
#x1B[1m#x1B[.../sentry/api/issue_search.py#x1B[0m:103: in convert_actor_or_none_value
    actors_or_none.extend(get_teams_for_users(projects, [user]))
#x1B[1m#x1B[.../sentry/search/utils.py#x1B[0m:315: in get_teams_for_users
    id__in=OrganizationMemberTeam.objects.filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/manager.py#x1B[0m:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1491: in filter
    return self._filter_or_exclude(False, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1509: in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1516: in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1643: in add_q
    clause, _ = self._add_q(q_object, can_reuse)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1675: in _add_q
    child_clause, needed_inner = self.build_filter(
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1523: in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg, summarize)
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1330: in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/query.py#x1B[0m:1802: in names_to_path
    raise FieldError(
#x1B[1m#x1B[31mE   django.core.exceptions.FieldError: Cannot resolve keyword 'is_active' into field. Choices are: id, organizationmember, organizationmember_id, role, team, team_id#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant