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

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekaplan committed Apr 18, 2024
1 parent 69e4758 commit 19a7477
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions prefect_gcp/workers/cloud_run_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def _get_default_job_body_template() -> Dict[str, Any]:
"serviceAccount": "{{ service_account_name }}",
"maxRetries": "{{ max_retries }}",
"timeout": "{{ timeout }}",
"vpcAccess":
{"connector": "{{ vpc_connector_name }}"},
"vpcAccess": {"connector": "{{ vpc_connector_name }}"},
"containers": [
{
"env": [],
Expand Down
5 changes: 2 additions & 3 deletions tests/test_cloud_run_worker_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ def test_format_args_if_present(self, cloud_run_worker_v2_job_config):
"containers"
][0]["args"] == ["-m", "prefect.engine"]


def test_remove_vpc_access_if_unset(self, cloud_run_worker_v2_job_config):
assert cloud_run_worker_v2_job_config.job_body["template"]["template"][
"vpcAccess"
Expand All @@ -149,7 +148,7 @@ def test_vpc_access_left_alone_if_connector_set(
assert cloud_run_worker_v2_job_config.job_body["template"]["template"][
"vpcAccess"
] == {
"connector": "projects/my_project/locations/us-central1/connectors/my-connector"
"connector": "projects/my_project/locations/us-central1/connectors/my-connector" # noqa: E501
}

def test_vpc_access_left_alone_if_network_config_set(
Expand All @@ -168,4 +167,4 @@ def test_vpc_access_left_alone_if_network_config_set(
"networkInterfaces": [
{"network": "projects/my_project/global/networks/my-network"}
],
}
}

0 comments on commit 19a7477

Please sign in to comment.