-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Making single port 8000 default and update NetworkErrorBoundary #3656
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.
Wow this was super fast! Thanks!
Two things:
- Can you also modify the port forwarding instructions in
docs/deploying-airbyte/*
? - Unfortunately we're blocked on merging this until the error handling is fixed. Waiting to see what's necessary from Artem.
@@ -14,9 +14,9 @@ class NetworkErrorBoundary extends React.Component< | |||
static getDerivedStateFromError(error: { | |||
message: string; | |||
status?: number; | |||
}): { unReachServer: boolean } { | |||
}): { unReachServer: boolean, status: number } { |
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 thought this section needed to read more like:
static getDerivedStateFromError(error: {
message: string;
status?: number;
}): { unReachServer: boolean } {
// Update state so the next render will show the fallback UI.
return {
unReachServer:
error.message === "Failed to fetch" ||
(error.status !== undefined && error.status === 502),
};
}
It's trying to set the unReachServer
boolean to whether or not it should show the "server is loading error". We want to show that error when there's an error message that contains "Failed to fetch" or if the status code is set and the status code is 502 (which means the underlying service we're proxying through isn't available yet).
However, both versions (the one in this PR and the version above), I got a Uncaught SyntaxError: Unexpected token < in JSON at position 0
. I believe this is because /api/v1/workspaces/get
is getting an HTML An error occurred
502 page from nginx, which is not JSON.
@jamakase what's the best way to handle this?
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.
In PR #3438 I totally refactored how we handle errors and introduced a richer error hierarchy. You could merge it as is and I will update it to the same format.
It also makes parsing error's response optional, so it won't fail if the error returned is not json.
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.
Oh that's great.
I think that since this won't actually show the "server is loading" error until #3438 it probably makes sense to wait until #3438 is merged, merge the changes into this PR and then merge the PR? Otherwise first time users will be confused about the behavior like before we added the "server is loading" error in the first place.
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.
@jrhizor sounds reasonable to me. I need to address few comments for that PR and after that we could merge. Should I merge master into this branch as soon as we are ready for merging?
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.
Yep, that'd be perfect.
|
working on load balancer as well in k8s Thanks! @MatheusdiPaula |
@MatheusdiPaula could you update your branch and resolve the conflicts? |
To resolve the conflict you should be able to just remove As soon as that's updated here I'll do a final end to end test locally before merging. |
# Conflicts: # airbyte-webapp/src/components/NetworkErrorBoundary/NetworkErrorBoundary.tsx
Branch updated! |
Thanks @MatheusdiPaula! I'll make sure we get this in by EOD tomorrow. |
Thanks so much for this @MatheusdiPaula! I'm going to merge a followup after this but this looks good to go! |
What
It solves #3647
How
I just followed the tasks described
Pre-merge Checklist
Recommended reading order
.env
.env.dev
kube/overlays/stable/.env
kube/overlays/dev/.env
NetworkErrorBoundary.tsx