diff --git a/airbyte-api/build.gradle b/airbyte-api/build.gradle index 311af90d7e5..7903a486cb6 100644 --- a/airbyte-api/build.gradle +++ b/airbyte-api/build.gradle @@ -470,7 +470,12 @@ private def updateApiClientWithFailsafe(def clientPath) { 'val response = client.newCall(request).execute()', '''val call = client.newCall(request) val failsafeCall = FailsafeCall.with(policy).compose(call) - val response: Response = failsafeCall.execute()''') + val response: Response = failsafeCall.execute() + + return response.use { processResponse(response) } + } + + protected inline fun processResponse(response: Response): ApiResponse {''') // add imports if not exist if (!apiClientFileText.contains("import dev.failsafe.RetryPolicy")) { diff --git a/airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderTest.java b/airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderTest.java index 1da5d11698a..59d298f2f29 100644 --- a/airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderTest.java +++ b/airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderTest.java @@ -98,7 +98,7 @@ class BootloaderTest { // ⚠️ This line should change with every new migration to show that you meant to make a new // migration to the prod database private static final String CURRENT_CONFIGS_MIGRATION_VERSION = "0.55.1.003"; - private static final String CURRENT_JOBS_MIGRATION_VERSION = "0.57.2.001"; + private static final String CURRENT_JOBS_MIGRATION_VERSION = "0.50.4.003"; private static final String CDK_VERSION = "1.2.3"; @BeforeEach diff --git a/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/jobs/migrations/V0_57_2_001__AddRefreshJobType.java b/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/jobs/migrations/V0_57_2_001__AddRefreshJobType.java deleted file mode 100644 index 707f9bc0c65..00000000000 --- a/airbyte-db/db-lib/src/main/java/io/airbyte/db/instance/jobs/migrations/V0_57_2_001__AddRefreshJobType.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2020-2024 Airbyte, Inc., all rights reserved. - */ - -package io.airbyte.db.instance.jobs.migrations; - -import org.flywaydb.core.api.migration.BaseJavaMigration; -import org.flywaydb.core.api.migration.Context; -import org.jooq.DSLContext; -import org.jooq.impl.DSL; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class V0_57_2_001__AddRefreshJobType extends BaseJavaMigration { - - private static final Logger LOGGER = LoggerFactory.getLogger(V0_57_2_001__AddRefreshJobType.class); - - @Override - public void migrate(Context context) throws Exception { - final DSLContext ctx = DSL.using(context.getConnection()); - ctx.alterType("job_config_type").addValue("refresh").execute(); - } - -} diff --git a/airbyte-webapp/src/hooks/services/Experiment/experiments.ts b/airbyte-webapp/src/hooks/services/Experiment/experiments.ts index c315c339727..e9d4f7ff3c7 100644 --- a/airbyte-webapp/src/hooks/services/Experiment/experiments.ts +++ b/airbyte-webapp/src/hooks/services/Experiment/experiments.ts @@ -7,6 +7,7 @@ */ export interface Experiments { + "authPage.keycloak": boolean; "authPage.rightSideUrl": string | undefined; "authPage.signup.hideCompanyName": boolean; "authPage.signup.hideName": boolean; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx index f1a9a694a3c..9a36045a4e8 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx @@ -18,6 +18,7 @@ import { PageTrackingCodes, useTrackPage } from "core/services/analytics"; import { useAuthService } from "core/services/auth"; import { useLocalStorage } from "core/utils/useLocalStorage"; import { useAppMonitoringService } from "hooks/services/AppMonitoringService"; +import { useExperiment } from "hooks/services/Experiment"; import { useNotificationService } from "hooks/services/Notification"; import { CloudRoutes } from "packages/cloud/cloudRoutePaths"; import { LoginFormErrorCodes } from "packages/cloud/services/auth/types"; @@ -54,7 +55,9 @@ export const LoginPage: React.FC = () => { const { registerNotification } = useNotificationService(); const { trackError } = useAppMonitoringService(); const [searchParams] = useSearchParams(); - const [keycloakAuthEnabled] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const [keycloakAuthEnabledLocalStorage] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const keycloakAuthEnabledExperiment = useExperiment("authPage.keycloak", false); + const keycloakAuthEnabled = keycloakAuthEnabledExperiment || keycloakAuthEnabledLocalStorage; const loginRedirectString = searchParams.get("loginRedirect"); const isAcceptingInvitation = loginRedirectString?.includes("accept-invite"); diff --git a/airbyte-webapp/src/packages/cloud/views/auth/OAuthLogin/OAuthLogin.tsx b/airbyte-webapp/src/packages/cloud/views/auth/OAuthLogin/OAuthLogin.tsx index 2cb48497aa6..693372685a5 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/OAuthLogin/OAuthLogin.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/OAuthLogin/OAuthLogin.tsx @@ -14,6 +14,7 @@ import { Spinner } from "components/ui/Spinner"; import { AuthOAuthLogin, OAuthProviders } from "core/services/auth"; import { useLocalStorage } from "core/utils/useLocalStorage"; +import { useExperiment } from "hooks/services/Experiment"; import { CloudRoutes } from "packages/cloud/cloudRoutePaths"; import { useKeycloakService } from "packages/cloud/services/auth/KeycloakService"; @@ -75,7 +76,9 @@ export const OAuthLogin: React.FC = ({ loginWithOAuth, type }) const [searchParams] = useSearchParams(); const loginRedirect = searchParams.get("loginRedirect"); const navigate = useNavigate(); - const [keycloakAuthEnabled] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const [keycloakAuthEnabledLocalStorage] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const keycloakAuthEnabledExperiment = useExperiment("authPage.keycloak", false); + const keycloakAuthEnabled = keycloakAuthEnabledExperiment || keycloakAuthEnabledLocalStorage; const { redirectToSignInWithGithub, redirectToSignInWithGoogle, diff --git a/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/SignupPage.tsx b/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/SignupPage.tsx index ca0919704fc..2aa12adac51 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/SignupPage.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/SignupPage.tsx @@ -11,6 +11,7 @@ import { Icon } from "components/ui/Icon"; import { PageTrackingCodes, useTrackPage } from "core/services/analytics"; import { useAuthService } from "core/services/auth"; +import { useExperiment } from "hooks/services/Experiment"; import { SignupForm } from "./components/SignupForm"; import styles from "./SignupPage.module.scss"; @@ -32,7 +33,9 @@ const Detail: React.FC> = ({ children }) => { }; const SignupPage: React.FC = () => { - const [keycloakAuthEnabled] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const [keycloakAuthEnabledLocalStorage] = useLocalStorage("airbyte_keycloak-auth-ui", false); + const keycloakAuthEnabledExperiment = useExperiment("authPage.keycloak", false); + const keycloakAuthEnabled = keycloakAuthEnabledExperiment || keycloakAuthEnabledLocalStorage; const { loginWithOAuth, signUp } = useAuthService(); useTrackPage(PageTrackingCodes.SIGNUP);