EnxDev commented on code in PR #36880:
URL: https://github.com/apache/superset/pull/36880#discussion_r3194743320
##########
superset-frontend/src/features/databases/DatabaseModal/index.tsx:
##########
@@ -811,6 +823,15 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps>
= ({
[onChange, handleClearValidationErrors],
);
+ const getBlurValidation = useCallback(() => {
+ const currentDbSnapshot = JSON.stringify(db);
+ if (currentDbSnapshot === lastValidatedDbSnapshotRef.current) {
+ return Promise.resolve([]);
+ }
+ lastValidatedDbSnapshotRef.current = currentDbSnapshot;
+ return getValidation(db);
+ }, [db, getValidation]);
Review Comment:
Addressed in 3e26f02. `getValidation` now returns `null` on unexpected
request failures (network drop / no JSON body), and the snapshot cache is only
updated after a usable response, so transient failures retry on the next blur.
--
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]