Skip to content

Commit

Permalink
it's ready. Gonna test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenxu95 committed Apr 18, 2023
1 parent b7004e1 commit ffd957f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/dynamic_k8s_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict, Union

from aqueduct.integrations.validation import validate_is_connected
from aqueduct import globals
from aqueduct.integrations.integration_decorators import validate_is_connected

from aqueduct.constants.enums import K8sClusterActionType, K8sClusterStatusType
from aqueduct.error import InvalidIntegrationException, InvalidUserArgumentException
Expand Down
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/google_sheets_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Optional

from aqueduct.integrations.integration_decorators import validate_is_connected
from aqueduct.integrations.validation import validate_is_connected

from aqueduct.artifacts.base_artifact import BaseArtifact
from aqueduct.artifacts.table_artifact import TableArtifact
Expand Down
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/mongodb_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from typing import Any, Dict, List, Optional

from aqueduct.integrations.integration_decorators import validate_is_connected
from aqueduct.integrations.validation import validate_is_connected

from aqueduct import globals
from aqueduct.artifacts import preview as artifact_utils
Expand Down
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/s3_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from typing import List, Optional, Union

from aqueduct.integrations.integration_decorators import validate_is_connected
from aqueduct.integrations.validation import validate_is_connected

from aqueduct import globals
from aqueduct.artifacts import preview as artifact_utils
Expand Down
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/salesforce_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import uuid
from typing import Optional

from aqueduct.integrations.integration_decorators import validate_is_connected
from aqueduct.integrations.validation import validate_is_connected

from aqueduct.artifacts.base_artifact import BaseArtifact
from aqueduct.artifacts.table_artifact import TableArtifact
Expand Down
2 changes: 1 addition & 1 deletion sdk/aqueduct/integrations/sql_integration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List, Optional, Union

import pandas as pd
from aqueduct.integrations.integration_decorators import validate_is_connected
from aqueduct.integrations.validation import validate_is_connected

from aqueduct.artifacts.base_artifact import BaseArtifact
from aqueduct.artifacts.preview import preview_artifact
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions sdk/aqueduct/utils/integration_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from aqueduct.models.execution_state import ExecutionState


# TODO: maybe move this to artifacts/?
def validate_integration_is_connected(name: str, exec_state: Optional[ExecutionState]) -> None:
"""Method used to determine if this integration was successfully connected to or not.
If not successfully connected (or pending), we will raise an Exception.
Expand All @@ -17,15 +16,15 @@ def validate_integration_is_connected(name: str, exec_state: Optional[ExecutionS

if exec_state.status == ExecutionStatus.FAILED:
raise IntegrationFailedToConnect(
"Cannot use integration %s because it has not been successfully connected to:"
"Cannot use integration %s because it has not been successfully connected to: "
"%s\n%s\n\n Please see the /integrations page on the UI for more details." % (
name, exec_state.error.tip, exec_state.error.context,
)
)
else:
raise IntegrationConnectionInProgress(
"Cannot use integration %s because it is still in the process of connecting."
"Please see the /integrations page oen the UI for more details."
"Please see the /integrations page on the UI for more details."
% name
)

0 comments on commit ffd957f

Please sign in to comment.