-
Notifications
You must be signed in to change notification settings - Fork 1.7k
tests: fix unit test failure when auto_populated_fields is set #16944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| import os | ||
| import re | ||
| from typing import Dict, Callable, Mapping, MutableMapping, MutableSequence, Optional, Sequence, Tuple, Type, Union, cast | ||
| import uuid | ||
| import warnings | ||
|
|
||
| from google.cloud.storagebatchoperations_v1 import gapic_version as package_version | ||
|
|
@@ -1004,6 +1005,9 @@ def sample_create_job(): | |
| )), | ||
| ) | ||
|
|
||
| if not request.request_id: | ||
| request.request_id = str(uuid.uuid4()) | ||
|
Comment on lines
+1008
to
+1009
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to AIP-4235, auto-population of fields should be handled by the client library's RPC methods. If the generator is updated to support References
|
||
|
|
||
| # Validate the universe domain. | ||
| self._validate_universe_domain() | ||
|
|
||
|
|
@@ -1107,6 +1111,9 @@ def sample_delete_job(): | |
| )), | ||
| ) | ||
|
|
||
| if not request.request_id: | ||
| request.request_id = str(uuid.uuid4()) | ||
|
|
||
| # Validate the universe domain. | ||
| self._validate_universe_domain() | ||
|
|
||
|
|
@@ -1206,6 +1213,9 @@ def sample_cancel_job(): | |
| )), | ||
| ) | ||
|
|
||
| if not request.request_id: | ||
| request.request_id = str(uuid.uuid4()) | ||
|
|
||
| # Validate the universe domain. | ||
| self._validate_universe_domain() | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can this be introduced as a helper once in the client which can simply be called in each methods?