rusackas commented on code in PR #37919:
URL: https://github.com/apache/superset/pull/37919#discussion_r3565316284


##########
superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/EncryptedField.tsx:
##########
@@ -220,6 +252,7 @@ export const EncryptedField = ({
                       },
                     });
                     setFileList(info.fileList);
+                    setPendingValidationValue(fileContent);

Review Comment:
   Confirmed real and applied (48254c43ac). Traced the leak: 
`pendingValidationValue` was set on upload but never cleared on removal, so 
after remove-before-commit it stayed dangling — a later unrelated render whose 
value happened to match the removed upload's content would trigger a spurious 
validation call. Now cleared in both `onRemove` and the empty-file-list branch 
of `onChange`. Added a regression test (upload → remove before commit → 
rerender with matching content → assert `getValidation` never fires) — it fails 
against the pre-fix code (verified locally).



-- 
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]

Reply via email to