-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪟 🐛 Update refresh schema logic to handle confirmation modal and othe…
…r edge cases (#19131) * Update refresh schema logic to handle confirmation modal * Update the refresh schema separately * Only mark as refreshed if the syncCatalog has changed * Add option to clear refreshed schema * Update tests * Update connection edit service to track the schema changes separately * ConnectionEditService now marks schema as refreshed only if the catalog has changed, clears refresh after schema update * Add mockCatalog diff and add refresh schema tests to connection edit service * Add interfaces to useConnectionEdit and useConnectionForm to better track references * Remove clearRefreshedSchema from ConnectionReplicationTab form submit * Update useConfirmCatalogDiff to only show if the diff has changed, instead of the whole connection * Cleanup discardRefreshedSchema name in ConnectionReplicationTab
- Loading branch information
Showing
6 changed files
with
234 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
airbyte-webapp/src/test-utils/mock-data/mockCatalogDiff.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { CatalogDiff } from "core/request/AirbyteClient"; | ||
|
||
export const mockCatalogDiff: CatalogDiff = { | ||
transforms: [ | ||
{ | ||
transformType: "update_stream", | ||
streamDescriptor: { namespace: "apple", name: "harissa_paste" }, | ||
updateStream: [ | ||
{ transformType: "add_field", fieldName: ["users", "phone"], breaking: false }, | ||
{ transformType: "add_field", fieldName: ["users", "email"], breaking: false }, | ||
{ transformType: "remove_field", fieldName: ["users", "lastName"], breaking: false }, | ||
|
||
{ | ||
transformType: "update_field_schema", | ||
breaking: false, | ||
fieldName: ["users", "address"], | ||
updateFieldSchema: { oldSchema: { type: "number" }, newSchema: { type: "string" } }, | ||
}, | ||
], | ||
}, | ||
{ | ||
transformType: "add_stream", | ||
streamDescriptor: { namespace: "apple", name: "banana" }, | ||
}, | ||
{ | ||
transformType: "add_stream", | ||
streamDescriptor: { namespace: "apple", name: "carrot" }, | ||
}, | ||
{ | ||
transformType: "remove_stream", | ||
streamDescriptor: { namespace: "apple", name: "dragonfruit" }, | ||
}, | ||
{ | ||
transformType: "remove_stream", | ||
streamDescriptor: { namespace: "apple", name: "eclair" }, | ||
}, | ||
{ | ||
transformType: "remove_stream", | ||
streamDescriptor: { namespace: "apple", name: "fishcake" }, | ||
}, | ||
{ | ||
transformType: "remove_stream", | ||
streamDescriptor: { namespace: "apple", name: "gelatin_mold" }, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.