-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 🪟 [Connector Builder] Resolve manifest before converting to builder form values #21898
Conversation
@@ -234,7 +164,7 @@ describe("Conversion successfully results in", () => { | |||
]); | |||
}); | |||
|
|||
it("spec properties converted to input overrides on matching auth keys", () => { | |||
it("spec properties converted to input overrides on matching auth keys", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of small async
/await
changes in this file, since convertToBuilderFormValues
is now an async function
This is super nice! Trying this with real manifest I found a few generic issues in our conversion code: https://docs.google.com/document/d/1694N09qm839yEtsSrGfC1ptDCickVm9cQWsSYBSiT-Q/edit?usp=sharing I don't think we need to solve all of them and most likely on a separate PR, but in order to make the "upload a yaml file" CTA useful I think we should solve the most critical ones. If you agree I can split it into issues |
@flash1293 thanks for compiling this! I agree we should solve these, though I think we can merge this PR in in its current state and split the doc into tickets as you suggested 👍 |
I think something went wrong with the auto-formatting |
Woah, yep you're right. I'll work on fixing |
0e53ee2
to
f9c1b89
Compare
f9c1b89
to
6a940d6
Compare
@flash1293 this should be fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What
Closes #21610
Now that we have an endpoint in the connector builder server to resolve all $refs and $options in a manifest, this PR makes the connector builder call that endpoint on the YAML manifest in the editor before converting it to UI.
How
manifestToBuilderForm.ts
to a custom hookuseManifestToBuilderForm.ts
, since it needs to use theuseResolveManifest()
hook nowconvertToBuilderFormValues
to call the resolve endpoint at the beginning of the function, and use the result in the rest of the conversionasync
, so update its usages and the tests to be async as well