{"record":{"id":"e66a244cf0aa047e","repo":"spinnaker/spinnaker","slug":"failed-to-download-chart-versions-for-name-acc","errorCode":null,"errorMessage":"Failed to download chart versions for '<name>' account","messagePattern":"Failed to download chart versions for '<name>' account","errorType":"exception","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"clouddriver/clouddriver-artifacts/clouddriver-artifacts-helm/src/main/java/com/netflix/spinnaker/clouddriver/artifacts/helm/HelmArtifactCredentials.java","lineNumber":97,"sourceCode":"    InputStream index;\n    List<String> names;\n    try {\n      index = downloadIndex();\n      names = indexParser.findNames(index);\n    } catch (IOException e) {\n      throw new NotFoundException(\"Failed to download chart names for '\" + name + \"' account\", e);\n    }\n    return names;\n  }\n\n  public List<String> getArtifactVersions(String artifactName) {\n    InputStream index;\n    List<String> versions;\n    try {\n      index = downloadIndex();\n      versions = indexParser.findVersions(index, artifactName);\n    } catch (IOException e) {\n      throw new NotFoundException(\n          \"Failed to download chart versions for '\" + name + \"' account\", e);\n    }\n    return versions;\n  }\n\n  private InputStream downloadIndex() throws IOException {\n    try {\n      ResponseBody indexDownloadResponse = fetchUrl(indexParser.indexPath());\n      return indexDownloadResponse.byteStream();\n    } catch (IOException e) {\n      throw new FailedDownloadException(\n          \"Failed to download index.yaml file in '\" + indexParser.getRepository() + \"' repository\",\n          e);\n    }\n  }\n\n  @Override\n  public String getType() {","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/spinnaker/spinnaker/blob/1d4a5d0f6d10d0232b1af077decd559b68a94a5e/clouddriver/clouddriver-artifacts/clouddriver-artifacts-helm/src/main/java/com/netflix/spinnaker/clouddriver/artifacts/helm/HelmArtifactCredentials.java#L79-L115","documentation":"HelmArtifactCredentials.getArtifactVersions downloads the Helm repository's index.yaml and parses it to list chart versions for a given chart name. Any IOException raised while fetching or reading the index (network failure, bad repository URL, invalid/malformed index.yaml, since downloadIndex and index parsing both throw IOException) is wrapped in a kork NotFoundException named for the configured account. The cause chain holds the real reason, so it usually signals a configuration or connectivity problem with the Helm repository rather than the chart genuinely not existing.","triggerScenarios":"Calling getArtifactVersions (e.g. via the clouddriver artifact versions endpoint) when: the repository URL is wrong or unreachable, DNS/TLS fails, the repository returns a non-2xx response that surfaces as IOException, index.yaml is malformed YAML (buildIndexConfig rethrows 'Invalid index.yaml file in repository ...' as IOException), or the index stream cannot be read.","commonSituations":"Misconfigured repository in the helm artifact account (typo in URL, missing scheme), private ChartMuseum/OCI-repo requiring credentials not configured, firewall/proxy blocking clouddriver egress, repository redeployed with a corrupt index.yaml, or transient network outage during a deck/kayenta chart version lookup.","solutions":["Verify the helm account's repository URL is correct and reachable from clouddriver (curl <repository>/index.yaml from the clouddriver host/pod).","Inspect the cause of the NotFoundException in the clouddriver log — it distinguishes network errors from 'Invalid index.yaml file in repository ...' parse failures.","Fix the repository index: regenerate index.yaml (e.g. `helm repo index`) or point the account at a healthy mirror if the file is corrupt.","Add missing credentials/proxy settings for private repositories, then retry the version lookup."],"exampleFix":"// before: repository URL missing scheme\ngoogle:\n  artifacts:\n    helm:\n      - name: my-helm\n        repository: charts.example.com/myrepo\n// after\ngoogle:\n  artifacts:\n    helm:\n      - name: my-helm\n        repository: https://charts.example.com/myrepo","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  List<String> versions = helmCredentials.getArtifactVersions(chartName);\n} catch (NotFoundException e) {\n  log.error(\"Chart version lookup failed for account; cause: {}\", e.getCause(), e);\n  // fall back to cached versions or fail the stage with the cause surfaced\n}","preventionTips":["Validate the repository URL with a curl to /index.yaml before saving the helm account config.","Monitor the cause of NotFoundExceptions from helm accounts to separate network from parse errors.","Keep private repo credentials and proxy config current in clouddriver settings."],"tags":["helm","network","artifact-download","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"1d4a5d0f6d10d0232b1af077decd559b68a94a5e","analyzedAt":"2026-09-10T14:13:07.222Z","contentChangedAt":"2026-09-10T14:13:07.222Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}