Skip to content

fix(metric_stats): Ignore metric stats in tests for now - #99276

Merged
vgrozdanic merged 2 commits into
masterfrom
vg/fix-relay
Sep 11, 2025
Merged

vgrozdanic merged 2 commits into
masterfrom
vg/fix-relay

Conversation

@vgrozdanic

@vgrozdanic vgrozdanic commented Sep 11, 2025 •

Copy link
Copy Markdown
Member

In getsentry/relay#5097 we have removed the metric_stats completely from the relay, but it is still generated as a part of global config in Sentry. This is now preventing us to bump sentry-relay package (#99205), because the tests are failing.

Clean up plan:

  • stop checking for metric_stats in test
  • bump sentry-relay dependency
  • remove metric_stats from sentry codebase

Code used to find the diff:

    for key, value in normalized.items():
        if value != config[key]:
            import difflib
            import pprint

            config_str = pprint.pformat(config[key], width=120, sort_dicts=True)
            value_str = pprint.pformat(value, width=120, sort_dicts=True)
            diff = "\n".join(
                difflib.unified_diff(
                    config_str.splitlines(),
                    value_str.splitlines(),
                    fromfile="config",
                    tofile="normalized",
                    lineterm="",
                )
            )
            print(f"Difference for key '{key}':\n{diff}")
            raise Exception(f"Value for key {key} is not equal to other value")

@vgrozdanic
vgrozdanic requested a review from a team September 11, 2025 07:20
@vgrozdanic
vgrozdanic marked this pull request as ready for review September 11, 2025 07:20
@codecov

codecov Bot commented Sep 11, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #99276      +/-   ##
==========================================
- Coverage   81.24%   81.24%   -0.01%     
==========================================
  Files        8577     8577              
  Lines      379247   379247              
  Branches    24079    24079              
==========================================
- Hits       308135   308130       -5     
- Misses      70756    70761       +5     
  Partials      356      356              

@vgrozdanic
vgrozdanic merged commit 8123dd3 into master Sep 11, 2025
@vgrozdanic
vgrozdanic deleted the vg/fix-relay branch September 11, 2025 08:12
vgrozdanic added a commit that referenced this pull request Sep 12, 2025
Continuation of #99276.

`sentry-relay` has been bumped to a newest version, so now we can remove
`metric_stats` from mocks.
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2025

This branch was successfully deployed

1 active deployment
Preview — c1cf0fa9 Deployed Sep 11, 2025 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants