nebari-dev / nebari

🪴 Nebari - your open source data science platform
https://nebari.dev
BSD 3-Clause "New" or "Revised" License
279 stars 89 forks source link

[BUG] - azure project name length requirements aren't exactly right #2404

Open Adam-D-Lewis opened 6 months ago

Adam-D-Lewis commented 6 months ago

Describe the bug

I did a guided init with nebari 2024.3.3 for azure and this was apparently the command it corresponds to

$ nebari init ProviderEnum.azure --project-name xxxxxxxxx-nebari --namespace dev --auth-provider 
AuthenticationEnum.password --terraform-state TerraformStateEnum.remote --region southcentralus

I ended up with this error

│ Error: Failed to get existing workspaces: Error retrieving keys for Storage Account "xxxx61xxx61xxa2Dneba61ridevlnwl": storage.AccountsClient#ListKeys: Invalid input: autorest/validation: validation failed: parameter=accountName constraint=MaxLength value="broa61dva61ila2Dneba61ridevlnwl" details: value length must be less than or equal to 24

Expected behavior

No error if the name said it was passing in the guided init

OS and architecture in which you are running Nebari

Linux x86-64

How to Reproduce the problem?

see above

Command output

No response

Versions and dependencies used.

No response

Compute environment

None

Integrations

No response

Anything else?

No response

viniciusdc commented 6 months ago

The main problem here is that we append a suffix at the end of the project name to some resources, that's why it ends up leading to this issue. I once compiled almost all restrictions in this issue https://github.com/nebari-dev/nebari/issues/1257#issuecomment-1108964663

I think we need to revisit this, and maybe allow different rules for each provider instead of a general rules that takes all in consideration