-
Notifications
You must be signed in to change notification settings - Fork 40
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
Don't recreate the same channel due to https errors. Closes #1348 #1355
Don't recreate the same channel due to https errors. Closes #1348 #1355
Conversation
Not sure if this is completed yet, but I'm still able to reproduce brave-intl/creators-private-issues#845 on this branch |
I was investigating what to do in that case because really what happens is that the domain normalizer strips everything and goes to So we'd need to write some code to handle that in this method EDIT: Whoops, I was thinking of a different issue 😅 |
Spoke with Nick Action items: |
|
||
details.channel.destroy | ||
channels.joins(:site_channel_details).each do |channel| | ||
raise unless channel.details.verification_method.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change this to
raise if channel.details.verification_method.present?
i think that's slightly more readable
@corymcdonald I agree that this solution doesn't explain the whole story. The issue's wording should be restructured, as the issue you're seeing might not be an issue, and I thought it had tied into another issue in Sentry. I think we should continue to allow users to make channels that haven't fulfilled the flow (it's a tradeoff between refactoring a bunch of logic and inheriting more risk or maintain a confusing mental model of visible and non-visible/abandoned channels 😞 ) I originally intended to solve https://sentry.io/brave-software/publishers-production-t2/issues/761612367/?query=is:unresolved and brave-intl/creators-private-issues#845 in this PR. However, they seem to be separate problems: the sentry error was 1 simple bad channel in which I fixed. This PR solves some weird state called To elaborate further on the Sentry error: We have this constraint that prevents a publisher from creating duplicates (and somehow, someone got around it. I don't think it's a race condition though):
Anyways, an elegant solution to solve brave-intl/creators-private-issues#845 for a dropped funnel, is to allow the user to continue from where they left off. However, there's several channels that are abandoned and not meant to be visible. Overall the state transitions for adding a channel are confusing, but they haven't caused any major issues, yet (except for us developers). |
…1348" This reverts commit 3d681a7.
…verification pages.
2c56ebf
to
2fd4e6d
Compare
should be resolved now, the verification method wasn't being set which is needed to make a channel visible |
Submitter Checklist:
Test Plan:
Reviewer Checklist:
Tests
Security:
html_safe
andraw
; escape untrusted content from users and 3rd party APIs (Rails XSS guide and OWASP XSS Prevention Cheat Sheet)