Check the output of _scheduled_refresh to prevent TypeError#8518
Open
TheoMathurin wants to merge 2 commits intoholoviz:mainfrom
Open
Check the output of _scheduled_refresh to prevent TypeError#8518TheoMathurin wants to merge 2 commits intoholoviz:mainfrom
_scheduled_refresh to prevent TypeError#8518TheoMathurin wants to merge 2 commits intoholoviz:mainfrom
Conversation
_scheduled_refresh to prevent TypeError
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8518 +/- ##
==========================================
- Coverage 86.24% 86.13% -0.11%
==========================================
Files 349 349
Lines 55388 55388
==========================================
- Hits 47769 47711 -58
- Misses 7619 7677 +58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
I think there could be OAuth implementations that do not provide a |
Contributor
Author
|
Indeed, what about just checking on |
Member
|
That makes sense to me. |
…dle None value for expiry
Contributor
Author
|
Can we rerun the tests? I don't think the failures are related to these changes. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes #8517
Several ways to go here, I went for the replacement of the
user not in state._oauth_user_overridescondition for a direct check on the output of_scheduled_refresh. The former is only one path that leads to the outputs beingNone.Also I chose to check on every single of the three outputs to be sure, but that's probably not strictly necessary.
Happy to consider alternatives. We could for instance, when the refresh fails, choose to raise an exception and catch it.
How Has This Been Tested?
As I could not create an MRE, I could not test but the logic is pretty straightforward.