diff options
| author | Dan Engelbrecht <[email protected]> | 2025-09-22 11:34:53 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-09-22 11:34:53 +0200 |
| commit | 863a023b974be61f67cff37b668504c29d6c295e (patch) | |
| tree | a060e7ec9a47e4e79ddeace2419005759246923d /src/zenutil/buildstoragecache.cpp | |
| parent | improve builds download partial logic (#501) (diff) | |
| download | zen-863a023b974be61f67cff37b668504c29d6c295e.tar.xz zen-863a023b974be61f67cff37b668504c29d6c295e.zip | |
fetch cloud oplog (#502)
- Feature: Added `zen oplog-download` command to download the oplog body of a cooked output stored in Cloud DDC
- Oplog source is specified using one of the following options
- `--cloud-url` Cloud artifact URL for oplog
- `--host` Base host to resolve download host from
- `--override-host` Specific host to use without resolve
- `--assume-http2` assume that the builds endpoint is a HTTP/2 endpoint skipping HTTP/1.1 upgrade handshake
- `--namespace` Builds Storage namespace
- `--bucket` Builds Storage bucket
- `--build-id` an Oid in hex form for the source identifier to use
- `--yes` suppress conformation query when doing output of a very large oplog to console
- `--quiet` suppress all non-essential console output
- `--output-path` path to oplog output, extension .json or .cb (compact binary). Default is output to console
- `--system-dir` override default system root path
- Authentication options
- Auth token
- `--access-token` http auth Cloud Storage access token
- `--access-token-env` name of environment variable that holds the Http auth Cloud Storage access token
- `--access-token-path` path to json file that holds the Http auth Cloud Storage access token
- `--oidctoken-exe-path` path to OidcToken executable
- OpenId authentication
- `--openid-provider-name` Open ID provider name
- `--openid-provider-url` Open ID provider url
- `--openid-client-id`Open ID client id
- `--openid-refresh-token` Open ID refresh token
- `--encryption-aes-key` 256 bit AES encryption key for storing OpenID credentials
- `--encryption-aes-iv` 128 bit AES encryption initialization vector for storing OpenID credentials
- OAuth authentication
- `--oauth-url` OAuth provier url
- `--oauth-clientid` OAuth client id
- `--oauth-clientsecret` OAuth client secret
- Bugfix: `zen print` command now properly outputs very large compact binary objects as json to console
Diffstat (limited to 'src/zenutil/buildstoragecache.cpp')
| -rw-r--r-- | src/zenutil/buildstoragecache.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/zenutil/buildstoragecache.cpp b/src/zenutil/buildstoragecache.cpp index e5e8db8d2..376d967d1 100644 --- a/src/zenutil/buildstoragecache.cpp +++ b/src/zenutil/buildstoragecache.cpp @@ -413,4 +413,22 @@ CreateZenBuildStorageCache(HttpClient& HttpClient, return std::make_unique<ZenBuildStorageCache>(HttpClient, Stats, Namespace, Bucket, TempFolderPath, BoostBackgroundThreadCount); } +ZenCacheEndpointTestResult +TestZenCacheEndpoint(std::string_view BaseUrl, const bool AssumeHttp2) +{ + HttpClientSettings TestClientSettings{.LogCategory = "httpcacheclient", + .ConnectTimeout = std::chrono::milliseconds{1000}, + .Timeout = std::chrono::milliseconds{2000}, + .AssumeHttp2 = AssumeHttp2, + .AllowResume = true, + .RetryCount = 0}; + HttpClient TestHttpClient(BaseUrl, TestClientSettings); + HttpClient::Response TestResponse = TestHttpClient.Get("/status/builds"); + if (TestResponse.IsSuccess()) + { + return {.Success = true}; + } + return {.Success = false, .FailureReason = TestResponse.ErrorMessage("")}; +}; + } // namespace zen |