Issuer Alerts do not properly prevent duplicates
We have a bug when we try to detect a duplicate rule. When we go to compare "actions", we end up comparing 2 different formatted values. We compare serialized data, vs raw DB data, and the types of the 2 are completely different. What this means, is that all this time, we've had false negatives, and have incorrectly been letting rules be created that are actually duplicates.
I did some digging, and found where this bug is in the code, and have a way to avoid it. I can also reproduce this over and over again on production.
This effects us any time we try to duplicate a rule, or if we edit a rule. Look at these videos. In one, I duplicate without any changes at all. In the second, I modify a different rule to be the same as an existing rule.
https://github.com/getsentry/sentry/assets/5581484/8e89fb82-a7e3-44d6-944f-11e98c3e8450
https://github.com/getsentry/sentry/assets/5581484/0d1b16a4-37aa-4f4a-ad6e-dcb4a29e6bc7
Routing to @getsentry/product-owners-alerts for triage ⏲️