-
Notifications
You must be signed in to change notification settings - Fork 281
Bug 2060541 - Recheck auth status on startup, weekly #7564
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
Open
bytesized
wants to merge
1
commit into
mozilla:main
Choose a base branch
from
bytesized:5386
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+158
−22
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I see your point about resetting this timer and the
Unititialized -> AuthIssuestransition. My one idea here is to rename this tolast_auth_check_timeand set it in whenevercheck_authorization_status()is called (or maybe just whenever it fails?). I think that might give you the timer you need without the having to callreset_auth_recheck_timerin so many places. However, I'm not sure and I'm okay with the repetition if that's what we need to do. However you want to handle this is fine with me.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.
My concern with this solution is that there are other ways that we can get into the
AuthIssuesstate. Here, for example. With the proposed design, that line (and several others) would put us into theAuthIssuesstate and then we would re-check on the very next initialization. I assume that this isn't really the behavior that we want.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.
I suspect that the those cases are buggy and we should fix those. For example, I think we should just get rid of the CallGetProfile event. Can you make a list of the other cases where you think there could be an issue? I'd love to go through them.
In the meantime, maybe we should just leave this code as-is. I don't want block this PR on figuring all that out.
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.
Aside from the one listed above, there is:
Connectedstate, butaccount.finish_initializefails.WebChannelPasswordChangeevent from theConnectedstate andhandle_web_channel_password_changefails.AuthIssuesstate, get theBeginOAuthFlowevent, andbegin_oauth_flowfails.AuthIssuesstate, get theWebChannelPasswordChangeevent, andhandle_web_channel_password_changefails.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.
Another possibility here is that we could just accept the behavior of doing one check on the very next initialization after the
AuthIssuestransition. That would simplify the code a bit since we would only reset the timer in one place. And if we did somehow end up in a situation where someone was frequently getting into that state, it would fix itself quickly instead of fixing itself once a week.