Skip to content

Commit

Permalink
PTFE-675: gcp backend labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Abubakarr99 committed Aug 14, 2023
1 parent 8a9e25e commit ec7e188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions runner_manager/backend/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def get_network_interfaces(self) -> List[NetworkInterface]:
]

def create(self, runner: Runner):
labels: Dict[str, str] = {
"runner-manager": self.manager,
}
labels: Dict[str, str] = {}
if self.manager:
labels["runner-manager"] = self.manager
try:
image = self.get_image()
disks = self.get_disks()
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/backend/test_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@fixture()
def gcp_group() -> RunnerGroup:
def gcp_group(settings) -> RunnerGroup:
config = GCPConfig(
project_id=os.environ.get("CLOUDSDK_CORE_PROJECT", ""),
zone=os.environ.get("CLOUDSDK_COMPUTE_ZONE", ""),
Expand All @@ -23,6 +23,7 @@ def gcp_group() -> RunnerGroup:
id=2,
name="test",
organization="test",
manager=settings.name,
backend=GCPBackend(
name=Backends.gcloud,
config=config,
Expand Down

0 comments on commit ec7e188

Please sign in to comment.