commit | 7a88158823ee9ad33684213801ba45965eb29eb3 | [log] [tgz] |
---|---|---|
author | Joe Downing <joedow@google.com> | Tue Jun 10 20:11:00 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 10 20:11:00 2025 |
tree | b36da6090baa594cbf5ee5c1c23672af81ee96ba | |
parent | 235ad0ff5ef443f818c6eae442f78a3e9d32a32d [diff] |
Allow GCE metadata server override via environment variable Compute Engine instances have a default metadata server but it is a common practice for folks to create a custom metadata server. In those cases, the admin may set an alternate host:port via an environment variable named GCE_METADATA_HOST. This CL updates the ComputeEngineServiceClient class to look for an override in the env vars, otherwise it will use the default value. An interesting twist is that this environment variable is set on the try-bots so I need to modify our tests so it doesn't interfere with them. I ended up splitting InstanceIdentityTokenGetter into an impl and an interface so tests can create fake versions of it and adding some tests for the InstanceIdentityTokenGetterImpl for the new functionality. Tested: Manually Bug: NO_BUG Change-Id: I9db2853896209321d24c8b82d2bbc947435e1caa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6631238 Reviewed-by: Yuwei Huang <yuweih@chromium.org> Commit-Queue: Joe Downing <joedow@chromium.org> Cr-Commit-Position: refs/heads/main@{#1472031}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.