Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass organizationId to workspaces/create #852

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
21 changes: 16 additions & 5 deletions ddpui/ddpairbyte/airbyte_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def create_workspace(name: str) -> dict:
if not isinstance(name, str):
raise HttpError(400, "Name must be a string")

res = abreq("workspaces/create", {"name": name})
res = abreq(
"workspaces/create",
{"name": name, "organizationId": "00000000-0000-0000-0000-000000000000"},
)
if "workspaceId" not in res:
logger.info("Workspace not created: %s", name)
raise HttpError(400, "workspace not created")
Expand Down Expand Up @@ -400,7 +403,9 @@ def check_source_connection(workspace_id: str, data: AirbyteSourceCreate) -> dic
timeout=60,
)
if "jobInfo" not in res or res.get("status") == "failed":
failure_reason = res.get("message", "Something went wrong, please check your credentials")
failure_reason = res.get(
"message", "Something went wrong, please check your credentials"
)
logger.error("Failed to check the source connection: %s", res)
raise HttpError(500, failure_reason)
return res
Expand All @@ -420,7 +425,9 @@ def check_source_connection_for_update(
timeout=60,
)
if "jobInfo" not in res or res.get("status") == "failed":
failure_reason = res.get("message", "Something went wrong, please check your credentials")
failure_reason = res.get(
"message", "Something went wrong, please check your credentials"
)
logger.error("Failed to check the source connection: %s", res)
raise HttpError(500, failure_reason)
# {
Expand Down Expand Up @@ -647,7 +654,9 @@ def check_destination_connection(
timeout=60,
)
if "jobInfo" not in res or res.get("status") == "failed":
failure_reason = res.get("message", "Something went wrong, please check your credentials")
failure_reason = res.get(
"message", "Something went wrong, please check your credentials"
)
logger.error("Failed to check the destination connection: %s", res)
raise HttpError(500, failure_reason)
return res
Expand All @@ -670,7 +679,9 @@ def check_destination_connection_for_update(
timeout=60,
)
if "jobInfo" not in res or res.get("status") == "failed":
failure_reason = res.get("message", "Something went wrong, please check your credentials")
failure_reason = res.get(
"message", "Something went wrong, please check your credentials"
)
logger.error("Failed to check the destination connection: %s", res)
raise HttpError(500, failure_reason)
return res
Expand Down
Loading