Skip to content
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

chore: Add session-replay-rage-click-issue-creation flagpole guard #78620

Closed
wants to merge 1 commit into from

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Oct 4, 2024

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 4, 2024
@ryan953 ryan953 marked this pull request as ready for review October 4, 2024 17:05
@ryan953 ryan953 requested a review from a team as a code owner October 4, 2024 17:05
Copy link

codecov bot commented Oct 4, 2024

❌ 16 Tests Failed:

Tests completed Failed Passed Skipped
21734 16 21718 214
View the top 3 failed tests by shortest run time
tests.sentry.replays.unit.test_ingest_dom_index test_parse_request_response_no_info
Stack Traces | 0.057s run time
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:224: in _get_feature_class
    return self._feature_registry[name]
#x1B[1m#x1B[31mE   KeyError: 'organizations:session-replay-rage-click-issue-creation'#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:278: in has
    feature = self.get(name, *args, **kwargs)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:234: in get
    cls = self._get_feature_class(name)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:226: in _get_feature_class
    raise FeatureNotRegistered(name)
#x1B[1m#x1B[31mE   sentry.features.exceptions.FeatureNotRegistered: The "organizations:session-replay-rage-click-issue-creation" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../replays/unit/test_ingest_dom_index.py#x1B[0m:742: in test_parse_request_response_no_info
    parse_replay_actions(mock_project, "1", 30, events, None)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:92: in parse_replay_actions
    actions = get_user_actions(project, replay_id, segment_data, replay_event)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:182: in get_user_actions
    should_report_hydration = _should_report_hydration_error_issue(project)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:307: in _should_report_hydration_error_issue
    has_feature = features.has(
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:321: in has
    if in_random_rollout("features.error.capture_rate"):
#x1B[1m#x1B[.../sentry/features/rollout.py#x1B[0m:14: in in_random_rollout
    return random.random() < options.get(option_name)
#x1B[1m#x1B[.../sentry/options/manager.py#x1B[0m:299: in get
    result = self.store.get(opt, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:97: in get
    result = self.get_store(key, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:193: in get_store
    value = self.model.objects.get(key=key.name).value
#x1B[1m#x1B[31m.venv/lib/python3.12.../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.12.../db/models/query.py#x1B[0m:645: in get
    num = len(clone)
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:382: in __len__
    self._fetch_all()
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:1928: in _fetch_all
    self._result_cache = list(self._iterable_class(self))
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:91: in __iter__
    results = compiler.execute_sql(
#x1B[1m#x1B[31m.venv/lib/python3.12.../models/sql/compiler.py#x1B[0m:1572: in execute_sql
    cursor = self.connection.cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/utils/asyncio.py#x1B[0m:26: in inner
    return func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:320: in cursor
    return self._cursor()
#x1B[1m#x1B[.../db/postgres/decorators.py#x1B[0m:40: in inner
    return func(self, *args, **kwargs)
#x1B[1m#x1B[.../db/postgres/base.py#x1B[0m:108: in _cursor
    return super()._cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:296: in _cursor
    self.ensure_connection()
#x1B[1m#x1B[31mE   RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.#x1B[0m
tests.sentry.replays.unit.test_ingest_dom_index test_get_user_actions_missing_node
Stack Traces | 0.058s run time
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:224: in _get_feature_class
    return self._feature_registry[name]
#x1B[1m#x1B[31mE   KeyError: 'organizations:session-replay-rage-click-issue-creation'#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:278: in has
    feature = self.get(name, *args, **kwargs)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:234: in get
    cls = self._get_feature_class(name)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:226: in _get_feature_class
    raise FeatureNotRegistered(name)
#x1B[1m#x1B[31mE   sentry.features.exceptions.FeatureNotRegistered: The "organizations:session-replay-rage-click-issue-creation" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../replays/unit/test_ingest_dom_index.py#x1B[0m:131: in test_get_user_actions_missing_node
    user_actions = get_user_actions(mock_project, uuid.uuid4().hex, events, None)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:182: in get_user_actions
    should_report_hydration = _should_report_hydration_error_issue(project)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:307: in _should_report_hydration_error_issue
    has_feature = features.has(
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:321: in has
    if in_random_rollout("features.error.capture_rate"):
#x1B[1m#x1B[.../sentry/features/rollout.py#x1B[0m:14: in in_random_rollout
    return random.random() < options.get(option_name)
#x1B[1m#x1B[.../sentry/options/manager.py#x1B[0m:299: in get
    result = self.store.get(opt, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:97: in get
    result = self.get_store(key, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:193: in get_store
    value = self.model.objects.get(key=key.name).value
#x1B[1m#x1B[31m.venv/lib/python3.12.../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.12.../db/models/query.py#x1B[0m:645: in get
    num = len(clone)
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:382: in __len__
    self._fetch_all()
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:1928: in _fetch_all
    self._result_cache = list(self._iterable_class(self))
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:91: in __iter__
    results = compiler.execute_sql(
#x1B[1m#x1B[31m.venv/lib/python3.12.../models/sql/compiler.py#x1B[0m:1572: in execute_sql
    cursor = self.connection.cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/utils/asyncio.py#x1B[0m:26: in inner
    return func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:320: in cursor
    return self._cursor()
#x1B[1m#x1B[.../db/postgres/decorators.py#x1B[0m:40: in inner
    return func(self, *args, **kwargs)
#x1B[1m#x1B[.../db/postgres/base.py#x1B[0m:108: in _cursor
    return super()._cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:296: in _cursor
    self.ensure_connection()
#x1B[1m#x1B[31mE   RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.#x1B[0m
tests.sentry.replays.unit.test_ingest_dom_index test_parse_request_response_old_format_request_only
Stack Traces | 0.058s run time
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:224: in _get_feature_class
    return self._feature_registry[name]
#x1B[1m#x1B[31mE   KeyError: 'organizations:session-replay-rage-click-issue-creation'#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:278: in has
    feature = self.get(name, *args, **kwargs)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:234: in get
    cls = self._get_feature_class(name)
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:226: in _get_feature_class
    raise FeatureNotRegistered(name)
#x1B[1m#x1B[31mE   sentry.features.exceptions.FeatureNotRegistered: The "organizations:session-replay-rage-click-issue-creation" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager#x1B[0m

#x1B[33mDuring handling of the above exception, another exception occurred:#x1B[0m
#x1B[1m#x1B[.../replays/unit/test_ingest_dom_index.py#x1B[0m:769: in test_parse_request_response_old_format_request_only
    parse_replay_actions(mock_project, "1", 30, events, None)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:92: in parse_replay_actions
    actions = get_user_actions(project, replay_id, segment_data, replay_event)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:182: in get_user_actions
    should_report_hydration = _should_report_hydration_error_issue(project)
#x1B[1m#x1B[.../usecases/ingest/dom_index.py#x1B[0m:307: in _should_report_hydration_error_issue
    has_feature = features.has(
#x1B[1m#x1B[.../sentry/features/manager.py#x1B[0m:321: in has
    if in_random_rollout("features.error.capture_rate"):
#x1B[1m#x1B[.../sentry/features/rollout.py#x1B[0m:14: in in_random_rollout
    return random.random() < options.get(option_name)
#x1B[1m#x1B[.../sentry/options/manager.py#x1B[0m:299: in get
    result = self.store.get(opt, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:97: in get
    result = self.get_store(key, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:193: in get_store
    value = self.model.objects.get(key=key.name).value
#x1B[1m#x1B[31m.venv/lib/python3.12.../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.12.../db/models/query.py#x1B[0m:645: in get
    num = len(clone)
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:382: in __len__
    self._fetch_all()
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:1928: in _fetch_all
    self._result_cache = list(self._iterable_class(self))
#x1B[1m#x1B[31m.venv/lib/python3.12.../db/models/query.py#x1B[0m:91: in __iter__
    results = compiler.execute_sql(
#x1B[1m#x1B[31m.venv/lib/python3.12.../models/sql/compiler.py#x1B[0m:1572: in execute_sql
    cursor = self.connection.cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../django/utils/asyncio.py#x1B[0m:26: in inner
    return func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:320: in cursor
    return self._cursor()
#x1B[1m#x1B[.../db/postgres/decorators.py#x1B[0m:40: in inner
    return func(self, *args, **kwargs)
#x1B[1m#x1B[.../db/postgres/base.py#x1B[0m:108: in _cursor
    return super()._cursor()
#x1B[1m#x1B[31m.venv/lib/python3.12.../backends/base/base.py#x1B[0m:296: in _cursor
    self.ensure_connection()
#x1B[1m#x1B[31mE   RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.#x1B[0m

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link
Member

@aliu39 aliu39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use an option similar to feedback.organizations.slug-denylist?

@getsantry
Copy link
Contributor

getsantry bot commented Oct 29, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Oct 29, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Nov 20, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Nov 20, 2024
@@ -393,6 +393,10 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:session-replay-enable-canvas", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable canvas replaying
manager.add("organizations:session-replay-enable-canvas-replayer", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)

# Enable Hydration Error Issue Creation In Recording Consumer
manager.add("organizations:session-replay-hydration-error-issue-creation", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be exposed in the api?

return project.get_option("sentry:replay_hydration_error_issues")

# Killswitch
has_feature = features.has(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a feature and a killswitch? (on top of the ingest flag created by the issue platform for this issue type)

@ryan953 ryan953 closed this Nov 20, 2024
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 Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants