Skip to content

ref(flags): Remove preprod-size-analysis-pr-comments registration - #129454

Open
cursor[bot] wants to merge 1 commit into
masterfrom
claude-rm-preprod-size-analysis-pr-comments-registration
Open

cursor[bot] wants to merge 1 commit into
masterfrom
claude-rm-preprod-size-analysis-pr-comments-registration

Conversation

@cursor

@cursor cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Remove organizations:preprod-size-analysis-pr-comments from temporary.py. The flag reached GA in the automator in #8928 on 8/3/26 (conditions: [], rollout: 100) and hasn't been touched since.

Merge this last. Order: #129452 (frontend reads) → #129453 (backend reads) → sentry-options-automator#10416 (flagpole value) → this. Nothing validates flagpole.yaml against registrations, so unregistering before the automator value is gone would orphan the YAML block.

Expected CI: red on the backend shard that runs tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py, plus the Backend aggregate. That file still carries @with_feature(...) and self.feature({...: False}) on master, and the testutils Feature helper raises ValueError: Unregistered feature flag for an unregistered name. It clears once #129453 merges. Also expect getsentry dispatch to fail — it gates on the author having write permission, and the author here is cursor[bot]; a collaborator needs to add the Trigger: getsentry tests label.

Stale flag cleanup; flagged by the feature-flag scanner as ga-ready-to-graduate.

Open in Web View Automation 

Reads are removed in #129452 and #129453, and the automator value in
getsentry/sentry-options-automator#10416. Merge this last.

Co-authored-by: charlie.luo <charlie.luo@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 1, 2026
@cursor
cursor Bot requested a review from mtopo27 November 1, 2026 20:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@getsentry/emerge-tools — stale feature flag cleanup for organizations:preprod-size-analysis-pr-comments, 4 of 4. Merge this one last.

Merge order:

  1. #129452 — frontend gate
  2. #129453 — backend reads
  3. getsentry/sentry-options-automator#10416 — the flagpole value
  4. #129454 (this one) — the temporary.py registration

Nothing validates flagpole.yaml against registrations, so unregistering before the automator value is gone would leave that YAML block orphaned with no way to notice.

Two expected failures while this sits on top of today's master:

  • The backend shard running tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py (and the Backend aggregate that rolls it up). That file still carries @with_feature(...) and self.feature({...: False}) on master, and the testutils Feature helper raises ValueError: Unregistered feature flag for a name that is no longer registered. It clears as soon as #129453 merges. Blast radius is one shard, since that is the only test file touching the flag.
  • getsentry dispatch, which gates on the author having write permission; the author is cursor[bot]. A collaborator needs to add the Trigger: getsentry tests label.

Since api_expose=True, this also stops emitting the flag in organization.features, which is the other reason #129452 should land first.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Feature flag cleanup

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 350a0a6 in this run:

tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_creates_comment_when_no_rules_configured — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:149: in test_creates_comment_when_no_rules_configured
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_creates_comment_when_rule_triggered — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:122: in test_creates_comment_when_rule_triggered
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_end_to_end_triggering_rule_creates_comment — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:424: in test_end_to_end_triggering_rule_creates_comment
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_handles_api_error_and_reraises — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:347: in test_handles_api_error_and_reraises
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_retry_after_update_failure_uses_update_not_create — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:377: in test_retry_after_update_failure_uses_update_not_create
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_returns_without_retry_when_commit_comparison_deleted — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:397: in test_returns_without_retry_when_commit_comparison_deleted
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_skips_when_feature_flag_disabled — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:320: in test_skips_when_feature_flag_disabled
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_skips_when_no_client — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:308: in test_skips_when_no_client
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_skips_when_no_size_artifacts — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:219: in test_skips_when_no_size_artifacts
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_skips_when_rules_set_but_nothing_triggered — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:165: in test_skips_when_rules_set_but_nothing_triggered
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_updates_existing_comment_even_without_trigger — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:195: in test_updates_existing_comment_even_without_trigger
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py::CreatePreprodSizePrCommentTaskTest::test_updates_existing_comment_when_all_artifacts_are_skipped — log
[gw1] linux -- Python 3.13.17 /home/runner/work/sentry/sentry/.venv/bin/python3
src/sentry/features/manager.py:266: in _get_feature_class
    return self._feature_registry[name]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'organizations:preprod-size-analysis-pr-comments'

During handling of the above exception, another exception occurred:
src/sentry/testutils/helpers/features.py:72: in features_override
    feature = features.get(name, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:276: in get
    cls = self._get_feature_class(name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/features/manager.py:268: in _get_feature_class
    raise FeatureNotRegistered(name)
E   sentry.features.exceptions.FeatureNotRegistered: The "organizations:preprod-size-analysis-pr-comments" feature has not been registered. Ensure that a feature has been added to sentry.features.default_manager

During handling of the above exception, another exception occurred:
tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py:255: in test_updates_existing_comment_when_all_artifacts_are_skipped
    self._import_task()(artifact.id)
src/sentry/silo/base.py:157: in override
    return original_method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/taskbroker_client/task.py:157: in __call__
    return self._func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/preprod/vcs/pr_comments/size_tasks.py:42: in create_preprod_size_pr_comment_task
    ctx = resolve_pr_comment_context(
src/sentry/preprod/vcs/pr_comments/tasks.py:98: in resolve_pr_comment_context
    if feature_flag is not None and not features.has(feature_flag, organization):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1169: in __call__
    return self._mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1173: in _mock_call
    return self._execute_mock_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.17/x64/lib/python3.13/unittest/mock.py:1240: in _execute_mock_call
    result = effect(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
src/sentry/testutils/helpers/features.py:74: in features_override
    raise ValueError("Unregistered feature flag: %s", repr(name))
E   ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")

@cursor
cursor Bot marked this pull request as ready for review November 1, 2026 20:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CI finished and matches the prediction exactly — 76 green / 15 skipped / 1 neutral / 3 red, where the three reds are backend test (13), the Backend aggregate that rolls it up, and getsentry dispatch.

backend test (13) (shard 14 of 30, which runs tests/sentry/preprod/vcs/pr_comments/test_size_tasks.py) fails with:

ValueError: ('Unregistered feature flag: %s', "'organizations:preprod-size-analysis-pr-comments'")

raised from features_override in src/sentry/testutils/helpers/features.py, because that test file still carries @with_feature(...) on master. It clears the moment #129453 merges; there is nothing to fix here. Marking ready for review, but please keep it last in the merge order.

Status of the other three, all now out of draft:

  • #129452 (frontend gate) — 51 green, only getsentry dispatch red
  • #129453 (backend reads) — 49 green, only getsentry dispatch red
  • getsentry/sentry-options-automator#10416 (flagpole) — 14 green / 2 skipped / 0 red, and its evaluation matrix reports only Removed: feature.organizations:preprod-size-analysis-pr-comments with no result-changing rows

View PR

Open in Web View Automation 

Sent by Cursor Automation: Feature flag cleanup

This branch has not been deployed

No deployments
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