{"record":{"id":"19470671e921c8fb","repo":"xai-org/grok-build","slug":"no-cli-base-urls-configured","errorCode":null,"errorMessage":"no CLI base URLs configured","messagePattern":"no CLI base URLs configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-update/src/version.rs","lineNumber":292,"sourceCode":"pub(crate) async fn fetch_gcs_version(channel: &str) -> Result<String> {\n    let mut last_err: Option<anyhow::Error> = None;\n    let bases = cli_base_urls();\n    for (i, base) in bases.iter().enumerate() {\n        match fetch_gcs_version_from_base(channel, base).await {\n            Ok(v) => return Ok(v),\n            Err(e) => {\n                if i + 1 < bases.len() {\n                    tracing::warn!(\n                        \"channel pointer fetch from {} failed ({:#}); trying next base URL\",\n                        base,\n                        e\n                    );\n                }\n                last_err = Some(e);\n            }\n        }\n    }\n    Err(last_err.unwrap_or_else(|| anyhow::anyhow!(\"no CLI base URLs configured\")))\n}\n\n/// Test-only entry point: same as [`fetch_gcs_version`] but reads from\n/// `base_url` instead of the hardcoded GCS bucket.\n#[doc(hidden)]\npub async fn fetch_gcs_version_from_base(channel: &str, base_url: &str) -> Result<String> {\n    if channel == \"alpha\" {\n        let (alpha_v, stable_v) = tokio::try_join!(\n            fetch_gcs_channel_pointer(\"alpha\", base_url),\n            fetch_gcs_channel_pointer(\"stable\", base_url),\n        )?;\n        return semver_max(&alpha_v, &stable_v);\n    }\n    fetch_gcs_channel_pointer(channel, base_url).await\n}\n\nasync fn fetch_gcs_channel_pointer(channel: &str, base_url: &str) -> Result<String> {\n    let url = format!(\"{}/{}\", base_url, channel);","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-update/src/version.rs#L274-L310","documentation":"fetch_gcs_version fetches the channel version pointer from each configured CLI base URL, tracking the last error; if no base URLs are configured at all it returns this fallback. It means the version-check layer had zero GCS endpoints to query, so no version could be determined.","triggerScenarios":"Calling fetch_gcs_version (via fetch_latest_version) when the configured base URL list is empty — same degenerate condition as the install-side equivalent, but during version lookup.","commonSituations":"A build/packaging issue that stripped the hardcoded GCS bucket list; embedding the crate with an empty base-URL configuration; tests constructing fetch_gcs_version with no bases.","solutions":["Ensure cli_base_urls()/channel configuration yields at least one valid GCS base URL","Rebuild/reinstall the CLI if the baked-in URL list is missing","If calling programmatically, supply a base URL (or use fetch_gcs_version_from_base with an explicit base)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let bases: Vec<String> = crate::version::cli_base_urls();\nif bases.is_empty() { anyhow::bail!(\"no GCS bases configured for version check\"); }","typeGuard":null,"tryCatchPattern":"match fetch_latest_version(channel).await {\n    Err(e) if e.to_string().contains(\"no CLI base URLs configured\") => {\n        eprintln!(\"version lookup unavailable: no endpoints configured\");\n    }\n    result => result?,\n}","preventionTips":["Ensure the crate is built with its default GCS endpoint list intact","Use fetch_gcs_version_from_base with an explicit base URL in tests/embedding","Assert base URL configuration is non-empty before version checks"],"tags":["configuration","version","gcs"],"backgroundTag":"missing-base-url-configuration","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}