yousoph commented on PR #41913: URL: https://github.com/apache/superset/pull/41913#issuecomment-5052416340
Great catch — you're right. Because `serializeQueryArgs` strips `forceRefresh`, the subscribed query and the force-refresh trigger share a single cache entry, so `originalArgs.forceRefresh` sticks at `true` after a refresh-button OAuth failure and the `!originalArgs?.forceRefresh` guard then wrongly skips the post-redirect `invalidateTags` refetch. `useTables` has the same guard, so `TableSelector` shares the latent bug too. Fixing it by dropping the `originalArgs`-based guard and using an explicit (non-sticky) refresh flag: `refetch()` sets a ref, and the subscribed-refetch effect becomes the single place that fires the callback — exactly once, with the correct `isRefetched` value (so the "List refreshed" toast still only fires for the explicit refresh button), independent of what last touched the cache entry. Applying it to `schemas.ts`, `catalogs.ts`, and `tables.ts`, with tests for the refresh-button → OAuth → redirect path on each. Pushing shortly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
