Skip to content

Commit

Permalink
In Cloud, out of date connectors call always returns 0 (#21126)
Browse files Browse the repository at this point in the history
* isCloudApp returns a boolean now

* Connector service never makes the check updates call in Cloud
  • Loading branch information
krishnaglick authored Jan 6, 2023
1 parent a50e34b commit c1cb763
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions airbyte-webapp/src/services/connector/ConnectorService.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { useConfig } from "config";
import { webBackendCheckUpdates } from "core/request/AirbyteClient";
import { webBackendCheckUpdates, WebBackendCheckUpdatesRead } from "core/request/AirbyteClient";
import { AirbyteRequestService } from "core/request/AirbyteRequestService";
import { useDefaultRequestMiddlewares } from "services/useDefaultRequestMiddlewares";
import { useInitService } from "services/useInitService";
import { isCloudApp } from "utils/app";

class ConnectorService extends AirbyteRequestService {
checkUpdates() {
checkUpdates(): Promise<WebBackendCheckUpdatesRead> {
if (isCloudApp()) {
return Promise.resolve({ sourceDefinitions: 0, destinationDefinitions: 0 });
}
return webBackendCheckUpdates(this.requestOptions);
}
}
Expand Down
2 changes: 1 addition & 1 deletion airbyte-webapp/src/utils/app.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const isCloudApp = () => process.env.REACT_APP_CLOUD || window.CLOUD === "true";
export const isCloudApp = () => (process.env.REACT_APP_CLOUD || window.CLOUD) === "true";

0 comments on commit c1cb763

Please sign in to comment.