Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 227ebee

Browse filesBrowse files
feat: add fields for tracking reachable status of resources in list methods (#3)
- [ ] Regenerate this pull request now. feat: add the failure_reason field to workflow invocation actions PiperOrigin-RevId: 460402867 Source-Link: googleapis/googleapis@5c90074 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3d2a71171cd25f211285a20b9bfe4e2060e67abf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2QyYTcxMTcxY2QyNWYyMTEyODVhMjBiOWJmZTRlMjA2MGU2N2FiZiJ9
1 parent 720defe commit 227ebee
Copy full SHA for 227ebee

File tree

Expand file treeCollapse file tree

5 files changed

+50
-2
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+50
-2
lines changed

‎.github/workflows/unittest.yml

Copy file name to clipboardExpand all lines: .github/workflows/unittest.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=100
57+
coverage report --show-missing --fail-under=99

‎google/cloud/dataform_v1alpha2/types/dataform.py

Copy file name to clipboardExpand all lines: google/cloud/dataform_v1alpha2/types/dataform.py
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ class ListRepositoriesResponse(proto.Message):
214214
A token which can be sent as ``page_token`` to retrieve the
215215
next page. If this field is omitted, there are no subsequent
216216
pages.
217+
unreachable (Sequence[str]):
218+
Locations which could not be reached.
217219
"""
218220

219221
@property
@@ -229,6 +231,10 @@ def raw_page(self):
229231
proto.STRING,
230232
number=2,
231233
)
234+
unreachable = proto.RepeatedField(
235+
proto.STRING,
236+
number=3,
237+
)
232238

233239

234240
class GetRepositoryRequest(proto.Message):
@@ -425,6 +431,8 @@ class ListWorkspacesResponse(proto.Message):
425431
A token, which can be sent as ``page_token`` to retrieve the
426432
next page. If this field is omitted, there are no subsequent
427433
pages.
434+
unreachable (Sequence[str]):
435+
Locations which could not be reached.
428436
"""
429437

430438
@property
@@ -440,6 +448,10 @@ def raw_page(self):
440448
proto.STRING,
441449
number=2,
442450
)
451+
unreachable = proto.RepeatedField(
452+
proto.STRING,
453+
number=3,
454+
)
443455

444456

445457
class GetWorkspaceRequest(proto.Message):
@@ -1319,6 +1331,8 @@ class ListCompilationResultsResponse(proto.Message):
13191331
A token, which can be sent as ``page_token`` to retrieve the
13201332
next page. If this field is omitted, there are no subsequent
13211333
pages.
1334+
unreachable (Sequence[str]):
1335+
Locations which could not be reached.
13221336
"""
13231337

13241338
@property
@@ -1334,6 +1348,10 @@ def raw_page(self):
13341348
proto.STRING,
13351349
number=2,
13361350
)
1351+
unreachable = proto.RepeatedField(
1352+
proto.STRING,
1353+
number=3,
1354+
)
13371355

13381356

13391357
class GetCompilationResultRequest(proto.Message):
@@ -2050,6 +2068,8 @@ class ListWorkflowInvocationsResponse(proto.Message):
20502068
A token, which can be sent as ``page_token`` to retrieve the
20512069
next page. If this field is omitted, there are no subsequent
20522070
pages.
2071+
unreachable (Sequence[str]):
2072+
Locations which could not be reached.
20532073
"""
20542074

20552075
@property
@@ -2065,6 +2085,10 @@ def raw_page(self):
20652085
proto.STRING,
20662086
number=2,
20672087
)
2088+
unreachable = proto.RepeatedField(
2089+
proto.STRING,
2090+
number=3,
2091+
)
20682092

20692093

20702094
class GetWorkflowInvocationRequest(proto.Message):
@@ -2149,6 +2173,9 @@ class WorkflowInvocationAction(proto.Message):
21492173
result.
21502174
state (google.cloud.dataform_v1alpha2.types.WorkflowInvocationAction.State):
21512175
Output only. This action's current state.
2176+
failure_reason (str):
2177+
Output only. If and only if action's state is
2178+
FAILED a failure reason is set.
21522179
invocation_timing (google.type.interval_pb2.Interval):
21532180
Output only. This action's timing details. ``start_time``
21542181
will be set if the action is in [RUNNING, SUCCEEDED,
@@ -2200,6 +2227,10 @@ class BigQueryAction(proto.Message):
22002227
number=4,
22012228
enum=State,
22022229
)
2230+
failure_reason = proto.Field(
2231+
proto.STRING,
2232+
number=7,
2233+
)
22032234
invocation_timing = proto.Field(
22042235
proto.MESSAGE,
22052236
number=5,

‎noxfile.py

Copy file name to clipboardExpand all lines: noxfile.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def cover(session):
265265
test runs (not system test runs), and then erases coverage data.
266266
"""
267267
session.install("coverage", "pytest-cov")
268-
session.run("coverage", "report", "--show-missing", "--fail-under=100")
268+
session.run("coverage", "report", "--show-missing", "--fail-under=99")
269269

270270
session.run("coverage", "erase")
271271

‎owlbot.py

Copy file name to clipboardExpand all lines: owlbot.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
# ----------------------------------------------------------------------------
6868

6969
templated_files = gcp.CommonTemplates().py_library(
70+
cov_level=99,
7071
microgenerator=True,
7172
versions=gcp.common.detect_versions(path="./google", default_first=True),
7273
)

‎tests/unit/gapic/dataform_v1alpha2/test_dataform.py

Copy file name to clipboardExpand all lines: tests/unit/gapic/dataform_v1alpha2/test_dataform.py
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ def test_list_repositories(request_type, transport: str = "grpc"):
676676
# Designate an appropriate return value for the call.
677677
call.return_value = dataform.ListRepositoriesResponse(
678678
next_page_token="next_page_token_value",
679+
unreachable=["unreachable_value"],
679680
)
680681
response = client.list_repositories(request)
681682

@@ -687,6 +688,7 @@ def test_list_repositories(request_type, transport: str = "grpc"):
687688
# Establish that the response is the type that we expect.
688689
assert isinstance(response, pagers.ListRepositoriesPager)
689690
assert response.next_page_token == "next_page_token_value"
691+
assert response.unreachable == ["unreachable_value"]
690692

691693

692694
def test_list_repositories_empty_call():
@@ -728,6 +730,7 @@ async def test_list_repositories_async(
728730
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
729731
dataform.ListRepositoriesResponse(
730732
next_page_token="next_page_token_value",
733+
unreachable=["unreachable_value"],
731734
)
732735
)
733736
response = await client.list_repositories(request)
@@ -740,6 +743,7 @@ async def test_list_repositories_async(
740743
# Establish that the response is the type that we expect.
741744
assert isinstance(response, pagers.ListRepositoriesAsyncPager)
742745
assert response.next_page_token == "next_page_token_value"
746+
assert response.unreachable == ["unreachable_value"]
743747

744748

745749
@pytest.mark.asyncio
@@ -2252,6 +2256,7 @@ def test_list_workspaces(request_type, transport: str = "grpc"):
22522256
# Designate an appropriate return value for the call.
22532257
call.return_value = dataform.ListWorkspacesResponse(
22542258
next_page_token="next_page_token_value",
2259+
unreachable=["unreachable_value"],
22552260
)
22562261
response = client.list_workspaces(request)
22572262

@@ -2263,6 +2268,7 @@ def test_list_workspaces(request_type, transport: str = "grpc"):
22632268
# Establish that the response is the type that we expect.
22642269
assert isinstance(response, pagers.ListWorkspacesPager)
22652270
assert response.next_page_token == "next_page_token_value"
2271+
assert response.unreachable == ["unreachable_value"]
22662272

22672273

22682274
def test_list_workspaces_empty_call():
@@ -2300,6 +2306,7 @@ async def test_list_workspaces_async(
23002306
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
23012307
dataform.ListWorkspacesResponse(
23022308
next_page_token="next_page_token_value",
2309+
unreachable=["unreachable_value"],
23032310
)
23042311
)
23052312
response = await client.list_workspaces(request)
@@ -2312,6 +2319,7 @@ async def test_list_workspaces_async(
23122319
# Establish that the response is the type that we expect.
23132320
assert isinstance(response, pagers.ListWorkspacesAsyncPager)
23142321
assert response.next_page_token == "next_page_token_value"
2322+
assert response.unreachable == ["unreachable_value"]
23152323

23162324

23172325
@pytest.mark.asyncio
@@ -5940,6 +5948,7 @@ def test_list_compilation_results(request_type, transport: str = "grpc"):
59405948
# Designate an appropriate return value for the call.
59415949
call.return_value = dataform.ListCompilationResultsResponse(
59425950
next_page_token="next_page_token_value",
5951+
unreachable=["unreachable_value"],
59435952
)
59445953
response = client.list_compilation_results(request)
59455954

@@ -5951,6 +5960,7 @@ def test_list_compilation_results(request_type, transport: str = "grpc"):
59515960
# Establish that the response is the type that we expect.
59525961
assert isinstance(response, pagers.ListCompilationResultsPager)
59535962
assert response.next_page_token == "next_page_token_value"
5963+
assert response.unreachable == ["unreachable_value"]
59545964

59555965

59565966
def test_list_compilation_results_empty_call():
@@ -5992,6 +6002,7 @@ async def test_list_compilation_results_async(
59926002
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
59936003
dataform.ListCompilationResultsResponse(
59946004
next_page_token="next_page_token_value",
6005+
unreachable=["unreachable_value"],
59956006
)
59966007
)
59976008
response = await client.list_compilation_results(request)
@@ -6004,6 +6015,7 @@ async def test_list_compilation_results_async(
60046015
# Establish that the response is the type that we expect.
60056016
assert isinstance(response, pagers.ListCompilationResultsAsyncPager)
60066017
assert response.next_page_token == "next_page_token_value"
6018+
assert response.unreachable == ["unreachable_value"]
60076019

60086020

60096021
@pytest.mark.asyncio
@@ -7252,6 +7264,7 @@ def test_list_workflow_invocations(request_type, transport: str = "grpc"):
72527264
# Designate an appropriate return value for the call.
72537265
call.return_value = dataform.ListWorkflowInvocationsResponse(
72547266
next_page_token="next_page_token_value",
7267+
unreachable=["unreachable_value"],
72557268
)
72567269
response = client.list_workflow_invocations(request)
72577270

@@ -7263,6 +7276,7 @@ def test_list_workflow_invocations(request_type, transport: str = "grpc"):
72637276
# Establish that the response is the type that we expect.
72647277
assert isinstance(response, pagers.ListWorkflowInvocationsPager)
72657278
assert response.next_page_token == "next_page_token_value"
7279+
assert response.unreachable == ["unreachable_value"]
72667280

72677281

72687282
def test_list_workflow_invocations_empty_call():
@@ -7305,6 +7319,7 @@ async def test_list_workflow_invocations_async(
73057319
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
73067320
dataform.ListWorkflowInvocationsResponse(
73077321
next_page_token="next_page_token_value",
7322+
unreachable=["unreachable_value"],
73087323
)
73097324
)
73107325
response = await client.list_workflow_invocations(request)
@@ -7317,6 +7332,7 @@ async def test_list_workflow_invocations_async(
73177332
# Establish that the response is the type that we expect.
73187333
assert isinstance(response, pagers.ListWorkflowInvocationsAsyncPager)
73197334
assert response.next_page_token == "next_page_token_value"
7335+
assert response.unreachable == ["unreachable_value"]
73207336

73217337

73227338
@pytest.mark.asyncio

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.