File tree Expand file tree Collapse file tree
web-admin/src/routes/[organization]/[project]/-/edit
web-common/src/features/add-data/manager/steps Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686 let starting = false ;
8787
8888 $ : isLoading =
89- $projectQuery .isLoading ||
90- $user .isLoading ||
89+ $projectQuery .isPending ||
90+ $user .isPending ||
9191 starting ||
92- deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_PENDING ||
93- deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_UPDATING ;
92+ deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_PENDING ;
9493
9594 $ : isErrored =
9695 deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_ERRORED ;
101100 deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_STOPPING );
102101
103102 $ : isReady =
104- deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_RUNNING &&
103+ (deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_RUNNING ||
104+ deploymentStatus === V1DeploymentStatus .DEPLOYMENT_STATUS_UPDATING ) &&
105105 runtimeHost !== null &&
106106 instanceId !== null &&
107107 jwt !== null &&
Original file line number Diff line number Diff line change 55 getRuntimeServiceGetResourceQueryKey ,
66 runtimeServiceDeleteFile ,
77 runtimeServiceGetFile ,
8+ runtimeServicePushEnv ,
89 runtimeServicePutFile ,
910 runtimeServiceUnpackEmpty ,
1011 type V1ConnectorDriver ,
@@ -50,6 +51,7 @@ import {
5051 getProjectParserVersion ,
5152 waitForProjectParserVersion ,
5253} from "@rilldata/web-common/features/entity-management/project-parser.ts" ;
54+ import { getRuntimeEditEnvironment } from "@rilldata/web-common/features/entity-management/edit-environment.ts" ;
5355
5456export async function createConnector ( {
5557 runtimeClient,
@@ -150,12 +152,18 @@ export async function createConnector({
150152 } ) ,
151153 ) ?. resource ?. meta ?. stateVersion ;
152154
153- await runtimeServicePutFile ( runtimeClient , {
154- path : ".env" ,
155- blob : newEnvBlob ,
156- create : true ,
157- createOnly : false ,
158- } ) ;
155+ if ( existingEnvBlob !== newEnvBlob ) {
156+ await runtimeServicePutFile ( runtimeClient , {
157+ path : ".env" ,
158+ blob : newEnvBlob ,
159+ create : true ,
160+ createOnly : false ,
161+ } ) ;
162+ if ( getRuntimeEditEnvironment ( ) === "cloud" ) {
163+ // Only push env on cloud for now. We will revisit this for rill-dev.
164+ await runtimeServicePushEnv ( runtimeClient , { } ) ;
165+ }
166+ }
159167
160168 await runtimeServicePutFile ( runtimeClient , {
161169 path : newConnectorFilePath ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 runtimeServiceGenerateCanvasFile ,
1313 runtimeServiceGenerateMetricsViewFile ,
1414 runtimeServiceGetInstance ,
15+ runtimeServicePushEnv ,
1516 runtimeServicePutFile ,
1617} from "@rilldata/web-common/runtime-client" ;
1718import {
@@ -37,6 +38,7 @@ import { unsetResourceEnvVars } from "@rilldata/web-common/features/connectors/c
3738import { maybeGetConnectorDriver } from "@rilldata/web-common/features/add-data/manager/steps/utils.ts" ;
3839import { behaviourEvent } from "@rilldata/web-common/metrics/initMetrics.ts" ;
3940import { BehaviourEventAction } from "@rilldata/web-common/metrics/service/BehaviourEventTypes.ts" ;
41+ import { getRuntimeEditEnvironment } from "@rilldata/web-common/features/entity-management/edit-environment.ts" ;
4042
4143export async function runImportSteps (
4244 runtimeClient : RuntimeClient ,
@@ -248,6 +250,10 @@ async function runCreateModelStep(
248250 create : true ,
249251 createOnly : false ,
250252 } ) ;
253+ if ( getRuntimeEditEnvironment ( ) === "cloud" ) {
254+ // Only push env on cloud for now. We will revisit this for rill-dev.
255+ await runtimeServicePushEnv ( runtimeClient , { } ) ;
256+ }
251257 }
252258
253259 let putFile = true ;
You can’t perform that action at this time.
0 commit comments