-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add structured dbt cloud information to the operations api #19395
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
Changes from 1 commit
032df58
a4c0aec
24cf477
810a890
e70396d
3fbd8dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3778,19 +3778,47 @@ components: | |
type: string | ||
OperatorWebhook: | ||
type: object | ||
required: | ||
- executionUrl | ||
properties: | ||
executionUrl: | ||
type: string | ||
description: The URL to call to execute the webhook operation via POST request. | ||
executionBody: | ||
type: string | ||
description: If populated, this will be sent with the POST request. | ||
webhookConfigId: | ||
type: string | ||
format: uuid | ||
description: The id of the webhook configs to use from the workspace. | ||
webhookType: | ||
type: string | ||
enum: | ||
- generic | ||
- dbtCloud | ||
generic: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious, is the idea to remove generic once the webapp switches over to the dbtCloud one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea was actually leave it around, but that's a good point - it's basically dead code, since nothing will be using it. I'm happy to eliminate it, and just have structured dbtCloud (plus the deprecated fields, which will indeed be removed soon). Also happy to leave it, as a marker to say "generic webhook operations are a possible thing". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think at minimum we should remove the backend code to make it clear it's not executed on. We can leave the interface around with the above comment so we don't have to redesign it. I have a slight preference to remove, however mainly neutral here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I'm on board with removing it altogether. |
||
type: object | ||
required: | ||
- executionUrl | ||
properties: | ||
executionUrl: | ||
type: string | ||
description: The URL to call to execute the webhook operation via POST request. | ||
executionBody: | ||
type: string | ||
description: If populated, this will be sent with the POST request. | ||
dbtCloud: | ||
type: object | ||
required: | ||
- accountId | ||
- jobId | ||
properties: | ||
accountId: | ||
type: integer | ||
description: The account id associated with the job | ||
jobId: | ||
type: integer | ||
description: The job id associated with the job | ||
Comment on lines
+3796
to
+3801
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the same field names and types is the key thing to make the frontend DX smooth 👍. Using the same type through the whole "list -> select -> submit" pipeline would let the frontend code be even cleaner, but not by a big enough margin to justify a lot of backend hassle. |
||
executionUrl: | ||
type: string | ||
description: DEPRECATED. Populate generic.executionUrl instead. | ||
deprecated: true | ||
executionBody: | ||
type: string | ||
description: DEPRECATED. Populate generic.executionBody instead. | ||
deprecated: true | ||
CheckOperationRead: | ||
type: object | ||
required: | ||
|
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.
This is a nice little affordance, lets the frontend use
if (operatorWebhook.webhookType === "dbtCloud")
to narrow the type checking to dbtCloud-specific fields.