Skip to content
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

test: Simulate outages #514

Merged
merged 9 commits into from
Oct 5, 2023
Merged

test: Simulate outages #514

merged 9 commits into from
Oct 5, 2023

Conversation

xplato
Copy link
Contributor

@xplato xplato commented Oct 4, 2023

Adds the ability to simulate outages by toggling between publishable keys.

Screenshot 2023-10-03 at 6 31 13 PM

Note: Going from Normal to Outage sometimes requires a reload. Any ideas on how we can eliminate this?

@xplato
Copy link
Contributor Author

xplato commented Oct 4, 2023

@razor-x I keep getting 401 errors in CI. Is this an issue on my end?

@razor-x
Copy link
Member

razor-x commented Oct 4, 2023

Note: Going from Normal to Outage sometimes requires a reload. Any ideas on how we can eliminate this?

It may be something with the react query cache, it's possible if there is an error the behavior is to keep the latest data. Is there a way to reset the cache when switching the global arg?

Actually, this may be a more general issue I posted here where cache is not reset when auth changes: #462

Might be more serious then I originally thought.

@xplato
Copy link
Contributor Author

xplato commented Oct 5, 2023

@razor-x Yeah, probably the cache. We can manually reset it either via the queryClient or by a new QueryCache(), but I don't know the opportune time to do this (I tried adding the latter logic in preview.tsx but it didn't seem to have an effect; may need to be nested within the QueryProvider).

Is this cache clearing logic something we'd like to add to our primary provider or do we want to encapsulate it within Storybook (if possible)?

In any case, is this a blocker for this PR?

@xplato xplato marked this pull request as ready for review October 5, 2023 16:47
@xplato xplato requested a review from razor-x as a code owner October 5, 2023 16:47
Have absolutely no clue why/how this was modified....
@razor-x
Copy link
Member

razor-x commented Oct 5, 2023

Not a blocker for this.

@xplato xplato merged commit 4bf5313 into main Oct 5, 2023
@xplato xplato deleted the simulate-outage branch October 5, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants