-
Notifications
You must be signed in to change notification settings - Fork 310
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
Make metadata timeout more accessible and controlleable for AppEngine stubs. #1518
base: main
Are you sure you want to change the base?
Conversation
Move the logic to read GCE_METADATA_TIMEOUT env variable so we can better control it in app_identity component. Related internal change is 607513254.
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.
Thank you for the pull request!
Could you add a chore:
prefix to your commit message like chore: make metadata...
?
There are also a few kokoro build failures.
(1) lint
failure. You can run python -m nox -s blacken
to format the files, then python -m nox -s lint
to verify.
(2) unit test failures - METADATA_HEADERS
instead of METADATA_HEADER
(3) after the unit test code is fixed, please run python -m nox -s cover
to see if all tests and the coverage check can pass (this repo requires 100% code coverage)
Thanks!
@@ -105,8 +105,45 @@ def test_ping_success(mock_metrics_header_value): | |||
request.assert_called_once_with( | |||
method="GET", | |||
url=_metadata._METADATA_IP_ROOT, | |||
headers=MDS_PING_REQUEST_HEADER, | |||
timeout=_metadata._METADATA_DEFAULT_TIMEOUT, | |||
headers=_metadata._METADATA_HEADER, |
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.
_METADATA_HEADERS
request.assert_called_once_with( | ||
method="GET", | ||
url=_metadata._METADATA_IP_ROOT, | ||
headers=_metadata._METADATA_HEADER, |
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.
_METADATA_HEADERS
Looks like you have an older PR for this as well, #1481. Should we close that PR? |
No description provided.