Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@
let starting = false;

$: isLoading =
$projectQuery.isLoading ||
$user.isLoading ||
$projectQuery.isPending ||
$user.isPending ||
starting ||
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_PENDING ||
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_UPDATING;
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_PENDING;

$: isErrored =
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_ERRORED;
Expand All @@ -101,7 +100,8 @@
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_STOPPING);

$: isReady =
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_RUNNING &&
(deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_RUNNING ||
deploymentStatus === V1DeploymentStatus.DEPLOYMENT_STATUS_UPDATING) &&
runtimeHost !== null &&
instanceId !== null &&
jwt !== null &&
Expand Down
20 changes: 14 additions & 6 deletions web-common/src/features/add-data/manager/steps/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
getRuntimeServiceGetResourceQueryKey,
runtimeServiceDeleteFile,
runtimeServiceGetFile,
runtimeServicePushEnv,
runtimeServicePutFile,
runtimeServiceUnpackEmpty,
type V1ConnectorDriver,
Expand Down Expand Up @@ -50,6 +51,7 @@ import {
getProjectParserVersion,
waitForProjectParserVersion,
} from "@rilldata/web-common/features/entity-management/project-parser.ts";
import { getRuntimeEditEnvironment } from "@rilldata/web-common/features/entity-management/edit-environment.ts";

export async function createConnector({
runtimeClient,
Expand Down Expand Up @@ -150,12 +152,18 @@ export async function createConnector({
}),
)?.resource?.meta?.stateVersion;

await runtimeServicePutFile(runtimeClient, {
path: ".env",
blob: newEnvBlob,
create: true,
createOnly: false,
});
if (existingEnvBlob !== newEnvBlob) {
await runtimeServicePutFile(runtimeClient, {
path: ".env",
blob: newEnvBlob,
create: true,
createOnly: false,
});
if (getRuntimeEditEnvironment() === "cloud") {
// Only push env on cloud for now. We will revisit this for rill-dev.
await runtimeServicePushEnv(runtimeClient, {});
}
}

await runtimeServicePutFile(runtimeClient, {
path: newConnectorFilePath,
Expand Down
6 changes: 6 additions & 0 deletions web-common/src/features/add-data/manager/steps/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
runtimeServiceGenerateCanvasFile,
runtimeServiceGenerateMetricsViewFile,
runtimeServiceGetInstance,
runtimeServicePushEnv,
runtimeServicePutFile,
} from "@rilldata/web-common/runtime-client";
import {
Expand All @@ -37,6 +38,7 @@ import { unsetResourceEnvVars } from "@rilldata/web-common/features/connectors/c
import { maybeGetConnectorDriver } from "@rilldata/web-common/features/add-data/manager/steps/utils.ts";
import { behaviourEvent } from "@rilldata/web-common/metrics/initMetrics.ts";
import { BehaviourEventAction } from "@rilldata/web-common/metrics/service/BehaviourEventTypes.ts";
import { getRuntimeEditEnvironment } from "@rilldata/web-common/features/entity-management/edit-environment.ts";

export async function runImportSteps(
runtimeClient: RuntimeClient,
Expand Down Expand Up @@ -248,6 +250,10 @@ async function runCreateModelStep(
create: true,
createOnly: false,
});
if (getRuntimeEditEnvironment() === "cloud") {
// Only push env on cloud for now. We will revisit this for rill-dev.
await runtimeServicePushEnv(runtimeClient, {});
}
}

let putFile = true;
Expand Down
Loading