diff --git a/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_DOWNLOAD/FLOJOY_CLOUD_DOWNLOAD.py b/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_DOWNLOAD/FLOJOY_CLOUD_DOWNLOAD.py
index 4e3009774..9ab654644 100644
--- a/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_DOWNLOAD/FLOJOY_CLOUD_DOWNLOAD.py
+++ b/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_DOWNLOAD/FLOJOY_CLOUD_DOWNLOAD.py
@@ -16,7 +16,7 @@
@node_preflight
def preflight():
- api_key = get_env_var("FLOJOY_CLOUD_KEY")
+ api_key = get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
if api_key is None:
raise KeyError(
@@ -41,7 +41,7 @@ def FLOJOY_CLOUD_DOWNLOAD(
The downloaded DataContainer will be returned as it is.
"""
- api_key = get_env_var("FLOJOY_CLOUD_KEY")
+ api_key = get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
if api_key is None:
raise KeyError(
diff --git a/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_UPLOAD/FLOJOY_CLOUD_UPLOAD.py b/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_UPLOAD/FLOJOY_CLOUD_UPLOAD.py
index a1d676b3c..7c0d7f0c5 100644
--- a/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_UPLOAD/FLOJOY_CLOUD_UPLOAD.py
+++ b/blocks/ETL/LOAD/CLOUD_DATABASE/FLOJOY_CLOUD_UPLOAD/FLOJOY_CLOUD_UPLOAD.py
@@ -26,7 +26,7 @@
@node_preflight
def preflight():
- api_key = get_env_var("FLOJOY_CLOUD_KEY")
+ api_key = get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
if api_key is None:
raise KeyError(
@@ -65,7 +65,7 @@ def FLOJOY_CLOUD_UPLOAD(
The input DataContainer will be returned as it is.
"""
- api_key = get_env_var("FLOJOY_CLOUD_KEY")
+ api_key = get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
if api_key is None:
raise KeyError(
diff --git a/captain/routes/cloud.py b/captain/routes/cloud.py
index bf0dfcbab..e7728d268 100644
--- a/captain/routes/cloud.py
+++ b/captain/routes/cloud.py
@@ -1,8 +1,8 @@
import json
from fastapi import APIRouter, Response
-from flojoy_cloud.client import FlojoyCloud
from flojoy.env_var import get_env_var
+from flojoy_cloud.client import FlojoyCloud
router = APIRouter(tags=["cloud"])
@@ -12,11 +12,11 @@ async def get_cloud_projects():
"""
Get all projects from the Flojoy Cloud.
"""
- workspace_secret = get_env_var("FLOJOY_CLOUD_KEY")
+ workspace_secret = get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
if workspace_secret is None:
return Response(status_code=401, content=json.dumps([]))
- cloud = FlojoyCloud(workspace_secret=get_env_var("FLOJOY_CLOUD_KEY"))
+ cloud = FlojoyCloud(workspace_secret=workspace_secret)
projects = cloud.get_all_projects(
""
diff --git a/captain/utils/test_sequencer/run_test_sequence.py b/captain/utils/test_sequencer/run_test_sequence.py
index 17a705fc2..abd1b4c1f 100644
--- a/captain/utils/test_sequencer/run_test_sequence.py
+++ b/captain/utils/test_sequencer/run_test_sequence.py
@@ -300,7 +300,9 @@ def _case_test_upload(node: TestNode, hardware_id: str, project_id: str) -> Extr
if node.completion_time is None:
raise Exception(f"{node.id}: Can't upload a test that wasn't run")
if node.export_to_cloud:
- cloud = FlojoyCloud(workspace_secret=get_env_var("FLOJOY_CLOUD_KEY"))
+ cloud = FlojoyCloud(
+ workspace_secret=get_env_var("FLOJOY_CLOUD_WORKSPACE_SECRET")
+ )
def reverse_id(test_name) -> str:
tests = cloud.get_all_tests_by_project_id(project_id)
diff --git a/playwright-test/10_env_modal.spec.ts b/playwright-test/10_env_modal.spec.ts
index 466e913b1..b1c4d168d 100644
--- a/playwright-test/10_env_modal.spec.ts
+++ b/playwright-test/10_env_modal.spec.ts
@@ -58,8 +58,10 @@ test.describe("Environment modal", () => {
await window.getByTestId(Selectors.flojoyCloudApiSubmit).click();
try {
- // Expect "FLOJOY_CLOUD_KEY" to be listed in the modal
- await expect(window.getByText("FLOJOY_CLOUD_KEY")).toBeVisible({
+ // Expect "FLOJOY_CLOUD_WORKSPACE_SECRET" to be listed in the modal
+ await expect(
+ window.getByText("FLOJOY_CLOUD_WORKSPACE_SECRET"),
+ ).toBeVisible({
timeout: 20000,
});
} catch (error) {
diff --git a/src/renderer/index.tsx b/src/renderer/index.tsx
index 4cb5e8dfb..d1a86bd4a 100644
--- a/src/renderer/index.tsx
+++ b/src/renderer/index.tsx
@@ -14,8 +14,10 @@ import { HashRouter } from "react-router-dom";
import { AuthContextProvider } from "./context/auth.context";
import { ThemeProvider } from "./providers/theme-provider";
import { TestSequencerWSProvider } from "./context/testSequencerWS.context";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const root = createRoot(document.getElementById("root") as HTMLElement);
+const queryClient = new QueryClient();
function fallbackRender({ error, resetErrorBoundary }) {
return