-
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
In Cloud, out of date connectors call always returns 0 #21126
In Cloud, out of date connectors call always returns 0 #21126
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.
Changes LGTM
import { AirbyteRequestService } from "core/request/AirbyteRequestService"; | ||
import { useDefaultRequestMiddlewares } from "services/useDefaultRequestMiddlewares"; | ||
import { useInitService } from "services/useInitService"; | ||
import { isCloudApp } from "utils/app"; |
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 great as a hotfix—small, simple, direct, effective—but I do think that a good follow-up would be editing the conditional to check if FeatureItem.AllowUpdateConnectors
is enabled instead of checking isCloud()
. It looks like we don't really have an API for that besides useFeature
, which is a bummer: right now this module doesn't introduce any react-specific context like hooks impose.
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.
Doing conditionals with hooks always gets awkward, but yeah.
We're going to revert the backend change Monday so maybe @josephkmh can make that change if he gets to it before I'm online!
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 agreed - I have an open issue here proposing that approach. I'll keep that issue open as a refactor of this hotfix.
* isCloudApp returns a boolean now * Connector service never makes the check updates call in Cloud
What
In Cloud, out of date connectors call always returns 0
How
The app checks if it's running in Cloud mode, and if so doesn't make the call to the server to get out of date connectors; it just returns 0 out of date connectors.
Additionally, the check now properly returns a boolean.