-
Notifications
You must be signed in to change notification settings - Fork 326
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
Invalidate queries when the user goes online + Fix offline mode #11944
Conversation
🧪 Storybook is successfully deployed!📊 Dashboard:
|
# Conflicts: # app/gui/src/dashboard/providers/AuthProvider.tsx
Something is wrong with logging auth.. it is especially visible when I switch builds between environments. I was even able to lock myself out from the account (google sign in didnt work, even after cleaning all local storages) Screen.Recording.2025-01-06.at.13.58.48.mp4 |
@PabloBuchu The invariant should be addressed in #11988 I think that switching between envs might trigger unexpected behavior as we don't nuke the persister storage when env change. This shouldn't be an issue for the end users though. Created an issue: https://github.com/enso-org/cloud-v2/issues/1665 |
* | ||
* Currently used in unit tests to mock the Auth Provider API | ||
*/ | ||
export interface ISessionProvider { |
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.
we typically don't do IInterfaceName
in TS
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.
Yeah, worth noting that we use interface
as much as possible. And in most of the cases we don't need the I
prefix, but for these interfaces, that supposed to be as implementation
for classes
, I think this might make sense, WDYT?
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.
CR ✅
# Conflicts: # app/gui/src/dashboard/App.tsx # app/gui/src/dashboard/providers/__test__/SessionProvider.test.tsx
Closes: enso-org/cloud-v2#1630 1. Invalidate remote backend queries when user goes online 2. Moves auth-related logic from `AuthProvider` to `SessionProvider` 3. Do not log user out if `users/me` returns 401
Pull Request Description
Closes: https://github.com/enso-org/cloud-v2/issues/1630
AuthProvider
toSessionProvider
users/me
returns 401Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.