Skip to content

Commit a42a656

Browse files
committed
fix: specify engine ns when connecting to railway
1 parent 532580a commit a42a656

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

frontend/src/app/data-providers/engine-data-provider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ export const createNamespaceContext = ({
375375
} satisfies DefaultDataProvider;
376376

377377
return {
378+
engineNamespace: namespace,
378379
...dataProvider,
379380
runnersQueryOptions() {
380381
return infiniteQueryOptions({

frontend/src/app/dialogs/connect-railway-frame.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ function FormStepper({ onClose }: { onClose?: () => void }) {
9797
.VITE_APP_API_URL
9898
: cloudEnv()
9999
.VITE_APP_CLOUD_ENGINE_URL
100+
}&RIVET_NAMESPACE=${
101+
dataProvider.engineNamespace
100102
}`}
101103
target="_blank"
102104
rel="noreferrer"
@@ -167,27 +169,28 @@ function EnvVariablesStep() {
167169
const { data, isLoading } = useQuery(
168170
dataProvider.connectRunnerTokenQueryOptions(),
169171
);
172+
170173
return (
171174
<>
172175
<p>
173176
Set the following environment variables in your Railway project
174177
settings.
175178
</p>
176-
<div className="gap-1 items-center">
179+
<div className="gap-1 items-center grid grid-cols-2">
177180
{__APP_TYPE__ === "engine" ? (
178-
<div className="flex gap-1 items-center border-b border-b-border/40 pb-2 mb-2">
181+
<>
179182
<DiscreteInput value="RIVET_ENGINE" show />
180183
<DiscreteInput value={engineEnv().VITE_APP_API_URL} />
181-
</div>
184+
</>
182185
) : null}
183-
<div className="flex gap-1 items-center">
184-
<DiscreteInput value="RIVET_TOKEN" show />
185-
{isLoading ? (
186-
<Skeleton className="w-56 h-10" />
187-
) : (
188-
<DiscreteInput value={data || ""} />
189-
)}
190-
</div>
186+
<DiscreteInput value="RIVET_TOKEN" show />
187+
{isLoading ? (
188+
<Skeleton className="w-56 h-10" />
189+
) : (
190+
<DiscreteInput value={data || ""} />
191+
)}
192+
<DiscreteInput value="RIVET_NAMESPACE" show />
193+
<DiscreteInput value={dataProvider.engineNamespace} show />
191194
</div>
192195
</>
193196
);

0 commit comments

Comments
 (0)