{"record":{"id":"cd752b77cc928610","repo":"argoproj/argo-workflows","slug":"unable-to-determine-storage-account-name-from-s","errorCode":null,"errorMessage":"unable to determine storage account name from %s","messagePattern":"unable to determine storage account name from (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/artifacts/azure/azure.go","lineNumber":91,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcredential, err := azblob.NewSharedKeyCredential(accountName, azblobDriver.AccountKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to create Azure shared key credential: %w\", err)\n\t}\n\tcontainerClient, err := container.NewClientWithSharedKeyCredential(containerURL.String(), credential, nil)\n\treturn containerClient, err\n}\n\n// determineAccountName determines the account name of the storage account based on the\n// supplied container URL.\nfunc determineAccountName(containerURL *url.URL) (string, error) {\n\thostname := containerURL.Hostname()\n\tif strings.HasPrefix(hostname, \"127.0.0.1\") || strings.HasPrefix(hostname, \"localhost\") {\n\t\tparts := strings.Split(containerURL.Path, \"/\")\n\t\tif len(parts) <= 2 {\n\t\t\treturn \"\", fmt.Errorf(\"unable to determine storage account name from %s\", containerURL)\n\t\t}\n\t\treturn parts[1], nil\n\t}\n\tparts := strings.Split(hostname, \".\")\n\treturn parts[0], nil\n}\n\n// isSASAccountKey determines whether the account key provided is a SAS token instead of a\n// storage account key. A SAS token is a string of query parameters that is appended to the\n// URL of the storage account. This function looks for the presence of a query parameter in\n// the string and returns true if found.\nfunc isSASAccountKey(accountKey string) bool {\n\tre := regexp.MustCompile(`(\\?|\\&)([^=]+)\\=([^&]+)`)\n\treturn re.MatchString(accountKey)\n}\n\n// Load downloads artifacts from Azure Blob Storage\nfunc (azblobDriver *ArtifactDriver) Load(ctx context.Context, artifact *wfv1.Artifact, path string) error {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/artifacts/azure/azure.go#L73-L109","documentation":"determineAccountName extracts the storage account from the endpoint URL: for 127.0.0.1/localhost endpoints it takes the first path segment; if the path has two or fewer segments (no account segment present) it fails with this error.","triggerScenarios":"Using a local Azurite-style endpoint like http://127.0.0.1:10000 or http://localhost:10000/container without the account path segment; the expected local form is http://127.0.0.1:10000/<account>/<container>.","commonSituations":"Pointing artifacts at Azurite (local Azure emulator) with the account omitted from the URL; port-forwarding an in-cluster Azure emulator and forgetting the account path prefix.","solutions":["Include the account name as the first path segment of local endpoints: http://127.0.0.1:10000/devstoreaccount1/<container>.","For real Azure endpoints, use the standard https://<account>.blob.core.windows.net form so the account comes from the hostname.","Test with Argo's documented Azurite endpoint layout before deploying."],"exampleFix":"// before\nendpoint: http://127.0.0.1:10000\n// after\nendpoint: http://127.0.0.1:10000/devstoreaccount1","handlingStrategy":"validation","validationCode":"func validateLocalAzureEndpoint(endpoint string) error {\n\tu, err := url.Parse(endpoint)\n\tif err != nil { return err }\n\th := u.Hostname()\n\tif strings.HasPrefix(h, \"127.0.0.1\") || h == \"localhost\" {\n\t\tif len(strings.Split(strings.Trim(u.Path, \"/\"), \"/\")) < 1 || strings.Trim(u.Path, \"/\") == \"\" {\n\t\t\treturn fmt.Errorf(\"local endpoints must include account path: http://127.0.0.1:10000/<account>\")\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the Azurite form http://127.0.0.1:10000/<account>/<container> when testing locally.","Never omit the account segment from emulator endpoints.","Prefer standard https://<account>.blob.core.windows.net endpoints outside local dev."],"tags":["azure","configuration","azurite"],"backgroundTag":"azure-account-name-unresolvable","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}