Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
🐛 FIX: applied some ci test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
japerry911 committed Oct 27, 2023
1 parent 0b72fb3 commit da5b404
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions prefect_gcp/cloud_run_v2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import re
import time
from typing import Dict, Literal, Optional
from typing import Dict, List, Literal, Optional
from uuid import uuid4

from anyio.abc import TaskStatus
Expand Down Expand Up @@ -47,7 +47,7 @@ class JobV2(BaseModel):
template: Dict
observedGeneration: Optional[str]
terminalCondition: Dict
conditions: list[Dict]
conditions: List[Dict]
executionCount: int
latestCreatedExecution: Dict
reconciling: bool
Expand Down Expand Up @@ -292,7 +292,7 @@ class ExecutionV2(BaseModel):
taskCount: int
template: Dict
reconciling: bool
conditions: list[Dict]
conditions: List[Dict]
observedGeneration: Optional[str]
runningCount: Optional[int]
succeededCount: Optional[int]
Expand Down Expand Up @@ -328,7 +328,7 @@ def condition_after_completion(self) -> Dict:
Returns:
The condition after completion.
"""
if isinstance(self.conditions, list):
if isinstance(self.conditions, List):
for condition in self.conditions:
if (
condition["state"] == "CONDITION_SUCCEEDED"
Expand Down Expand Up @@ -425,8 +425,8 @@ class CloudRunJobV2(Infrastructure):
"or Google Artifact Registry, like `gcr.io/<project_name>/<repo>/`."
),
)
args: Optional[list[str]] = Field(
default_factory=list,
args: Optional[List[str]] = Field(
default_factory=List,
description=(
"The arguments to pass to the Cloud Run Job V2's entrypoint command."
),
Expand Down
8 changes: 4 additions & 4 deletions prefect_gcp/workers/cloud_run_v2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import shlex
import time
from typing import TYPE_CHECKING, Any, Dict, Literal, Optional
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional

from anyio.abc import TaskStatus
from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -289,8 +289,8 @@ class CloudRunWorkerV2Variables(BaseVariables):
"If not provided the default Prefect image will be used."
),
)
args: Optional[list[str]] = Field(
default_factory=list,
args: Optional[List[str]] = Field(
default_factory=List,
description=(
"The arguments to pass to the Cloud Run Job V2's entrypoint command."
),
Expand Down Expand Up @@ -335,7 +335,7 @@ class CloudRunWorkerV2Variables(BaseVariables):
"could be: G, Gi, M, Mi."
),
example="512Mi",
regex=r"^\d+(?:G|Gi|M|Mi)$",
pattern=r"^\d+(?:G|Gi|M|Mi)$",
)
timeout: Optional[int] = Field(
default=600,
Expand Down

0 comments on commit da5b404

Please sign in to comment.