Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Blob Storage - Error: Unable to extract accountName with provided information. #226

Open
dawogid opened this issue Jul 24, 2023 · 2 comments

Comments

@dawogid
Copy link

dawogid commented Jul 24, 2023

Summary

Hi, I'm not able to configure Azure Blob Storage while using sorry-cypress helm chart.
In director I get error:

Unable to extract accountName with provided information.\n at getAccountNameFromUrl (/app/node_modules/@azure/storage-blob/src/utils/utils.common.ts:590:11)\n at extractConnectionStringParts (/app/node_modules/@azure/storage-blob/src/utils/utils.common.ts:232:25)\n at Function.fromConnectionString (/app/node_modules/@azure/storage-blob/src/BlobServiceClient.ts:386:28)\n at Object.<anonymous> (/app/packages/director/src/screenshots/azure-blob-storage/azure-blob-storage.ts:9:45)\n at Module._compile (node:internal/modules/cjs/loader:1191:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)\n at Module.load (node:internal/modules/cjs/loader:1069:32)\n at Function.Module._load (node:internal/modules/cjs/loader:904:12)\n at Module.require (node:internal/modules/cjs/loader:1093:19)\n at Module.Hook._require.Module.require (/app/node_modules/require-in-the-middle/index.js:80:39)","type":"Error","msg":"Unable to extract accountName with provided information.

Am I missing something?

How to reproduce

In values.yaml set:

director.environmentVariables.screenshotsDriver: "../screenshots/azure-blob-storage.driver"

azureBlobStorage.containerName: "sorry-cypress"
azureBlobStorage.uploadUrlExpiryInHours: 24
azureBlobStorage.existingSecret: "azurestorageaccount"
azureBlobStorage.fullnameOverride: ""

Under Kubernetes namespace create secret azurestorageaccount containing key connexionstring with base64 encoded value of Azure Storage Account connection string i.e. DefaultEndpointsProtocol=https;AccountName=examplesa ;AccountKey=kHl4QfPnJaaoAXp6sfylg7fr4MuHI3oXp4I5//kYAwmwJhVRrDZJ1CG4KuwSlD8KpVF7vVcvsx7z+AStp7zQvw==;EndpointSuffix=core.windows.net

Make sure that Storage Account from used connection string contains container sorry-cypress.

Install sorry-cypress chart in same namespace as created secret azurestorageaccount - director will log above error.

Environment

  • cypress version: 12.17.1
  • helm chart version: 2.5.3
@fbritoferreira
Copy link
Contributor

Can you try without the base64

@dawogid
Copy link
Author

dawogid commented Jul 25, 2023

Thank you for your answer.

As I'm aware it has to be base64 encoded, otherwise I'm not able to create Kubernetes secret:
Secret in version "v1" cannot be handled as a Secret: illegal base64 data at input byte 24

I can try to define secret in plain text with stringData, but then it will be converted to base64 anyway by Kubernetes.

I'm attaching files used as values.yaml and secret.yaml for creating Kubernetes secret.

values.txt
secret.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants