-
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
🪟 🐛 Add DbtCloudErrorBoundary #20616
🪟 🐛 Add DbtCloudErrorBoundary #20616
Conversation
@mfsiega-airbyte, I tried loading the transformation tab for an account using a deleted access token, but got a 500 response from the list dbt jobs endpoint. This error shouldn't propagate to the point that it crashes a server thread, it should rather be a 4XX status, ideally including the dbt Cloud API payload so the frontend can display something useful to the user. Not urgent: in the short-term, I'll just clean up this code in order to make the generic message ready to merge and in the medium term I'm going to be pretty focused on free connectors. |
@ambirdsall just wanted to check - do we want to try to merge this? We got another similar report today. |
@mfsiega-airbyte @ambirdsall Just bumping this to see if we can proceed with the related OC issue? |
@TBernstein4 @mfsiega-airbyte I don't think there's any reason to hold off on getting this merged: it would be nice to iterate a little further on the code to parse out dbt-sourced error messages, but even if it shows the generic fallback message 100% of the time that's a clear improvement over the app's current behavior. I'll resolve all conflicts and pull this PR out of draft status so we can ship it soon. |
b4d5163
to
4dad820
Compare
Just to check - what did the validation look like here? (Looks reasonable to me, as long as it Works.) |
4dad820
to
a60b8cd
Compare
@@ -25,6 +25,50 @@ interface DbtJobListValues { | |||
jobs: DbtCloudJob[]; | |||
} | |||
|
|||
const DbtCloudErrorBoundary = class extends React.Component { |
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 file is getting really full of components - could we split this into a new file to ease readability & file navigation?
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.
@ambirdsall not sure if you intend to address this comment still?
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.
@josephkmh this is what happens when I make a mental note but not a physical one. Great point, totally slipped my mind 🤦 👍
...te-webapp/src/pages/connections/ConnectionTransformationPage/DbtCloudTransformationsCard.tsx
Outdated
Show resolved
Hide resolved
...te-webapp/src/pages/connections/ConnectionTransformationPage/DbtCloudTransformationsCard.tsx
Outdated
Show resolved
Hide resolved
a0ad62c
to
6ddd82c
Compare
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.
Code LGTM - just one of my comments is still open: #20616 (comment)
Not sure if you want to address that before merging? OK for me either way 👍
6ddd82c
to
9634479
Compare
@josephkmh I split out helper components. The main component has a lot less code to wade through, now. The scss import lint rule meant I had to restructure the CSS, too, so I recorded a screen capture (using a chrome extension to trigger artificial API errors) to show the actual rendered styles in the different contexts (a 500 response to |
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.
Thanks for breaking out those components into separate files! Looks good
It's a bit more efficient and I don't need any of the other things provided by `useCurrentWorkspace`.
I put a little effort into keeping all of the API interactions within the top-level component, and a linting rule required me to split out individual stylesheets for each helper component (plus one non-module scss file for shared card styles that individual scss modules can `@forward`)
7c038de
to
f10a7ac
Compare
What
Adds an error boundary for the dbt cloud integration. As a follow up, I would like to better test out the error response coming from the server; while I did use the actual JSON structure of a known dbt Cloud error response and code the error parsing defensively (so if it's incorrect it should gracefully fall back to a generic error UI instead of erroring) , all my attempts to actually trigger an error response from dbt Cloud caused downstream errors in the cloud server and thus a
500
response with no forwarding of dbt Cloud's4XX
response payload.Closes #20441, but not https://github.com/airbytehq/airbyte-cloud/issues/4181