Skip to content

Commit

Permalink
🪟🐛 Connector builder: Always save yaml based manifest (#6486)
Browse files Browse the repository at this point in the history
Co-authored-by: Lake Mossman <lake@airbyte.io>
  • Loading branch information
Joe Reuter and lmossman committed May 12, 2023
1 parent ae03b53 commit f757ccf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,13 @@ export const ConnectorBuilderFormStateProvider: React.FC<React.PropsWithChildren
return;
}
const newProject: BuilderProjectWithManifest = { name: builderFormValues.global.connectorName };
if (lastValidJsonManifest.streams.length > 0) {
// do not save invalid ui-based manifest (e.g. no streams), but always save yaml-based manifest
if (storedEditorView === "yaml" || lastValidJsonManifest.streams.length > 0) {
newProject.manifest = lastValidJsonManifest;
}
await updateProject(newProject);
setPersistedState(newProject);
}, [builderFormValues.global.connectorName, lastValidJsonManifest, updateProject]);
}, [builderFormValues.global.connectorName, lastValidJsonManifest, storedEditorView, updateProject]);

useDebounce(
() => {
Expand Down

0 comments on commit f757ccf

Please sign in to comment.