diff --git a/package-lock.json b/package-lock.json index 450e46329..05ab57423 100644 --- a/package-lock.json +++ b/package-lock.json @@ -127,8 +127,8 @@ "vitest-mock-extended": "^1.3.1" }, "engines": { - "node": "20.10.0", - "npm": "10.2.3" + "node": ">=20", + "npm": "^10" } }, "node_modules/@adobe/css-tools": { diff --git a/package.json b/package.json index 2659a111d..8ad2d2383 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "index.js", "private": true, "engines": { - "node": "20.10.0", - "npm": "10.2.3" + "node": ">=20", + "npm": "^10" }, "scripts": { "build": "vite build", diff --git a/src/api/dataPlanes.ts b/src/api/dataPlanes.ts index 285966eac..2d7bbbf47 100644 --- a/src/api/dataPlanes.ts +++ b/src/api/dataPlanes.ts @@ -35,7 +35,7 @@ const COLUMNS = [ 'cidr_blocks', 'gcp_service_account_email', 'aws_iam_user_arn', - // 'aws_link_endpoints', uncomment after https://github.com/estuary/flow/pull/1816 is done + // 'aws_link_endpoints', TODO uncomment after https://github.com/estuary/flow/pull/1816 is done ]; const QUERY = COLUMNS.join(','); diff --git a/src/components/editor/MonacoEditor/index.tsx b/src/components/editor/MonacoEditor/index.tsx index d0042233b..ab304dc65 100644 --- a/src/components/editor/MonacoEditor/index.tsx +++ b/src/components/editor/MonacoEditor/index.tsx @@ -169,11 +169,6 @@ function MonacoEditor({ // Make sure we have all the props needed to update the value if (validValue && catalogName && catalogType) { - logRocketConsole('editor:update:saving', { - processedVal, - catalogName, - catalogType, - }); setStatus(EditorStatus.SAVING, evaluatedPath); // Check if there is a scope to update (ex: Schema editing for bindings editor) diff --git a/src/stores/DetailsForm/Store.ts b/src/stores/DetailsForm/Store.ts index 0617f3a20..1298a2f6e 100644 --- a/src/stores/DetailsForm/Store.ts +++ b/src/stores/DetailsForm/Store.ts @@ -4,7 +4,7 @@ import { getLiveSpecs_detailsForm } from 'api/liveSpecsExt'; import { GlobalSearchParams } from 'hooks/searchParams/useGlobalSearchParams'; import produce from 'immer'; import { isEmpty } from 'lodash'; -import { logRocketConsole, logRocketEvent } from 'services/shared'; +import { logRocketEvent } from 'services/shared'; import { CustomEvents } from 'services/types'; import { DATA_PLANE_SETTINGS } from 'settings/dataPlanes'; import { @@ -39,9 +39,6 @@ const getConnectorImage = async ( connectorId: string, existingImageTag?: ConnectorVersionEvaluationOptions['existingImageTag'] ): Promise => { - logRocketConsole('DetailsFormHydrator>getConnectorImage', { - connectorId, - }); const { data, error } = await getConnectors_detailsForm(connectorId); if (!error && data && data.length > 0) { @@ -68,6 +65,25 @@ const getDataPlane = ( return selectedOption; } + // TODO (private data plane) - we need to add support for allowing tenants to configure their + // preferred data plane. + + // If we are not trying to find a specific data plane and there is only one option + // and it is private we are pretty safe in prefilling that one. + if ( + !dataPlaneId && + dataPlaneOptions.length === 1 && + dataPlaneOptions[0].dataPlaneName.whole.includes( + DATA_PLANE_SETTINGS.private.prefix + ) + ) { + logRocketEvent(CustomEvents.DATA_PLANE_SELECTOR, { + defaultedPrivate: true, + }); + return dataPlaneOptions[0]; + } + + // Try to find the default public data plane const defaultOption = dataPlaneOptions.find( ({ dataPlaneName }) => dataPlaneName.whole === @@ -193,9 +209,6 @@ export const getInitialState = ( set( produce((state: DetailsFormState) => { if (connectorImage.id === '') { - logRocketConsole( - 'DetailsFormHydrator>setDetails_connector>resetting' - ); state.details.data.connectorImage = getInitialStateData().details.data.connectorImage; } else { @@ -299,24 +312,11 @@ export const getInitialState = ( workflow === 'capture_create' || workflow === 'materialization_create'; - logRocketConsole('DetailsFormHydrator>hydrateState', { - connectorId, - createWorkflow, - dataPlaneId, - liveSpecId, - searchParams: searchParams.toString(), - workflow, - }); - if (connectorId) { let dataPlaneOptions: DataPlaneOption[] = []; const dataPlaneResponse = await getDataPlaneOptions(); - logRocketConsole( - 'DetailsFormHydrator>hydrateState>getDataPlaneOptions' - ); - if ( !dataPlaneResponse.error && dataPlaneResponse.data && @@ -326,9 +326,6 @@ export const getInitialState = ( generateDataPlaneOption ); - logRocketConsole( - 'DetailsFormHydrator>hydrateState>setDataPlaneOptions' - ); get().setDataPlaneOptions(dataPlaneOptions); } else { get().setHydrationError( @@ -338,30 +335,10 @@ export const getInitialState = ( } if (createWorkflow) { - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow' - ); const connectorImage = await getConnectorImage(connectorId); - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow>getConnectorImage', - { - connectorId: connectorImage?.connectorId, - connectorImageId: connectorImage?.id, - } - ); - const dataPlane = getDataPlane(dataPlaneOptions, dataPlaneId); - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow>getDataPlane', - { - dataPlaneName: dataPlane?.dataPlaneName, - } - ); if (connectorImage && dataPlane === null) { - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow>setDetails_connector' - ); get().setDetails_connector(connectorImage); const { @@ -374,10 +351,6 @@ export const getInitialState = ( errors, }); } else if (connectorImage && dataPlane !== null) { - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow>setDetails_connector&setDetails_dataPlane' - ); - get().setDetails_connector(connectorImage); const { @@ -391,9 +364,6 @@ export const getInitialState = ( errors, }); } else { - logRocketConsole( - 'DetailsFormHydrator>hydrateState>createWorkflow>setHydrationErrorsExist' - ); get().setHydrationErrorsExist(true); } } else if (liveSpecId) { diff --git a/src/stores/EndpointConfig/Hydrator.tsx b/src/stores/EndpointConfig/Hydrator.tsx index c14e0c446..f613f3134 100644 --- a/src/stores/EndpointConfig/Hydrator.tsx +++ b/src/stores/EndpointConfig/Hydrator.tsx @@ -29,13 +29,6 @@ export const EndpointConfigHydrator = ({ children }: BaseComponentProps) => { const hydrateState = useEndpointConfig_hydrateState(); const setActive = useEndpointConfig_setActive(); - logRocketConsole('EndpointConfigHydrator', { - runHydration: Boolean(runHydration.current), - hydrated, - connectorTagId, - entityType, - }); - useEffect(() => { if ( runHydration.current && diff --git a/src/stores/EndpointConfig/Store.ts b/src/stores/EndpointConfig/Store.ts index abbd4e0a0..746f8a90e 100644 --- a/src/stores/EndpointConfig/Store.ts +++ b/src/stores/EndpointConfig/Store.ts @@ -4,7 +4,6 @@ import { GlobalSearchParams } from 'hooks/searchParams/useGlobalSearchParams'; import produce from 'immer'; import { isEmpty } from 'lodash'; import { createJSONFormDefaults } from 'services/ajv'; -import { logRocketConsole } from 'services/shared'; import { CustomError, fetchErrors, @@ -217,35 +216,14 @@ const getInitialState = ( get().setServerUpdateRequired(true); } - logRocketConsole('EndpointConfigHydrator>hydrateState', { - active: get().active, - }); - if (get().active && connectorTagId && connectorTagId.length > 0) { - logRocketConsole( - 'EndpointConfigHydrator>hydrateState>fetch>getSchema_Endpoint', - { - active: get().active, - } - ); - const { data, error } = await getSchema_Endpoint(connectorTagId); if (error) { - logRocketConsole( - 'EndpointConfigHydrator>hydrateState>fetch>setHydrationErrorsExist', - { - active: get().active, - } - ); get().setHydrationErrorsExist(true); } if (get().active && data) { - logRocketConsole( - 'EndpointConfigHydrator>hydrateState>fetch>setEndpointSchema' - ); - await get().setEndpointSchema( data.endpoint_spec_schema as unknown as Schema );