-
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
Conversation
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.
I'll defer approval to java devs, but the updated endpoint design works for me!
webhookConfigId: | ||
type: string | ||
format: uuid | ||
description: The id of the webhook configs to use from the workspace. | ||
webhookType: |
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.
accountId: | ||
type: integer | ||
description: The account id associated with the job | ||
jobId: | ||
type: integer | ||
description: The job id associated with the job |
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.
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.
enum: | ||
- generic | ||
- dbtCloud | ||
generic: |
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.
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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm on board with removing it altogether.
airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java
Show resolved
Hide resolved
airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java
Show resolved
Hide resolved
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.
Generally looks good!
Comments on testing & making sure I understand certain bits.
@mfsiega-airbyte is this ready for another review? |
@davinchia this is now ready! |
* add structured dbt cloud information to the operations api * remove unused webhook features, test updates * update tests to use structured dbt cloud operation api * add missing webhook operator type
What
Add structured dbt Cloud information to the Operations API
How
NOTE: this PR has dual-writing when we return results, both to the old and new formations for a "generic webhook". When the frontend switches to the new format, we'll remove the old one.
Recommended reading order
airbyte-api/src/main/openapi/config.yaml
airbyte-server/src/main/java/io/airbyte/server/converters/OperationsConverter.java